How to choose a VPS for n8n and deploy it without surprises
n8n is an automation builder you can install on your own server instead of paying for a cloud subscription. A self-hosted install removes the limits on the number of executions and workflows, and your data and service credentials stay with you. The cost is a virtual server and half an hour of setup.
How many resources n8n needs
n8n itself is a Node.js application; when idle it takes a few hundred megabytes of memory. The load comes from workflows: large API responses, files, loops over thousands of records, Code nodes. Rough guidelines:
- 1–2 GB RAM, 1 core — personal automations, dozens of executions an hour, an SQLite database.
- 2–4 GB RAM, 2 cores — a team's working instance with PostgreSQL in a neighbouring container. This is the minimum set in the filter on this page.
- 4–8 GB RAM or more — queue mode with workers, processing PDFs and images, long AI chains.
An ordinary plan handles calls to external AI models through AI nodes. But if the model has to run on the server itself, the memory requirements are entirely different — see VPS for running AI models on CPU.
Docker, Postgres and the encryption key
The most convenient way to install n8n is with Docker Compose: an n8n container, a PostgreSQL container and a reverse proxy. Docker needs full virtualization, so choose KVM; more about preparing the server on the VPS for Docker page.
By default n8n stores everything in SQLite. That's enough for a trial, but as the execution history grows the database file swells, and queue mode doesn't work with SQLite. PostgreSQL is more reliable and easier to back up with pg_dump.
Set the N8N_ENCRYPTION_KEY variable explicitly and keep a copy of it off the server. All saved credentials are encrypted with this key: without it, a database backup won't restore access to your services.
Webhooks and HTTPS
Many triggers — bots, payment systems, website forms — send events to a webhook, and almost all of them require HTTPS with a valid certificate. You need a domain or subdomain pointing to the server's IP and a proxy like Caddy or nginx with a Let's Encrypt certificate. Put the public address in WEBHOOK_URL, otherwise nodes will show internal links to localhost:5678.
Don't expose port 5678 to the outside. Docker publishes ports bypassing ufw, so bind the container to 127.0.0.1 and let the editor through only via the proxy.
Queue mode
When one process can no longer keep up, n8n is switched to queue mode: the main instance receives webhooks and puts jobs into Redis, and separate workers execute them. You need PostgreSQL, Redis and the same encryption key for all processes. This setup fits comfortably on one VDS with 4–8 GB of memory; it's worth moving workers to separate machines when they run short of cores.
Where to put the server
Look at what your workflows work with. For American and European APIs, a server in Europe or the USA is convenient: some services restrict requests from certain regions. For local CRMs, banks and marketplaces, a server in your own country makes more sense. Set the country in the filters; the payment methods for each plan are shown in the "Payment" column, with prices already in your currency.