A Guide to Self-Hosting n8n: Over 6+ Methods Explored
In this article, you'll learn how to set up n8n self-hosting in just a few minutes, followed by an exploration of several other methods. This guide is suitable for n8n beginners, seasoned pros, and anyone in between. The process will be detailed from start to finish, including the sign-up and service configuration steps, to provide a clear, unadulterated view of how everything works.
A Note on Evolving UIs: The user interfaces of hosting platforms change frequently. Instead of focusing on the exact button clicks shown here, concentrate on the general workflow, as the specific layout may have been updated since this article was published.
Method 1: Self-Hosting with Render
The first and simplest way to self-host is using Render. For those unfamiliar, Render calls itself "the fastest path to production" for good reason. You can get up and running with Render in just a couple of minutes. This is easily the simplest way to proceed.
First, create an account on their platform. After verifying your email, you will be taken to a dashboard. From there, you will want to find an area on the page that says Deploy a service and then select Existing Image.
You will need to paste the following image URL verbatim:
docker.io/n8n-io/n8n
n8n has a deployment method called Docker, which is a simple way to grab an image of the n8n installation. You can find this URL on the n8n Docker Hub page.
After pasting the URL, click connect. For the service plan, you have several options: - Free: Good for hobby projects, but note that the service will automatically spin down, which can be inconvenient. - Starter, Standard, or Pro: You will likely want to launch one of these plans depending on your usage. For a few workflows running every few minutes, the Starter plan is sufficient. For thousands of requests a minute, the Pro plan is more appropriate.
Once you select a plan, the service will begin to spin up the Docker image and set up your server.
Fun Fact: What Does n8n Mean? The creator of n8n revealed that it stands for 'nodemation' and is pronounced 'n-eight-n'. The abbreviated name was chosen simply because he preferred not to type as many characters.
After a couple of minutes, you will get a message that the editor is accessible at a provided link. Click the link, and you will have the ability to set up your owner account. After some simple onboarding questions, your n8n instance will be ready. You can start any workflow you want from scratch, running entirely on your own server.
Because it's a Docker image, it will be up-to-date. This is by far the simplest and easiest way to get up and running.
It should be noted that this isn't the only way to set up n8n on Render, and this guide has glossed over a fair number of configuration options. To explore these, check the n8n Docker page for environment variables that allow you to switch the database, modify encryption, and more. Searching for "n8n community environment variables" will also yield different settings people use to optimize their installations.
Method 2: Self-Hosting with Railway
The second simplest way to set up n8n in a self-hosted environment is using Railway. Railway is very similar to Render, allowing you to quickly spin up servers and databases. The sign-up here is a little different, as you will have to continue with a GitHub account.
For this method to work, you need a GitHub profile. Simply sign up for an account on github.com, then go back and authorize the Railway app.
Once your account is set up, move on to deploy a template. The one you will want to click is n8n with workers, which is currently the most popular one on the platform. Type in "deploy," and the process will begin, spinning up an n8n instance with workers, a PostgreSQL database, and Redis.
The specifics of the implementation aren't necessary to understand until you get up and running. The purpose is to get a self-hosted n8n instance accessible via a public URL.
At a certain point, the page will show that all services have turned green, indicating the deployment process is complete. You will get updates on the right-hand column showing that various deployments were done. Eventually, all nodes will have green checkmarks. All you have to do is go back to the primary service and click the provided URL. It will open your n8n instance, and you can proceed with the onboarding as before.
Method 3: Self-Hosting with DigitalOcean
The third simplest way to get n8n up and running is using DigitalOcean, which has a one-click n8n install template.
After signing up for an account and entering payment details, you can get everything up and running easily. Go to the DigitalOcean Marketplace and search for "n8n." It will be a one-click install.
Click Create n8n Droplet. It will connect back to your account, and you can select the specific server region you want. It should automatically select an Ubuntu version. You will have to create a root password for the server.
Once that's done, create the droplet. This will initiate the deployment procedure, similar to what we've seen before, though DigitalOcean obscures some of the deployment data.
After a few minutes, your droplet should be up and running. The issue with DigitalOcean, and the reason this method is third, is that you cannot just access it via the IPv4 address. You have to add the IP to a domain using DNS.
In your domain provider's DNS settings, add an A record. The host will be n8n
(or your preferred subdomain), and the IP address will be the one provided for your droplet. This will provide a publicly accessible URL like n8n.yourdomain.com
that routes to the server.
After that, go to the Console in your DigitalOcean dashboard. This will open a terminal window. Press enter, then enter the domain name you just configured and an email address for the encryption protocol. You can skip the time zone setup. The script will run some additional configuration options.
Once it's done, it will say "Installation complete" and provide the URL to access your new n8n server. You can now navigate to that address and set up your owner account.
Method 4: Self-Hosting with Heroku
Another way to set up n8n is using Heroku. Heroku is an older platform, but the process is straightforward. Search for "n8n Heroku" to find a GitHub repository that has a native Deploy to Heroku button.
Clicking this button will take you to Heroku, where you will need to sign up for an account. The sign-up process requires setting up two-factor authentication (2FA), for which you can use an app like Google Authenticator.
Once signed in, you can go back to the n8n Heroku GitHub install and click Deploy to Heroku again. This will perform a one-click deploy. You will need to provide an app name and change the encryption key to a random string. The app name will be the Heroku application name you chose.
As this is a one-click deploy, all configuration settings are handled automatically. You will see some config vars, which are the same as the environment variables in Render and Railway. Let it run, and you will get a series of green checkmarks.
Click View to access your instance. Because HTTPS is not automatically installed in this flow, you will likely get a "dangerous site" warning. You can proceed by clicking visit this unsafe site. There is no real difference in safety; the site is your own, it just lacks the SSL protocol. From there, you can complete the onboarding and start using your n8n installation.
Method 5: Self-Hosting on a Local Machine with Docker
The next way to self-host n8n is to do it on your own computer using Docker. This can be done on a laptop or a dedicated server rack. This method is not recommended unless you know what you are doing, but it is included for completeness.
Head over to docker.com and download the Docker Desktop version for your operating system. Once installed, you can search for the n8n image. Look for n8n-io/n8n
.
Click pull to set this up on your computer. Once pulled, you will want to run it. You can also do this through the terminal, but Docker Desktop is an easier way to get started.
When you run the image, it will ask for some optional settings. You can set the local port to 5678
. Leave the other variables as is and give the container a name. The deployment will be very fast since it's on your local machine. Click the port link, and you will be at localhost:5678/setup
, which is your own server running n8n directly on your computer.
Because you have more server resources than a typical cloud instance, everything will run much faster. However, this complicates the process because your webhook URLs are all local. To make them accessible from the internet, you need to find a way to expose your local instance.
To do this, when you run the Docker container, you need to set the WEBHOOK_URL
environment variable to your public-facing domain (e.g., https://n8n-nick.leftclick.io/
). This still isn't enough. You will need to set up NGINX, which is an HTTP web server, to forward requests from that public address to your local host.
There is a ton of great documentation on this topic. Feel free to check out the n8n documentation on configuration and environment variables, and search for "n8n NGINX" for guides on how to complete this setup.
Method 6: Self-Hosting with Hostinger
The last easy and quick way to set up n8n is using Hostinger. Hostinger is very similar to the other tools mentioned here, but it holds your hand through the process a bit more.
Search for "n8n hostinger," and it will take you to a page with a one-click VPS template. You can select your subscription term and create an account.
Once you're in, click Get Started to go to the HPanel (Hostinger Panel), which has a guided setup. Choose the default options. The template you are looking for is n8n. You will need to set up a root password, similar to the DigitalOcean setup.
Save the settings and click Finish Setup. It will run through the process of setting up your VPS. After that, you will get a message that the VPS is ready. Click Manage VPS, head to Panel access, and click on the Login URL. This will take you to the familiar n8n sign-up page, and you can proceed with the onboarding.
Join the 10xdev Community
Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.