Self-Hosted n8n on a VPS: A Getting Started Guide
Preconfigured or manual installation with Docker, HTTPS, webhooks, backups: the steps to run n8n on your own VPS.
n8n connects your applications, APIs and databases in visual workflows. Hosting it yourself on a VPS keeps you in control of your data and configuration. Here are the steps to get started properly, from installation to your first workflow.
- Self-hosted n8n keeps your workflows and credentials on a server you administer.
- Plan for at least 2 GB of RAM, with Debian and Docker as the base.
- The preconfigured n8n VPS installs Docker, the persistent volume and HTTPS at no extra cost.
- Keep port 5678 closed and use an HTTPS reverse proxy for webhooks.
Why self-host n8n
n8n comes as a cloud version, managed by its publisher, and as a self-hosted version that you install wherever you like. On your VPS, credentials, workflow data and execution history stay on a machine you administer, with root access. In return, updates, backups and security are your responsibility.
- Workflow data and credentials on your own server.
- Root access to add tools or services alongside n8n.
- Updates, backups and firewall under your responsibility.
Choose the VPS
n8n runs in a Docker container on Linux. Plan for at least 2 GB of RAM, and more if your workflows process large volumes of data or run frequently. Debian is an excellent base: lightweight, stable and well suited to Docker. To compare the criteria for a virtual server, read our guide to choosing a VPS in 2026.
- At least 2 GB of RAM, more for heavy or frequent workflows.
- Debian as the base system, with Docker.
- A domain name or subdomain for HTTPS access.
Preconfigured or manual installation
The simplest option is the preconfigured n8n VPS: selected when ordering at no extra cost, it installs n8n with Docker, a persistent volume and automatic HTTPS on your domain or on a free aclclouds.online subdomain. To keep control over every setting, follow the guide to install n8n on a VPS instead: Docker Compose, /opt/n8n folder, domain and time zone.
- Preconfigured: the container, persistent volume and certificate are created automatically.
- Manual: a Compose file, then the docker compose up -d command.
- Either way, root access to the VPS remains yours.
HTTPS and webhooks
External services that call your webhooks generally require an HTTPS address. n8n's port 5678 should only listen locally, behind a reverse proxy such as Caddy or Nginx that handles the certificate. Also set the public URL in the n8n configuration (WEBHOOK_URL), otherwise the webhook addresses displayed will be wrong. The guide to expose an n8n webhook over HTTPS covers DNS, Caddy and the firewall.
- A DNS A record pointing to the VPS IPv4 address.
- Ports 80 and 443 open, port 5678 closed to the public network.
- N8N_HOST, N8N_PROTOCOL and WEBHOOK_URL set in the configuration.
First workflow, backups and updates
An n8n workflow combines a trigger, transformations and actions. Start with a manual trigger for testing, then replace it with a schedule or a webhook. The guide to create your first n8n automation, for example, sends a message to Discord. Then back up the n8n data volume regularly and export your workflows before every Docker image update.
- Test with a manual trigger before publishing the workflow.
- Store secrets in n8n credentials, never in plain text in a node.
- Keep a copy of the n8n volume off the VPS, following the 3-2-1 rule.
Frequently asked questions
Is n8n free when self-hosted?
The n8n community edition can be self-hosted without a subscription, under the terms of its license. You pay for the server that hosts it, and some advanced features are part of the publisher's paid plans.
How much RAM does n8n need?
Plan for at least 2 GB. Frequent workflows, large files or many parallel executions require more: monitor memory in the VPS statistics from the panel.
Does the preconfigured n8n VPS cost more?
No. The preconfigured n8n solution is available at no extra cost: you only pay for the VPS you choose, and you keep root access.
Do I need a domain name for n8n?
Not with the preconfigured solution, which can use a free aclclouds.online subdomain. With your own domain, add an A record pointing to the VPS IPv4 address.