~/tutorials $

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.

37 of 45 tutorials tested on Ubuntu 24.04 LTS

  1. Automate snapshots before risky changes with the CLI

    A small script that takes a VPSNine snapshot with the vps9 CLI, waits until it is ready and rotates old ones, then runs your risky change.

    beginner · 15 min · Ubuntu 24.04 LTS

  2. Cron vs systemd timers: how to schedule jobs on Linux

    Schedule a recurring job both ways, with a crontab line and with a systemd timer, and pick the right one for logging, missed runs and random delays.

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

  3. How to check open ports on Linux with ss and nmap

    List the ports your server listens on with ss, find which program owns each one, then scan the server from outside with nmap to see what the internet can reach.

    beginner · 10 min · Ubuntu 24.04 LTS

  4. How to create a sudo user and disable root login on Ubuntu and Debian

    Add a normal user with sudo rights on Ubuntu or Debian, give it your SSH key, then stop root logging in over SSH without locking yourself out.

    beginner · 15 min · Ubuntu 24.04 LTS, Debian 13 Stable

  5. How to find what's using disk space on Linux and free it safely

    Find what filled your server's disk with df, du and ncdu, then safely clean package caches, logs, old kernels and deleted files still held open.

    beginner · 15 min · Ubuntu 24.04 LTS, AlmaLinux 10

  6. How to host a static website with nginx on Ubuntu or Debian

    Serve a static site with nginx from your own server, with clean URLs, gzip, HTTP/2, the right caching headers and one-command deploys with rsync.

    beginner · 25 min · Ubuntu 24.04 LTS, Debian 12 Oldstable, Debian 13 Stable

  7. How to install and secure MariaDB on Ubuntu 24.04

    Install MariaDB on Ubuntu 24.04, answer mariadb-secure-installation correctly, give each app its own user and keep port 3306 private.

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

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

  9. How to install PostgreSQL on Ubuntu 24.04 and keep it private

    Install PostgreSQL 16 from Ubuntu or 18 from the PostgreSQL repository, create a role and a database, and connect safely over an SSH tunnel.

    beginner · 20 min · Ubuntu 24.04 LTS

  10. How to monitor a Linux server with Netdata

    Install Netdata for per-second CPU, memory, disk and network charts, keep its dashboard private behind an SSH tunnel, and get its built-in alerts.

    beginner · 15 min · Ubuntu 24.04 LTS

  11. How to read logs with journalctl

    Find the log lines you need with journalctl, by service, time, priority and boot, keep logs across reboots, and cap how much disk the journal uses.

    beginner · 15 min · Ubuntu 24.04 LTS, Debian 13 Stable, AlmaLinux 10

  12. How to set the time zone, hostname and NTP on a Linux server

    Set a server's time zone with timedatectl, give it a proper hostname, and keep its clock in sync with chrony or systemd-timesyncd, then check it really is.

    beginner · 10 min · Ubuntu 24.04 LTS, Debian 13 Stable, AlmaLinux 10

  13. Self-host Uptime Kuma with Docker and HTTPS

    Run Uptime Kuma 2 in Docker Compose, claim it privately over an SSH tunnel, put Caddy in front for HTTPS, then add monitors, alerts and a status page.

    beginner · 20 min · Ubuntu 24.04 LTS

  14. Use curl and jq with the VPSNine API

    Drive the VPSNine 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

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

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

  17. Deploy on push with GitHub Actions and the VPSNine API

    Build on every push to main in GitHub Actions, snapshot the VPSNine server through the API, then ship with rsync over SSH and switch releases atomically.

    intermediate · 40 min · Ubuntu 24.04 LTS

  18. Get Slack and Discord alerts from VPSNine webhooks

    VPSNine has no Slack or Discord integration, so run a tiny relay that verifies webhook signatures and posts alerts and events to your channels.

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

  19. How to automate BorgBackup with borgmatic to a second server

    Back up files and databases to a second server over SSH with borgmatic: an append-only key, one YAML config, retention, checks and a daily timer.

    intermediate · 40 min · Ubuntu 24.04 LTS

  20. How to back up a Linux server with restic to S3 storage

    Encrypted nightly backups to any S3-compatible bucket with restic: database dumps, a systemd timer, a retention policy and a tested restore.

    intermediate · 30 min · Ubuntu 24.04 LTS

  21. How to get a Let's Encrypt wildcard certificate with the DNS challenge

    Get a free *.example.com certificate from Let's Encrypt with certbot or acme.sh and your DNS provider's API, renew it automatically and reload your web server.

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

  22. How to install and secure Redis on Ubuntu 24.04

    Install Redis on Ubuntu 24.04, keep it on localhost, replace the open default user with ACL users, block dangerous commands and cap its memory.

    intermediate · 20 min · Ubuntu 24.04 LTS

  23. How to install CrowdSec on Ubuntu and Debian

    Install the CrowdSec engine and its nftables firewall bouncer, watch SSH and nginx logs, allowlist your own addresses, and see what it blocks.

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

  24. How to set up a WireGuard VPN server on Ubuntu 24.04

    Install WireGuard on Ubuntu 24.04, write the server config, route clients' traffic through it and connect a laptop and a phone.

    intermediate · 30 min · Ubuntu 24.04 LTS

  25. How to troubleshoot high CPU and memory usage on a Linux server

    Find the process behind high CPU or memory use with top, ps, vmstat and pidstat, read load average and steal time correctly, and spot the OOM killer.

    intermediate · 20 min · Ubuntu 24.04 LTS

  26. How to upgrade Ubuntu 22.04 to 24.04 LTS safely

    Upgrade an Ubuntu 22.04 server to 24.04 LTS in place with do-release-upgrade, with a snapshot first, a backup SSH port, and checks for what changes.

    intermediate · 45 min · Ubuntu 22.04 LTS, Ubuntu 24.04 LTS

  27. How to use Caddy as a reverse proxy for multiple sites and apps

    One Caddyfile that serves several domains and apps on one server, each with its own automatic HTTPS certificate, path routing, headers, logs and basic auth.

    intermediate · 30 min · Ubuntu 24.04 LTS, Debian 12 Oldstable, Debian 13 Stable

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

  29. Install PHP 8.3 with PHP-FPM and nginx on Ubuntu 24.04

    Install PHP 8.3 and PHP-FPM from Ubuntu's archive, wire it to nginx, give each site its own FPM pool and user, and tune the settings that matter.

    intermediate · 25 min · Ubuntu 24.04 LTS

  30. Manage VPSNine servers with Ansible

    Build an Ansible inventory from the VPSNine 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

  31. Receive VPSNine webhooks in Node.js and Python

    A dependency-free webhook receiver in Node.js or Python that checks every VPSNine signature, refuses replays, skips duplicates and runs under systemd.

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

  32. Run a multi-container app with Docker Compose and a reverse proxy

    One compose.yaml with an app, its PostgreSQL database and Caddy for HTTPS, on private networks with named volumes, health checks, secrets, updates and backups.

    intermediate · 30 min · Ubuntu 24.04 LTS

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

  34. Self-host Plausible Analytics (Community Edition) with Docker

    Install Plausible Community Edition with its official Docker Compose setup, serve it over HTTPS with Caddy, add your site, and back up and upgrade it.

    intermediate · 30 min · Ubuntu 24.04 LTS

  35. Self-host Vaultwarden safely with Docker and HTTPS

    Run Vaultwarden, the Bitwarden-compatible password server, in Docker behind Caddy with HTTPS, sign-ups closed, a hashed admin token and backups you can restore.

    intermediate · 30 min · Ubuntu 24.04 LTS

  36. WP-CLI tutorial: manage and harden WordPress from the command line

    Install WP-CLI, then update WordPress, manage plugins and users, move a site to a new domain, back up the database and lock the site down, all over SSH.

    intermediate · 35 min · Ubuntu 24.04 LTS

  37. Create and destroy preview servers per pull request

    Order a VPSNine 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

Be first when orders open

Join the waitlist and we'll send you one email when VPSNine launches. Pick a plan if you already know which one you want, and we'll size the first servers around it.

  • One email, on launch day
  • Monthly or yearly, no lock-in
  • 14-day money-back guarantee