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

  1. 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.

    beginner · 15 min · Ubuntu 24.04 LTS

  2. 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.

    beginner · 10 min · Ubuntu 24.04 LTS

  3. 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.

    beginner · 20 min · Ubuntu 24.04 LTS, Debian 12 Oldstable

  4. 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.

    intermediate · 30 min · Ubuntu 24.04 LTS

  5. 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.

    intermediate · 30 min · Ubuntu 24.04 LTS

  6. 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.

    intermediate · 40 min · Ubuntu 24.04 LTS

  7. 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.

    intermediate · 20 min · Ubuntu 24.04 LTS, Debian 13 Stable, AlmaLinux 10

  8. 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.

    intermediate · 35 min · Ubuntu 24.04 LTS

  9. 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.

    intermediate · 35 min · Ubuntu 24.04 LTS, Debian 12 Oldstable

  10. 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.

    intermediate · 25 min · Debian 12 Oldstable, Ubuntu 24.04 LTS

  11. 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.

    intermediate · 30 min · Ubuntu 24.04 LTS

  12. 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.

    advanced · 45 min · Ubuntu 24.04 LTS

Ready when you are

Order a server