Skip to content
Live $300 credit for new accounts Valid for 60 days from account creation Get started →

n8n

n8n is an open-source workflow automation platform that lets you connect apps, APIs, and services using a visual node-based editor. It supports hundreds of integrations and can run custom JavaScript logic inside workflows.

ComponentVersion
n8n1.121.0
DockerLatest stable
Docker ComposeLatest stable
Ubuntu24.04 LTS
ssh ubuntu@<your-vm-ip>

On the first boot, a setup script runs automatically. It:

  • Generates a random encryption key for securing credentials stored in n8n
  • Writes the environment configuration to /opt/n8n/.env
  • Starts n8n using Docker Compose

This takes under 60 seconds. Track progress:

journalctl -u n8n-first-boot.service -f

Open a browser and navigate to:

http://<your-vm-ip>:5678

On the first visit, n8n will prompt you to create an owner account (email and password of your choice). This account is stored locally on the VM.

If n8n will be accessible via a domain name, provide the URL at deploy time using cloud-init userdata. This allows webhooks to use your domain instead of the VM’s IP.

Add this to your VM’s userdata at deploy time:

#cloud-config
write_files:
- path: /run/n8n-webhook-url
content: 'https://n8n.example.com'
permissions: '0600'
owner: root:root

If no URL is provided, n8n defaults to http://<vm-ip>:5678.

n8n runs as a Docker Compose service in /opt/n8n.

# Check status
cd /opt/n8n && docker compose ps
# Restart
cd /opt/n8n && docker compose restart
# View logs
cd /opt/n8n && docker compose logs -f
# Stop
cd /opt/n8n && docker compose down
# Start
cd /opt/n8n && docker compose up -d

Workflow data is persisted in /opt/n8n/data.

Environment configuration: /opt/n8n/.env

Port 5678 is accessible on the VM’s network interface. UFW is enabled and allows SSH (port 22) only by default.

To allow browser access from a specific IP:

sudo ufw allow from <trusted-ip> to any port 5678

To access the UI without opening the firewall, use an SSH tunnel:

# Run this on your local machine
ssh -L 5678:localhost:5678 ubuntu@<your-vm-ip>
# Then open in browser
http://localhost:5678

For production use, place n8n behind a reverse proxy with HTTPS and a domain name, then set N8N_SECURE_COOKIE=true in /opt/n8n/.env.