
n8n is a powerful open-source workflow automation tool — a self-hosted alternative to Zapier or Make. Connect applications and services into complex automations that stay fully under your control.
Log in to your server via SSH and create a directory for n8n. Inside it, create the Compose file and a .env file for your configuration variables:
Paste the following content into the docker-compose.yml file:
Binding to 127.0.0.1:5678 ensures n8n is only accessible locally for security reasons. External access is handled by the reverse proxy in Step 4.
Open the .env file with nano .env and paste the following content. Adjust the values to match your setup:
WEBHOOK_URL is critical: This variable must be set to the final, public URL of your n8n instance — otherwise webhooks will not function correctly. When using HTTPS, it must start with https://.
Start the n8n container with the following command. Docker will pull the image and start the container in the background.
Since n8n is only accessible locally by default (127.0.0.1:5678), you must set up a reverse proxy to access it from the internet via your domain. The reverse proxy forwards requests from your public domain (e.g. https://n8n.yourdomain.com) to the local n8n container and handles HTTPS termination.
Common tools for this are Nginx Proxy Manager, Traefik, or Caddy. All three can run as Docker containers and integrate well with this setup.
Once your reverse proxy is configured, open your browser and navigate to your n8n domain (e.g. https://n8n.yourdomain.com).
On first load, you will be prompted to create an owner account — enter an email address and a secure password. This will be your main administrator account for n8n.
For advanced configuration, workflow templates, and integration guides, refer to the official n8n documentation.