Skip to content

How Do I Install n8n on My Own Server? (Docker Setup and n8n Cloud Comparison)

· 5 min read

n8n is a visual workflow automation tool that connects your apps, data and AI services without writing code. You can use it in two ways: on n8n Cloud, n8n's own hosted service, or on your own server. In this guide we cover what you need to self-host n8n, walk through the official Docker Compose setup step by step and compare n8n Cloud with running it on your own server.

What You Need to Run n8n on Your Own Server

  1. A Linux server (VPS): For personal use and a handful of workflows, 1 vCore and 2 GB of RAM are enough to start. Team use, AI nodes and many concurrent executions need more memory.
  2. Docker Engine and Docker Compose: n8n recommends Docker Compose for production setups.
  3. A subdomain: For example n8n.example.com, with an A record pointing to the server's IP address. Your webhook URLs are built on this domain.
  4. Open ports: 80 and 443 for Traefik, which obtains the SSL certificate. n8n's own port 5678 isn't exposed to the outside.
  5. A database: The default SQLite is enough for most setups; PostgreSQL is preferred for heavy use and for Queue Mode.

n8n Cloud or Your Own Server?

Option Pricing Limits Setup and maintenance Your data
n8n Cloud Subscription based on monthly executions Monthly executions, concurrent executions and run time, depending on the plan Handled by n8n In n8n's cloud
Your own install on an unmanaged VPS Fixed server fee Only the server's resources Setup, SSL, updates and backups are on you On your own server
zuwinasa cloud n8n Server Fixed server fee Only the server's resources Delivered with n8n installed, linked to your domain and with SSL; updates are yours, with support when you get stuck On your own server in ISO 27001-certified European data centers

n8n Cloud means no server maintenance, but the cost grows with your executions. On your own server you pay the same for a hundred or a hundred thousand executions a month; in return, maintaining the server is up to you.

Step-by-Step Setup: n8n with Docker Compose

1. Prepare the Server

Connect to your Ubuntu or Debian server over SSH and install Docker with the official convenience script:

curl -fsSL https://get.docker.com -o get-docker.sh, then sudo sh get-docker.sh

Verify the installation with docker --version and docker compose version. In the firewall, keep only ports 22 (SSH), 80 and 443 open.

2. Point the Subdomain to the Server

In your domain's DNS settings, create an A record named n8n with your server's IP address. Check that the record has propagated with dig +short n8n.example.com; don't move on until it returns the server's IP address, or the SSL certificate can't be issued.

3. Create the Project Folder and Settings

Create a folder with mkdir ~/n8n-compose && cd ~/n8n-compose and add a subfolder called local-files. In the same folder, create a .env file with your own values:

  • DOMAIN_NAME=example.com
  • SUBDOMAIN=n8n
  • GENERIC_TIMEZONE=Europe/London (scheduled workflows run on this time zone)
  • [email protected] (for certificate notifications)

Then copy the compose.yaml file from the Docker Compose page of the n8n documentation into the same folder. It starts n8n together with Traefik, which obtains the SSL certificate from Let's Encrypt; taking the file from the documentation ensures you use n8n's current settings.

4. Start n8n

Run sudo docker compose up -d. Within a few minutes, n8n's setup screen opens at https://n8n.example.com, where you create the owner account. Protect this account with a strong password: an n8n interface exposed to the internet is the gateway to every service you connect.

5. Plan Backups and Updates

n8n's database, your workflows and the encryption key live in the Docker volume n8n_data; back it up regularly to a location outside the server. To update, take a snapshot of the server first, read n8n's release notes, then run sudo docker compose pull and sudo docker compose up -d.

Note: n8n stores the API keys and passwords you save using its encryption key. If the key is lost, your workflows may come back but the credentials can't be decrypted, and you'll have to enter all of them again. Make sure your backup contains the entire n8n_data volume.

n8n Server at zuwinasa cloud

If you'd rather skip the setup, our n8n Server plans come with n8n installed on Docker, linked to your domain and secured with Let's Encrypt SSL, and you keep full root access. The Start, Pro and Scale plans offer 1, 2 and 4 vCores with 2, 4 and 8 GB of RAM: Start suits personal automation, Pro team and AI workflows, and Scale heavy workloads that need Queue Mode. There are no limits on workflows or executions, and as you grow you can move to a larger plan with your data intact.

If you want to run other services alongside n8n, you can follow the same steps yourself on a Cloud VPS with root access. We explain what server maintenance involves in our guide on managing a VPS without Linux skills.

Frequently Asked Questions

Is n8n free?

Self-hosted n8n runs as the free Community edition when no license key is set, so you only pay for the server. Some team and enterprise features require a Business or Enterprise license. n8n Cloud is a subscription priced by the number of monthly executions.

How much RAM does n8n need?

For personal use and a handful of workflows, 2 GB of RAM is a reasonable start. For team use, AI nodes or workflows that process large amounts of data, 4 GB or more is more comfortable. If you plan to run several workers in Queue Mode, consider a server with at least 8 GB.

Can I install n8n on shared hosting?

On most shared hosting, no. n8n is a long-running process that must be reachable from outside for webhooks, and the recommended setup requires Docker, which shared environments usually don't allow. That's why n8n is typically run on a VPS with root access or on a server with n8n preinstalled.

Can I move my workflows from n8n Cloud to my own server?

Yes. You can download your workflows from n8n Cloud as JSON files and import them into n8n on your own server. Credentials such as API keys and passwords are stored with a different encryption key and don't carry over, so you'll need to enter them again on the new server.

Ready to take your project live?

Go live in minutes with Plesk Obsidian, AMD EPYC processors and free migration support.