How to Set Up n8n on a VPS
n8n connects APIs and automates tasks (webhooks, CRMs, alerts). Self-hosting on a VPS avoids cloud-plan limits.
Steps
Create a data folder and start n8n:
Blog
Hands-on tutorials on Linux, security, networking, and game servers, written so you can follow along step by step.
n8n connects APIs and automates tasks (webhooks, CRMs, alerts). Self-hosting on a VPS avoids cloud-plan limits.
Create a data folder and start n8n:
BookStack is a wiki organized as books and chapters. Ideal for internal team docs on your own VPS.
Create Compose with App + MySQL:
Jellyfin is a free media server for movies, shows and music. On a VPS with enough disk you host your library and stream from anywhere.
Prepare config and media folders:
mkdir -p ~/jellyfin/{config,cache,media}# Copy or mount your files into ~/jellyfin/mediaStart Jellyfin (port 8096):
Vaultwarden is a light Bitwarden-compatible server. Perfect for keeping passwords on your own VPS instead of SaaS.
Create the Compose project:
Ghost is a modern CMS for blogs and newsletters. On a VPS you run it with Docker and expose it with Nginx + SSL.
Ensure Docker is running:
docker --versionsudo systemctl enable --now dockerCreate a folder and start Ghost on port 2368:
Wrong time breaks TLS, logs and cron. chrony is the recommended NTP client on modern Ubuntu to keep the VPS clock aligned.
Install chrony and start the service:
sudo apt updatesudo apt install -y chronysudo systemctl enable --now chronyReview NTP sources (defaults are usually fine):
Cockpit is a light web console for the OS: metrics, logs, services and a terminal. A modern alternative to heavier panels on an Ubuntu VPS.
Install Cockpit:
sudo apt updatesudo apt install -y cockpitsudo systemctl enable --now cockpit.socketConfirm it listens on 9090:
Caddy is a web server with automatic HTTPS (Let’s Encrypt) and no Certbot. Great for simple sites and reverse proxies on a VPS.
Add the official repo and install Caddy:
Without swap, a memory spike can OOM-kill processes. A 1–2 GB swap file on a 1–2 GB RAM VPS is usually a sensible cushion.
Check whether swap already exists:
free -hswapon --showCreate a 2G file, format and enable it:
WireGuard is a modern, fast VPN with a small config. On a VPS it lets you reach internal services or egress with the server IP.
Install WireGuard and tools:
sudo apt updatesudo apt install -y wireguard wireguard-toolsGenerate server keys (keep the private key secret):