n8n is an open-source automation platform that connects apps and services to streamline repetitive tasks – all under your control.

If you want full control over your setup, self-hosting n8n is the way to go. But managing your own infrastructure doesn’t have to be complicated.

In this guide, you’ll learn how to deploy n8n using Docker, configure it securely with Nginx and SSL, and use RunCloud to handle the heavy lifting – from server setup to backups.

Let’s get started.

Why Host n8n with RunCloud & Docker?

Why Use RunCloud and Docker to Host n8n?

  • Full control – Keep your data and workflows on your own terms.
  • Simplified management – RunCloud handles your domain, SSL, and Nginx config.
  • Efficient setup – Docker keeps n8n isolated and updates easy.
  • Multi-app support – Run multiple apps on one server with ease.

Let’s explore how to get your n8n instance running smoothly with RunCloud.

Step-by-Step Instructions to Install n8n

Follow these steps to create your own n8n instance on your server:

You’ll need:

  • A cloud server (e.g., DigitalOcean, Vultr) connected to RunCloud
  • A domain or subdomain pointed to your server IP

If you use RunCloud’s Cloudflare integration, DNS setup takes just a few clicks during web app creation.

Step 1: Create a New Web Application in RunCloud

RunCloud makes it very easy to manage domain names, SSL certificates, and backups for your web applications. But before we can configure all that, you will need to create a dedicated web application for n8n:

  1. Log in to your RunCloud dashboard, navigate to “Web Applications“, and click “Create Web Application“.
  2. Application Name: Give it a descriptive name, e.g., “n8n-app”.
  3. Web Application Owner: Select your system user. For maximum security, it is recommended that you create a new user account for each web application.
  4. Domain Name: Enter the custom domain you’ll use for n8n (e.g., n8n.example.com). If you are using RunCloud’s Cloudflare integration, you can easily update necessary DNS records with a single click.
  1. PHP Version: You can select any PHP version; n8n itself doesn’t use it directly as it’s containerized, but RunCloud requires one to be set. The default is fine.
  2. Web Application Stack: For this setting, select “Native nginx + custom config” as we will be using this as a proxy to connect to the n8n Docker container.
  3. After configuring all settings, click “Create Web Application” to deploy the web application.
  1. SSL/TLS: Once the app is created, go to its SSL/TLS section in RunCloud. Use Let’s Encrypt to get a free SSL certificate. If you skip this step, you will get the following error later in the process:

Step 2: SSH into Your Server and Navigate to Your Web App Directory

After creating the web application, connect to your server via SSH. If you don’t know how to do this, read our documentation on How to Connect to Your Server via SSH to learn more.

After connecting to your server, navigate to the web application’s root directory you just created in RunCloud using the ‘cd’ command. Make sure to replace the path in the following command with the actual root path of your web application:

cd /home/runcloud/webapps/<app-name>

Step 3: Create the local-files Directory

In this directory, you can create a new directory that will be mapped to the Docker container. This will contain the web application data of your n8n instance. Execute the following command to create this directory:

mkdir local-files

This will store your n8n data and map it to your Docker container.

Step 4: Create the Docker Application

Now, let’s define and launch our n8n application using Docker. You have two ways to approach this. For a very quick start, you could use the following Docker run command:

docker run -d --rm --name n8n -p 5678:5678 -v my_n8n_data:/home/node/.n8n -v ./local-files:/files docker.n8n.io/n8nio/n8n

Once you run the above command, Docker will download and run the required containers for your application.

For more flexibility (custom env settings, time zones), use Docker Compose instead. See n8n’s Docker documentation for advanced setups.

Step 5: Configure nginx Reverse Proxy via RunCloud

After enabling the Docker container, you must configure a reverse proxy to route traffic to your container.

  1. In RunCloud, go to your n8n-app
  2. Under “nginx Config“, click “Create nginx Config
  3. Select: Proxy – Turn NGINX into a proxy server
  4. Name it n8n-proxy
  1. In the Content box, paste the following nginx configuration:
proxy_pass http://host:5678;
# > uncomment below line if you want to disable proxy buffering
# proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
# > websocket support. if you want to proxy websockets, uncomment 3 lines below
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
  1. After configuring the required settings, click “Create nginx Config“. RunCloud will test and apply this configuration on your server immediately.

Step 6: Access Your Secure n8n Instance

After enabling the proxy, open your web browser and go to the domain you configured for your web application (e.g., https://n8n.example.com).

If you use RunCloud’s built-in SSL manager, you will see the following n8n setup screen to create your account:

Step 7: Enable Backups

Don’t skip this. Backups protect your data and save time if anything breaks.

In your RunCloud dashboard, set up automated backups for your n8n-app. You can create daily snapshots of your files and easily restore them if needed.

Learn more in our backup guide.

Final Thoughts: Your Automation Journey and Beyond with RunCloud

You now have a secure, fully self-hosted n8n setup – managed through RunCloud and running in Docker.

But setting up n8n is just scratching the surface of what RunCloud can simplify for you. You can also use RunCloud to effortlessly host other applications without diving deep into complex server configurations. With RunCloud, you can easily deploy and manage:

  • Nextcloud: Your private cloud for files, calendars, and contacts.
  • WHMCS: The leading web hosting automation platform.
  • WordPress: The world’s most popular content management system.
  • FreeScout: A powerful open-source help desk and shared inbox.
  • Ghost CMS: A sleek and modern platform for professional publishing.
  • And much more…

RunCloud takes the hassle out of server administration, allowing you to focus on what you do best → building, creating, and automating.

Ready to simplify your server management? Sign up for RunCloud today.