Self-host n8n on Linode with Dokploy (2026 guide)

Deploy n8n on a Linode VPS with Dokploy. Set up Docker, HTTPS, and webhooks, then run a test workflow.

I use Dokploy to deploy n8n on a Linode VPS. n8n is a fair-code automation platform with a visual workflow builder, over 400 integrations, and nodes for AI workflows. Dokploy runs the n8n container and handles routing and certificates.

Hosting cost

The prices below are the ones I used for this guide. With self-hosted n8n, you pay for the server and set your own execution capacity with the resources you give it. You also run the instance that stores your workflow data.

PlanMonthly costWorkflow executionsWhere data lives
Zapier Starter$29.99750 tasksZapier’s servers
n8n Cloud Starter$242,500 executionsn8n’s servers
Self-hosted on a 4 GB LinodeAbout $24Limited by server capacityYour instance
Self-hosted on a Linode NanodeAbout $6Limited by server capacityYour instance

I use the 4 GB plan for this guide. A $6 Nanode can handle low-volume workflows if you’re trying out n8n before committing to a larger instance.

What you’ll need

  • A Linode account. Check whether you qualify for the $100 new-account credit.
  • A domain or subdomain you can point to the server.
  • Ubuntu 22.04 or Debian 11. Allow at least 2 GB of RAM and 30 GB of disk space. The walkthrough uses 4 GB of RAM.
  • A terminal and about 30 minutes.

Step 1. Set up your Linode server

Create a Linode instance

  1. In your Linode account, click Create Linode.
  2. Choose Ubuntu 22.04 LTS and select a region close to you or your users.
  3. Select the Shared CPU 4 GB plan for the setup in this guide.
  4. Set a strong root password and store it in your password manager. Add your SSH key if you have one.
  5. Click Create Linode. Copy the instance’s IP address after it boots.

Connect and update the system

Open a terminal or PuTTY and connect over SSH.

ssh root@YOUR_LINODE_IP

On the first connection, SSH asks you to confirm the server’s fingerprint. Compare it with the instance’s fingerprint before accepting it.

Update the system packages.

apt update && apt upgrade -y

Step 2. Point your domain to Linode

Set DNS while the packages update.

  1. Open the DNS dashboard for your domain.
  2. Create an A record named @ for the root domain or automation for the subdomain.
  3. Use the Linode IP address as the value. Set the TTL to 300 seconds or the provider’s automatic setting.
  4. If you use multiple subdomains and want them to resolve to this Linode, add an A record for *.yourdomain.com pointing to the same IP.

DNS changes can show up within 15 minutes, but allow up to 24 hours for propagation.

Step 3. Install Dokploy

Run Dokploy’s installer on the Linode.

curl -sSL https://dokploy.com/install.sh | sh

The installer sets up Docker, Docker Compose, Traefik, and the Dokploy dashboard. After it finishes, open the dashboard in your browser.

http://YOUR_LINODE_IP:3000

Create an admin account with your email address, a strong password, and an organization name.

Step 4. Deploy n8n from the Dokploy template

Create a project

  1. In Dokploy, open Projects and click Create Project.
  2. Name it n8n-automation or choose your own name.
  3. Add a description if you want one, then click Create.

Choose the n8n template

  1. Open the project and click Create Service.
  2. Select Templates, search for n8n, and choose the template.

The Docker Compose configuration looks like this.

version: "3.8"
services:
  n8n:
    image: docker.n8n.io/n8nio/n8n:latest
    restart: always
    ports:
      - "5678:5678"
    environment:
      - N8N_HOST=${N8N_HOST}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${N8N_HOST}/
      - GENERIC_TIMEZONE=Europe/Berlin
    volumes:
      - n8n_data:/home/node/.n8n

Set environment variables

In Environment, set the following values.

VariableValue
N8N_HOSTYour hostname, such as automation.yourdomain.com
GENERIC_TIMEZONEYour time zone, such as Asia/Kolkata or America/New_York
N8N_ENCRYPTION_KEYA random key. Generate one with openssl rand -hex 32.

Keep a copy of the encryption key. n8n uses it to encrypt saved credentials and needs the same key to read them.

Add the domain and enable HTTPS

  1. Open the service’s Domains tab and click Add Domain.
  2. Enter your domain, such as automation.yourdomain.com.
  3. Turn on HTTPS and Generate SSL Certificate.

Traefik requests and renews the certificate through Let’s Encrypt.

Deploy the service

Click Deploy. Watch the service logs for Docker to pull the image, start the container, and report that n8n is listening on port 5678.

Pulling image docker.n8n.io/n8nio/n8n:latest...
Starting container...
n8n ready on port 5678

Step 5. Create your n8n owner account

Open https://automation.yourdomain.com. If Let’s Encrypt is still issuing the certificate, give it a few minutes and try again. At the welcome screen, enter your email, first and last name, and a strong, unique password. Click Continue to open the workflow canvas.

Step 6. Run a test workflow

  1. Click New Workflow and add a Manual Trigger node.
  2. Add a Code node and enter return [{json: {message: "Hello from my self-hosted n8n!"}}];
  3. Click Execute Workflow. The Code node’s output should contain the test message.

Backups, scaling, and updates

Set up volume backups

Open Volume Backups in the n8n service. Choose a schedule, such as once a day, and a destination such as S3-compatible storage.

Migrate from SQLite to PostgreSQL

n8n starts with SQLite. For a larger production workload, you can use PostgreSQL.

  1. In Dokploy, choose Create Service → Database → PostgreSQL. Set a strong password and save the service name, such as postgres.

  2. Add these variables to the n8n service’s environment.

    DB_TYPE=postgresdb
    DB_POSTGRESDB_HOST=postgres
    DB_POSTGRESDB_PORT=5432
    DB_POSTGRESDB_DATABASE=n8n
    DB_POSTGRESDB_USER=postgres
    DB_POSTGRESDB_PASSWORD=your_postgres_password
  3. Before switching databases, export your existing workflows as JSON through Settings → Import/Export in n8n.

  4. Redeploy n8n. It creates its tables in PostgreSQL on the first start.

  5. Import the workflows through Settings → Import/Export → Import from file.

Keep the SQLite volume mounted for a few days so you have a fallback during the migration.

Monitor CPU and memory

Check both in the Dokploy monitoring dashboard. As a starting estimate, allow 200 to 500 MB for a light load and 1 to 2 GB under heavier use. If your instance is running out of memory, check which workflows are running and consider a larger Linode plan.

Run executions in queue mode

If many workflows run at once, queue mode lets the main instance receive requests while worker instances execute workflows.

  1. Add Redis using the Dokploy Redis template.
  2. Set EXECUTIONS_MODE=queue, QUEUE_BULL_REDIS_HOST=redis, and QUEUE_BULL_REDIS_PASSWORD=your_redis_password in the n8n environment.
  3. Start worker instances that use the same PostgreSQL database, Redis connection, and encryption key as the main instance.

See the full setup in the n8n queue mode documentation.

Update n8n

Check the n8n release notes, set your service’s image tag to the version you want, and click Deploy. For example, the image name with a version tag takes the form docker.n8n.io/n8nio/n8n:1.104. Check the service logs after the deploy.

Troubleshooting

Cloudflare 522 and 524 timeouts

A 522 means Cloudflare timed out contacting the origin. Check that the A record points to the Linode IP and that the Linode firewall allows ports 80 and 443. You can check Cloud Firewall in the dashboard or run ufw status on the server.

A 524 can occur when Cloudflare reaches the origin and waits too long for its response. If a webhook takes longer than the proxy allows, have the workflow return a response before it finishes the longer task. Changing n8n’s execution timeout leaves the proxy’s timeout in effect.

Let’s Encrypt certificate is missing

  1. Make sure ports 80 and 443 are reachable. Let’s Encrypt needs port 80 for the HTTP-01 challenge.
  2. Check Domains → your domain → Logs in Dokploy for acme errors. If Let’s Encrypt rate-limited a request, wait until the limit resets before trying again.
  3. Check whether the DNS record resolves to your server with dig +short automation.yourdomain.com.
  4. If you proxy the domain through Cloudflare, try setting the hostname to DNS only during certificate setup. Re-enable the proxy with Full (strict) after confirming that the origin serves a valid certificate.

The n8n container keeps restarting

Check Dokploy → your Compose service → Logs.

  • If n8n reports an encryption key mismatch, restore the key that encrypted the saved credentials. If you supply no key on a fresh install, n8n generates one and saves it to its data folder. See n8n’s encryption key documentation.
  • If another service uses host port 5678, change the host port in the Compose file.
  • If n8n can’t write to its data volume, check that the node user with UID 1000 owns it. On a reused volume, you can correct ownership with docker exec -u root <container_id> chown -R node:node /home/node/.n8n.

Webhooks don’t fire

  1. Set WEBHOOK_URL to the public URL, including the trailing slash, such as https://automation.yourdomain.com/.
  2. Make sure N8N_HOST uses the same hostname.
  3. Redeploy after changing the environment variables.
  4. Test an active workflow with curl -X POST https://automation.yourdomain.com/webhook/test-path. If you get a 404, check the path and whether the workflow is active. If the connection fails, check DNS, routing, and the firewall.

SQLite reports “database is locked”

SQLite can lock the database while one process writes and another tries to write. If you suspect corruption after an unclean shutdown, run an integrity check.

# SSH into your server, then:
docker exec -it <n8n_container_name> sh
cd /home/node/.n8n
sqlite3 database.sqlite "PRAGMA integrity_check;"

If SQLite returns anything other than ok, restore from your last Dokploy volume backup.

The domain doesn’t load

  • Use nslookup automation.yourdomain.com to check DNS.
  • Confirm that Linode Cloud Firewall allows incoming traffic on ports 80 and 443.
  • Check the Dokploy logs and make sure the hostname in Traefik matches the domain you opened.

The instance uses too much memory

You can restart the n8n service from Dokploy if it stops responding. For ongoing pressure, give the instance more RAM or use queue mode to move workflow executions to workers.

A first workflow to run

Try a task you do by hand. You could sync a Google Sheet with Airtable or your database, schedule posts on Twitter, LinkedIn, or Instagram, or send a message when a deployment fails. You can also call a model for part of a workflow or automate invoice generation and onboarding.

I like this setup because I can deploy from a template, see what is running, and decide how much server capacity to buy. The same Dokploy project workflow also works for services you might want alongside n8n, such as a database or an API.

Documentation