Learn to run your own servers

Short lessons, one question each, with the exact commands and a check that it worked. Free, no account needed.

Courses

Guided paths from zero. Pick one and follow it lesson by lesson.

All courses

Browse by topic

Every lesson stands on its own. Jump to the question you have.

Fix it fast

Seeing one of these? Each fix walks from the symptom to the cause, the fix and how to stop it coming back.

All 10 fixes

All 156 lessons

The full list, by topic.

Server basics 19 lessons
  1. What is a VPS (virtual private server)?
  2. Log in to a server with SSH keys
  3. Create a non-root sudo user
  4. Set up a firewall with ufw
  5. Keep an Ubuntu server updated automatically
  6. Linux file permissions explained
  7. Essential Linux commands for servers
  8. Check disk, memory and CPU usage
  9. Read logs with journalctl
  10. Run a service with systemd
  11. What is SSH and how does it work on a server
  12. Initial server setup checklist for Ubuntu
  13. Disable SSH password login on Ubuntu
  14. Protect SSH with fail2ban on Ubuntu
  15. Add swap space on Ubuntu
  16. Copy files to a server with scp and rsync
  17. Schedule tasks with cron on Linux
  18. Find what is using a port on Linux
  19. SSH config file shortcuts
Docker 20 lessons
  1. Install Docker on Ubuntu
  2. Run your first Docker container (docker run)
  3. Docker Compose basics: run web and database with compose.yaml
  4. Docker volumes and persistent data: named volume vs bind mount
  5. Write your first Dockerfile and build an image with docker build
  6. Docker networks explained: connect containers by name
  7. Docker image vs container vs registry, and how tags work
  8. Free disk space with docker system prune (safely)
  9. Docker healthcheck: add HEALTHCHECK and read container health
  10. Docker Compose environment variables: environment, env_file, .env
  11. Docker restart policy: always vs unless-stopped vs on-failure
  12. Run commands inside a Docker container (docker exec)
  13. Multi-stage Docker builds for smaller images
  14. Publish Docker container ports safely
  15. Update a Docker container to a new image
  16. Docker bridge vs host networking: which to use
  17. What 0.0.0.0 means when publishing Docker ports
  18. DNS inside Docker: how containers find each other
  19. Bind mounts vs volumes: permissions and ownership
  20. Docker logging drivers and log rotation explained
Domains and HTTPS 22 lessons
  1. Point a domain at your server (A record)
  2. DNS record types explained (A, CNAME, MX, TXT)
  3. HTTPS and Let's Encrypt: get a free certificate
  4. Redirect www to the bare domain (non-www redirect)
  5. Redirect HTTP to HTTPS (nginx and Caddy)
  6. Wildcard certificates explained (*.example.com)
  7. Inspect a TLS certificate with OpenSSL
  8. Check DNS records with dig
  9. DNS propagation and TTL explained
  10. Nginx reverse proxy with free HTTPS using certbot
  11. Renew Let's Encrypt certificates and test renewal
  12. Automatic HTTPS with Caddy
  13. What is a DNS zone? Zones, SOA and NS records
  14. TTL and DNS caching explained
  15. DNS propagation myths and what really happens
  16. Subdomains and wildcard DNS records explained
  17. CNAME flattening and ALIAS records explained
  18. How TLS certificates are issued (ACME, HTTP-01, DNS-01)
  19. Certificate chains and intermediates explained
  20. HSTS explained: the Strict-Transport-Security header
  21. Mixed content explained and how to fix it
  22. TLS versions and ciphers in plain language
Deploy and operate 18 lessons
  1. What is a reverse proxy? Explained with Caddy and nginx
  2. Zero-downtime deploys explained (health checks and traffic switch)
  3. How to roll back a bad release (Docker and Compose)
  4. Environment variables and secrets in Docker (.env, env_file)
  5. Backups and the 3-2-1 rule
  6. Monitor uptime simply
  7. Read container logs
  8. What is CI/CD?
  9. Blue-green vs rolling deploys
  10. Fix 502 Bad Gateway behind a reverse proxy
  11. Back up a Postgres database running in Docker
  12. Test a backup by restoring it
  13. Deploy an app with Docker Compose on a server
  14. Limit Docker log size so logs do not fill the disk
  15. What a worker and a cron job are (service types explained)
  16. Private networking between services: keep internals off the internet
  17. Canary releases explained: shipping to a few users first
  18. Feature flags vs deploys: separating release from shipping code
Fix it 10 lessons
  1. Fix SSH permission denied (publickey)
  2. Fix a full disk on a Linux server
  3. Fix 504 Gateway Timeout behind a reverse proxy
  4. Fix a Docker container that keeps restarting
  5. Fix port already in use (address already in use)
  6. Fix Let's Encrypt certificate errors
  7. Fix a domain that does not resolve
  8. Fix permission denied on a Docker volume
  9. Fix out of memory kills (OOM) on a Linux server
  10. Fix a deploy that passes health checks but serves errors
Git for deployers 10 lessons
  1. What is Git and why servers use it for deploys
  2. Install and configure Git on Ubuntu or Debian
  3. Your first Git repository: init, add, commit and log
  4. Undo mistakes in Git: restore, amend, reset, revert, reflog
  5. Git branches and merging: create, switch, merge, delete
  6. Resolve Git merge conflicts step by step
  7. Git remotes: push, pull and fetch explained
  8. SSH keys and deploy keys for Git on a server
  9. Gitignore and keeping secrets out of Git
  10. A Git workflow that triggers a deploy
Linux for servers 11 lessons
  1. Linux filesystem layout explained (/etc, /var, /usr, /home)
  2. Work with files safely on Linux (cp, mv, rm, find, grep)
  3. Read and edit files on Linux (cat, less, tail, nano, vim)
  4. Linux processes and signals (ps, kill, SIGTERM, SIGKILL)
  5. Linux users, groups and sudo explained (adduser, usermod, visudo)
  6. Linux environment variables and shell profile (PATH, .bashrc, export)
  7. Pipes, redirects and xargs in Linux (|, >, 2>&1, tee)
  8. Cron vs systemd timers: which to use for scheduled jobs
  9. Linux networking commands for servers (ip, ss, curl, dig, nc)
  10. Package management with apt on Ubuntu and Debian (and dnf)
  11. Disk usage and mounts on Linux (df, du, lsblk, fstab)
Web servers and proxies 8 lessons
  1. Nginx from scratch on Ubuntu: install, server blocks, reload
  2. Nginx reverse proxy for a Node app: headers, paths, timeouts
  3. Caddy from scratch: Caddyfile, file_server and reverse_proxy
  4. Nginx HTTPS with certbot: what it edits and how to harden it
  5. Gzip and caching headers in nginx: Cache-Control, ETag, expires
  6. Nginx rate limiting and security headers: limit_req and HSTS
  7. Websockets through a proxy: nginx Upgrade headers and SSE
  8. Load balancing across two backends with nginx upstream
Databases and data 8 lessons
  1. Install Postgres and connect with psql on Ubuntu or Docker
  2. Postgres roles and permissions for an app user and a read-only user
  3. Database connection strings explained for Postgres, MySQL and Redis
  4. Postgres backup and restore with pg_dump and pg_restore
  5. Upgrade Postgres to a new major version safely
  6. MySQL and MariaDB basics on Ubuntu: install, users, backups
  7. Redis basics, persistence and security on a server
  8. Database connection pooling and max connections for Postgres and MySQL
Server security 10 lessons
  1. Harden SSH server configuration (sshd drop-in file)
  2. Tune fail2ban jails and bans (bantime, findtime, recidive)
  3. Advanced ufw firewall rules (limit, allow from IP, delete, insert)
  4. Unattended security updates and reboots on Ubuntu
  5. Manage secrets on servers and containers (env files, Compose secrets)
  6. Run containers as non-root (USER, cap_drop, read_only)
  7. Scan Docker images with Trivy (severity, exit code, ignore)
  8. TLS and HTTP security headers checklist for nginx and Caddy
  9. Audit a Linux server (ports, users, sudo, cron, logins, lynis)
  10. Backups against ransomware (pull-based, offsite, append-only)
Monitoring and logs 10 lessons
  1. What to monitor first on a small server
  2. Uptime checks with a bash script and a systemd timer
  3. Log basics on Linux: journald, journalctl and logrotate
  4. Centralize logs with rsyslog or Loki
  5. Prometheus and node_exporter basics for a Linux server
  6. Grafana dashboards for CPU, memory and disk
  7. Alerting without alert fatigue: Prometheus and Alertmanager
  8. Disk, memory and CPU alerts that matter (Prometheus rules)
  9. Container metrics with cAdvisor and docker stats
  10. Build a public status page for your service
CI/CD and automation 10 lessons
  1. CI/CD pipeline stages explained, from push to production
  2. GitHub Actions workflow anatomy, explained line by line
  3. Run tests on every push and pull request with GitHub Actions
  4. Build and push a Docker image to GHCR with GitHub Actions
  5. Deploy over SSH from GitHub Actions with a restricted key
  6. Secrets and variables in CI pipelines, GitHub Actions guide
  7. Cache dependencies in GitHub Actions to speed up builds
  8. Matrix builds and branch protection in GitHub Actions
  9. Version and tag releases with semver, git tags and gh release
  10. Rollback and release strategy in a CI/CD pipeline