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