Linux server tutorials
Step-by-step tutorials for a Linux server: VPNs, web servers, databases, containers, security and backups. Each one names the distributions it was tested on.
12 of 45 tutorials in Development tested on Ubuntu 24.04 LTS
Automate snapshots before risky changes with the CLI
A small script that takes a Rack4 snapshot with the rack4 CLI, waits until it is ready and rotates old ones, then runs your risky change.
How to install Node.js on Ubuntu 24.04
Three ways to install Node.js on Ubuntu 24.04, NodeSource, nvm and Ubuntu's own package, which one to pick, and how to update or switch versions later.
Use curl and jq with the Rack4 API
Drive the Rack4 API from a shell with curl and jq: filter servers, take snapshots and wait for them, read errors, page invoices, edit the firewall.
Deploy a FastAPI app with Gunicorn, Uvicorn workers and systemd
Run a FastAPI app in a virtualenv under Gunicorn with Uvicorn workers, keep it up with a systemd service, and put nginx in front as a reverse proxy.
Deploy a Node.js app with PM2 and nginx on Ubuntu 24.04
Run a Node.js app under its own user with PM2, bring it back after reboots, put nginx in front as a reverse proxy, and ship updates without downtime.
Deploy on push with GitHub Actions and the Rack4 API
Build on every push to main in GitHub Actions, snapshot the Rack4 server through the API, then ship with rsync over SSH and switch releases atomically.
How to write a systemd service for your app
Run your own program as a systemd service that starts at boot, restarts when it crashes, runs as its own user, reads an env file and is sandboxed.
Manage Rack4 servers with Ansible
Build an Ansible inventory from the Rack4 API, grouped by tag, plan and image, and run a playbook that patches servers and locks SSH to keys.
Receive Rack4 webhooks in Node.js and Python
A dependency-free webhook receiver in Node.js or Python that checks every Rack4 signature, refuses replays, skips duplicates and runs under systemd.
Relay Rack4 webhooks to Slack and Discord with Node.js
When the built-in Slack and Discord channels don't fit, run a small relay that verifies webhook signatures and posts events in your own format.
Self-host Gitea with Docker, PostgreSQL and HTTPS
Run your own Git server with Gitea and PostgreSQL in Docker Compose, Git over SSH on port 2222, HTTPS from Caddy, no open sign-ups, and backups you can restore.
Create and destroy preview servers per pull request
Order a Rack4 server per pull request from GitHub Actions, deploy the branch, comment its address, and delete the server when the PR closes.