{"id":2062,"date":"2026-10-07T19:07:29","date_gmt":"2026-10-07T13:37:29","guid":{"rendered":"https:\/\/kwikserver.com\/tutorials\/?p=2062"},"modified":"2026-10-07T19:07:29","modified_gmt":"2026-10-07T13:37:29","slug":"self-host-n8n-docker-nginx","status":"publish","type":"post","link":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/","title":{"rendered":"How to Self-Host n8n with Docker Compose and Nginx (2026)"},"content":{"rendered":"<p>To self-host n8n with Docker Compose and Nginx, run the n8n container bound to localhost on port 5678, put an Nginx server block with WebSocket headers in front of it, and add a Let&#8217;s Encrypt certificate. Then set <code>WEBHOOK_URL<\/code> and <code>N8N_PROXY_HOPS=1<\/code> so webhooks and the editor work behind the proxy.<\/p>\n<p>n8n&#8217;s own Compose guide uses Traefik, and its other server guides use Caddy. This guide is for people who already run Nginx on the server, or want to, and need the proxy settings that those guides leave out. It also covers running n8n next to another tool on the same server, backups and the errors a proxy setup tends to cause.<\/p>\n<p>Tested on Ubuntu 24.04.5 LTS with n8n 2.42.4 in October 2026.<\/p>\n<h2>What do you need to self-host n8n?<\/h2>\n<p>A Linux VPS with root SSH access, a subdomain pointed at it, and about half an hour.<\/p>\n<ul>\n<li><strong>A VPS running Ubuntu.<\/strong> The commands below are written for Ubuntu 24.04 and work the same way on Debian.<\/li>\n<li><strong>A subdomain.<\/strong> Create an A record such as <code>n8n.yourdomain.com<\/code> that points to the server&#8217;s IP address. Do this first so DNS has updated by the time you request the certificate.<\/li>\n<li><strong>Some comfort with a terminal.<\/strong> n8n&#8217;s docs recommend self-hosting for people who are used to managing servers, and point everyone else to n8n Cloud. That is fair advice. You are responsible for updates, backups and security.<\/li>\n<\/ul>\n<p>This guide installs n8n by itself. It does not include the separate sandbox stack that n8n&#8217;s newer Compose guide adds for its AI Assistant, which needs more memory and a privileged container.<\/p>\n<h2>What size VPS does n8n need?<\/h2>\n<p>A small one. n8n&#8217;s Hetzner guide says a small CPX11 instance is enough for most usage, and suggests 4 GB RAM and 2 vCPU if you add the n8n Assistant. What grows memory use in practice is the size of the data your workflows handle and how many run at once.<\/p>\n<p>On our test server, which has 4 GB of RAM, n8n used about 353 MB of memory at idle, or 9% of the total. SerpBear was running on the same server at the time, and the two containers together used about 476 MB, roughly 12%.<\/p>\n<p>Plan specs and prices below are from our Linux VPS plans page as of October 2026.<\/p>\n<table>\n<thead>\n<tr>\n<th>What you run<\/th>\n<th>Plan<\/th>\n<th>Specs<\/th>\n<th>Price<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>n8n alone, light workflows<\/td>\n<td>Basic<\/td>\n<td>1 vCore, 3 GB RAM, 200 GB HDD<\/td>\n<td>$19\/mo<\/td>\n<\/tr>\n<tr>\n<td>n8n plus a rank tracker or other small tools<\/td>\n<td>Essential<\/td>\n<td>2 vCores, 4 GB RAM, 400 GB HDD<\/td>\n<td>$25\/mo<\/td>\n<\/tr>\n<tr>\n<td>n8n plus a headless browser crawler<\/td>\n<td>Comfort<\/td>\n<td>4 vCores, 6 GB RAM<\/td>\n<td>$35\/mo<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Running n8n with other tools?<\/strong> <a href=\"https:\/\/kwikserver.com\/tool\/cart.php?a=add&amp;pid=117\">Order the Essential Linux VPS at $25 per month<\/a>, or <a href=\"https:\/\/kwikserver.com\/linux-vps.php\">compare all four Linux VPS plans<\/a>. VPS orders are usually delivered within 15 minutes and come with a 3-day money-back guarantee.<\/p>\n<h2>How do you set up n8n with Docker Compose?<\/h2>\n<p>Install Docker, create a project folder with a <code>.env<\/code> file and a <code>compose.yaml<\/code> file, and start the container. The Compose file below is n8n&#8217;s <a href=\"https:\/\/docs.n8n.io\/deploy\/host-n8n\/install-options\/use-a-cloud-provider\/use-docker-compose\">official one<\/a> with the Traefik service and labels removed and one variable added.<\/p>\n<h3>Step 1: Install Docker<\/h3>\n<pre><code>apt update &amp;&amp; apt upgrade -y\ncurl -fsSL https:\/\/get.docker.com | sh\ndocker --version\ndocker compose version<\/code><\/pre>\n<p>Skip this if Docker is already on the server.<\/p>\n<h3>Step 2: Create the project folder<\/h3>\n<pre><code>mkdir -p \/opt\/n8n\/local-files &amp;&amp; cd \/opt\/n8n\nchown 1000:1000 local-files<\/code><\/pre>\n<p>The <code>local-files<\/code> folder is shared with the container at <code>\/files<\/code>, for workflows that read or write files on disk. The <code>chown<\/code> matters when you work as root: n8n runs inside the container as user ID 1000 and cannot write to a folder that root owns.<\/p>\n<h3>Step 3: Create the .env file<\/h3>\n<pre><code>nano .env<\/code><\/pre>\n<pre><code>DOMAIN_NAME=yourdomain.com\nSUBDOMAIN=n8n\nGENERIC_TIMEZONE=Europe\/Berlin<\/code><\/pre>\n<p>Replace <code>yourdomain.com<\/code> with your real domain before you save. We left the placeholder in on our own test run. n8n still starts with it, but it builds its webhook addresses from these two values, so every webhook URL would point at a domain you do not own.<\/p>\n<p>Set the timezone to your own as well. n8n uses it for schedule triggers, and the default is New York if you leave it out.<\/p>\n<h3>Step 4: Create the compose.yaml file<\/h3>\n<pre><code>nano compose.yaml<\/code><\/pre>\n<pre><code>services:\n  n8n:\n    image: n8nio\/n8n\n    restart: always\n    ports:\n      - \"127.0.0.1:5678:5678\"\n    environment:\n      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true\n      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}\n      - N8N_PORT=5678\n      - N8N_PROTOCOL=https\n      - NODE_ENV=production\n      - WEBHOOK_URL=https:\/\/${SUBDOMAIN}.${DOMAIN_NAME}\/\n      - N8N_PROXY_HOPS=1\n      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}\n      - TZ=${GENERIC_TIMEZONE}\n      - N8N_RESTRICT_FILE_ACCESS_TO=\/files\n    volumes:\n      - n8n_data:\/home\/node\/.n8n\n      - .\/local-files:\/files\n\nvolumes:\n  n8n_data:<\/code><\/pre>\n<p>The port is bound to <code>127.0.0.1<\/code>, as in the official file. Ports that Docker publishes skip UFW rules, so binding to localhost is what keeps port 5678 off the public internet. Only Nginx on the same server can reach it.<\/p>\n<h3>Step 5: Start n8n<\/h3>\n<pre><code>docker compose up -d\ndocker compose ps\ndocker compose logs -f n8n<\/code><\/pre>\n<p>Press Ctrl+C to leave the logs. Do not open n8n in a browser yet. Set up Nginx and SSL first.<\/p>\n<h2>How do you put n8n behind Nginx with SSL?<\/h2>\n<p>Create an Nginx server block that proxies to port 5678 with WebSocket support, then let Certbot add the certificate.<\/p>\n<pre><code>apt install nginx -y\nnano \/etc\/nginx\/sites-available\/n8n<\/code><\/pre>\n<pre><code>server {\n    listen 80;\n    server_name n8n.yourdomain.com;\n\n    client_max_body_size 16m;\n\n    location \/ {\n        proxy_pass http:\/\/127.0.0.1:5678;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Host $host;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        proxy_buffering off;\n        proxy_read_timeout 3600s;\n    }\n}<\/code><\/pre>\n<p>Change <code>server_name<\/code> to your own subdomain before you go on. If it does not match the address you open in the browser, Nginx serves its default &#8220;Welcome to nginx&#8221; page instead of n8n. We hit exactly that on our test run.<\/p>\n<p>Enable the site and add the certificate:<\/p>\n<pre><code>ln -s \/etc\/nginx\/sites-available\/n8n \/etc\/nginx\/sites-enabled\/\nnginx -t\nsystemctl reload nginx\napt install certbot python3-certbot-nginx -y\ncertbot --nginx -d n8n.yourdomain.com --redirect\ncertbot renew --dry-run<\/code><\/pre>\n<p>If the firewall is not on yet, allow SSH before you enable it:<\/p>\n<pre><code>ufw allow ssh\nufw allow 'Nginx Full'\nufw enable<\/code><\/pre>\n<p>Now open <code>https:\/\/n8n.yourdomain.com<\/code> and create the owner account straight away. The first person to reach a new n8n instance gets to create that account, so do not leave it sitting unclaimed.<\/p>\n<h2>Which settings stop webhooks and the editor breaking behind a proxy?<\/h2>\n<p>Four of them. n8n&#8217;s docs on <a href=\"https:\/\/docs.n8n.io\/deploy\/host-n8n\/configure-n8n\/basic-configuration\/configuration-examples\/configure-webhook-urls-with-reverse-proxy\">webhook URLs behind a reverse proxy<\/a> cover the first three, and the fourth is on the Nginx side.<\/p>\n<table>\n<thead>\n<tr>\n<th>Setting<\/th>\n<th>Where<\/th>\n<th>What goes wrong without it<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>WEBHOOK_URL<\/code><\/td>\n<td>compose.yaml<\/td>\n<td>n8n builds webhook URLs from its internal host and port, so they point at port 5678 and outside services cannot reach them<\/td>\n<\/tr>\n<tr>\n<td><code>N8N_PROXY_HOPS=1<\/code><\/td>\n<td>compose.yaml<\/td>\n<td>n8n does not trust the forwarded headers, so it sees every request as coming from the proxy<\/td>\n<\/tr>\n<tr>\n<td><code>X-Forwarded-For<\/code>, <code>X-Forwarded-Host<\/code>, <code>X-Forwarded-Proto<\/code><\/td>\n<td>Nginx<\/td>\n<td>n8n cannot tell the visitor&#8217;s address or that the original request was HTTPS<\/td>\n<\/tr>\n<tr>\n<td><code>Upgrade<\/code> and <code>Connection<\/code> headers<\/td>\n<td>Nginx<\/td>\n<td>The editor cannot hold its live connection and shows &#8220;Connection lost&#8221;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Two Nginx lines in our config are choices you may want to change. <code>client_max_body_size 16m<\/code> matches n8n&#8217;s default payload limit of 16 MiB, set by <code>N8N_PAYLOAD_SIZE_MAX<\/code>. Nginx&#8217;s own default of 1 MB would reject larger webhook bodies and file uploads first. <code>proxy_read_timeout 3600s<\/code> keeps long-running requests and the editor connection from being cut after Nginx&#8217;s default 60 seconds.<\/p>\n<p>After changing anything in <code>compose.yaml<\/code> or <code>.env<\/code>, apply it with <code>docker compose up -d<\/code>. A plain restart does not pick up new environment values.<\/p>\n<p>To check the whole chain, add a Webhook node, click Listen for test event, and open its Test URL from another device. On our test server the request showed up in the editor straight away with <code>x-forwarded-proto: https<\/code>, the right <code>x-forwarded-host<\/code> and the caller&#8217;s real IP address in <code>x-forwarded-for<\/code>. If the editor receives the event, the WebSocket connection is working too.<\/p>\n<h2>Can n8n and SerpBear run on the same server?<\/h2>\n<p>Yes. Each runs in its own container on its own localhost port, and Nginx routes by hostname. Our test server runs both.<\/p>\n<p>If you followed our guide to <a href=\"https:\/\/kwikserver.com\/tutorials\/install-serpbear-vps\/\">install SerpBear on a VPS<\/a>, you already have Nginx, Certbot and the firewall in place. Skip those install lines above, add the <code>n8n<\/code> server block as a second file in <code>sites-available<\/code>, and run Certbot for the new subdomain. SerpBear stays on port 3000 and n8n on 5678, each in its own folder under <code>\/opt<\/code> with its own Compose file, so updating one does not touch the other.<\/p>\n<p>The pairing is useful for more than saving a server. SerpBear has an API, so an n8n workflow can pull keyword positions on a schedule and send rank changes to Slack, email or a spreadsheet.<\/p>\n<h2>How do you back up and update n8n?<\/h2>\n<p>Back up the <code>n8n_data<\/code> volume, and update with three Compose commands.<\/p>\n<h3>Back up the data volume<\/h3>\n<p>n8n&#8217;s docs describe the <code>n8n_data<\/code> volume as where it saves its SQLite database file and encryption key. The key is what decrypts your saved credentials. If you lose it, the workflows can be rebuilt but every stored credential has to be entered again, so back up the whole volume, not just an export of workflows.<\/p>\n<p>Compose prefixes the volume with the folder name, so it is called <code>n8n_n8n_data<\/code> if you used <code>\/opt\/n8n<\/code>. Confirm with <code>docker volume ls<\/code>. Save this as <code>\/root\/n8n-backup.sh<\/code>:<\/p>\n<pre><code>#!\/bin\/sh\nmkdir -p \/root\/backups\ncd \/opt\/n8n\ndocker compose stop\ndocker run --rm -v n8n_n8n_data:\/data -v \/root\/backups:\/backup alpine tar czf \/backup\/n8n-$(date +%F).tar.gz -C \/data .\ndocker compose start<\/code><\/pre>\n<pre><code>chmod +x \/root\/n8n-backup.sh<\/code><\/pre>\n<p>Schedule it with <code>crontab -e<\/code>, for example weekly at 03:30 on Sunday:<\/p>\n<pre><code>30 3 * * 0 \/root\/n8n-backup.sh<\/code><\/pre>\n<p>n8n is stopped for a few seconds while the archive is made, so pick a time when no workflow is due. Copy the archives off the server with <code>scp<\/code> or <code>rsync<\/code>.<\/p>\n<h3>Update n8n<\/h3>\n<p>n8n&#8217;s docs say a new minor version is released most weeks. These are the update steps from the docs:<\/p>\n<pre><code>cd \/opt\/n8n\ndocker compose pull\ndocker compose down\ndocker compose up -d<\/code><\/pre>\n<p>Take a backup first. If you would rather choose when you upgrade, pin a version in <code>compose.yaml<\/code>, for example <code>image: n8nio\/n8n:2.42.4<\/code>, the version we tested. Change the tag when you are ready to move.<\/p>\n<h2>What are the common problems with n8n behind Nginx?<\/h2>\n<p>Nearly all of them trace back to a placeholder, a missing header or a missing variable.<\/p>\n<ul>\n<li><strong>The &#8220;Welcome to nginx&#8221; page instead of n8n.<\/strong> The <code>server_name<\/code> line still has the placeholder or does not match your subdomain. Fix it, then run <code>nginx -t<\/code> and <code>systemctl reload nginx<\/code>.<\/li>\n<li><strong>&#8220;Connection lost&#8221; in the editor.<\/strong> The <code>Upgrade<\/code> and <code>Connection<\/code> headers or <code>proxy_http_version 1.1<\/code> are missing from the Nginx block. Check that Certbot&#8217;s edits left them in place.<\/li>\n<li><strong>Webhook URLs show the wrong domain, port 5678 or http.<\/strong> The <code>.env<\/code> values are wrong, <code>WEBHOOK_URL<\/code> is not set, or the container was not recreated. Fix the values and run <code>docker compose up -d<\/code>.<\/li>\n<li><strong>A secure cookie warning on the login page.<\/strong> You opened n8n over plain HTTP or by IP address. Use the HTTPS subdomain.<\/li>\n<li><strong>413 Request Entity Too Large.<\/strong> Raise <code>client_max_body_size<\/code> in Nginx. For bodies above 16 MiB, raise <code>N8N_PAYLOAD_SIZE_MAX<\/code> in <code>compose.yaml<\/code> as well.<\/li>\n<li><strong>Schedules fire at the wrong hour.<\/strong> <code>GENERIC_TIMEZONE<\/code> is unset or wrong.<\/li>\n<li><strong>Cannot write to \/files.<\/strong> The <code>local-files<\/code> folder is owned by root. Run <code>chown 1000:1000 \/opt\/n8n\/local-files<\/code>.<\/li>\n<li><strong>502 Bad Gateway.<\/strong> Nginx is up but n8n is still starting or has stopped. Check <code>docker compose ps<\/code> and the logs.<\/li>\n<\/ul>\n<h2>Frequently asked questions<\/h2>\n<h3>Is self-hosted n8n free?<\/h3>\n<p>The Community Edition costs nothing to run for your own business, and you pay only for the server. n8n is released under the Sustainable Use License, which is source-available and not an open-source license. Read it before you offer n8n to others as a hosted service.<\/p>\n<h3>Do I need PostgreSQL to run n8n?<\/h3>\n<p>No. n8n&#8217;s Compose guide uses the built-in SQLite database, which is what this guide sets up. PostgreSQL is supported and is the usual step up when workloads get heavy.<\/p>\n<h3>Why use Nginx when n8n&#8217;s docs use Traefik?<\/h3>\n<p>Either works. Nginx makes sense when it is already on the server for other sites or tools, because one proxy then handles every subdomain and certificate. If n8n is the only thing on the server, the official Traefik file is less to set up.<\/p>\n<h3>Can I open n8n by IP address without a domain?<\/h3>\n<p>Not with this setup, and we would not expose it that way. For a private test, tunnel the port over SSH with <code>ssh -L 5678:localhost:5678 root@your-server-ip<\/code> and browse to <code>http:\/\/localhost:5678<\/code>.<\/p>\n<h3>How much RAM does n8n use?<\/h3>\n<p>On our test server n8n 2.42.4 used about 353 MB at idle. Memory rises with the amount of data a workflow processes and the number of workflows running at once.<\/p>\n<h3>What else is worth running on the same VPS?<\/h3>\n<p>A rank tracker, a metasearch engine and a reporting dashboard all sit comfortably beside n8n. Our guide to the <a href=\"https:\/\/kwikserver.com\/tutorials\/vps-for-seo-tools\/\">best VPS for SEO tools and automation<\/a> lists what each tool needs.<\/p>\n<h2>Get n8n running, then back it up<\/h2>\n<p>The install is short: one Compose file, one Nginx block and a certificate. The parts people skip are the four proxy settings and the backup, and those are the ones that cost time later. Set them up on day one. For n8n alongside other tools we suggest 4 GB of RAM. <a href=\"https:\/\/kwikserver.com\/linux-vps.php\">See the Linux VPS plans and pricing<\/a> to pick a server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Run n8n on your own Linux VPS with Docker Compose behind Nginx: WebSocket and webhook proxy settings, free SSL, running it next to SerpBear, backups and updates.<\/p>\n","protected":false},"author":1,"featured_media":2065,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_focuskw":"","rank_math_title":"","rank_math_description":"","rank_math_focus_keyword":""},"categories":[57,20],"tags":[76,77,27],"class_list":["post-2062","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-linux","tag-linux-vps","tag-ubuntu-vps","tag-vps"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kwik Server\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Tutorials Kwik Server -\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to Self-Host n8n with Docker Compose and Nginx (2026)\" \/>\n\t\t<meta property=\"og:description\" content=\"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2025\/02\/cropped-Kwik-Server-Logo-1.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2025\/02\/cropped-Kwik-Server-Logo-1.png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-10-07T13:37:29+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-10-07T13:37:29+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to Self-Host n8n with Docker Compose and Nginx (2026)\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2025\/02\/cropped-Kwik-Server-Logo-1.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#blogposting\",\"name\":\"How to Self-Host n8n with Docker Compose and Nginx (2026)\",\"headline\":\"How to Self-Host n8n with Docker Compose and Nginx (2026)\",\"author\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/author\\\/server2202kwik\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/self-host-n8n-docker-nginx.png.webp\",\"width\":1659,\"height\":948,\"caption\":\"n8n workflow editor running on a Linux VPS behind Nginx\"},\"datePublished\":\"2026-10-07T19:07:29+05:30\",\"dateModified\":\"2026-10-07T19:07:29+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#webpage\"},\"articleSection\":\"Docker, Linux, Linux VPS, Ubuntu VPS, VPS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/category\\\/linux\\\/#listItem\",\"name\":\"Linux\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/category\\\/linux\\\/#listItem\",\"position\":2,\"name\":\"Linux\",\"item\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/category\\\/linux\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#listItem\",\"name\":\"How to Self-Host n8n with Docker Compose and Nginx (2026)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#listItem\",\"position\":3,\"name\":\"How to Self-Host n8n with Docker Compose and Nginx (2026)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/category\\\/linux\\\/#listItem\",\"name\":\"Linux\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/#organization\",\"name\":\"Tutorials Kwik Server\",\"url\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/cropped-Kwik-Server-Logo-1.png\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#organizationLogo\",\"width\":1956,\"height\":683},\"image\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/author\\\/server2202kwik\\\/#author\",\"url\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/author\\\/server2202kwik\\\/\",\"name\":\"Kwik Server\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0b10492ce76cec12cc2303f4951f725e776449ce91e8fff43130c3174c94d70?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kwik Server\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#webpage\",\"url\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/\",\"name\":\"How to Self-Host n8n with Docker Compose and Nginx (2026)\",\"description\":\"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/author\\\/server2202kwik\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/author\\\/server2202kwik\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/self-host-n8n-docker-nginx.png.webp\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#mainImage\",\"width\":1659,\"height\":948,\"caption\":\"n8n workflow editor running on a Linux VPS behind Nginx\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/self-host-n8n-docker-nginx\\\/#mainImage\"},\"datePublished\":\"2026-10-07T19:07:29+05:30\",\"dateModified\":\"2026-10-07T19:07:29+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/\",\"name\":\"Tutorials Kwik Server\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/kwikserver.com\\\/tutorials\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Self-Host n8n with Docker Compose and Nginx (2026)","description":"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.","canonical_url":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#blogposting","name":"How to Self-Host n8n with Docker Compose and Nginx (2026)","headline":"How to Self-Host n8n with Docker Compose and Nginx (2026)","author":{"@id":"https:\/\/kwikserver.com\/tutorials\/author\/server2202kwik\/#author"},"publisher":{"@id":"https:\/\/kwikserver.com\/tutorials\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2026\/10\/self-host-n8n-docker-nginx.png.webp","width":1659,"height":948,"caption":"n8n workflow editor running on a Linux VPS behind Nginx"},"datePublished":"2026-10-07T19:07:29+05:30","dateModified":"2026-10-07T19:07:29+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#webpage"},"isPartOf":{"@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#webpage"},"articleSection":"Docker, Linux, Linux VPS, Ubuntu VPS, VPS"},{"@type":"BreadcrumbList","@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/kwikserver.com\/tutorials\/#listItem","position":1,"name":"Home","item":"https:\/\/kwikserver.com\/tutorials\/","nextItem":{"@type":"ListItem","@id":"https:\/\/kwikserver.com\/tutorials\/category\/linux\/#listItem","name":"Linux"}},{"@type":"ListItem","@id":"https:\/\/kwikserver.com\/tutorials\/category\/linux\/#listItem","position":2,"name":"Linux","item":"https:\/\/kwikserver.com\/tutorials\/category\/linux\/","nextItem":{"@type":"ListItem","@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#listItem","name":"How to Self-Host n8n with Docker Compose and Nginx (2026)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kwikserver.com\/tutorials\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#listItem","position":3,"name":"How to Self-Host n8n with Docker Compose and Nginx (2026)","previousItem":{"@type":"ListItem","@id":"https:\/\/kwikserver.com\/tutorials\/category\/linux\/#listItem","name":"Linux"}}]},{"@type":"Organization","@id":"https:\/\/kwikserver.com\/tutorials\/#organization","name":"Tutorials Kwik Server","url":"https:\/\/kwikserver.com\/tutorials\/","logo":{"@type":"ImageObject","url":"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2025\/02\/cropped-Kwik-Server-Logo-1.png","@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#organizationLogo","width":1956,"height":683},"image":{"@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/kwikserver.com\/tutorials\/author\/server2202kwik\/#author","url":"https:\/\/kwikserver.com\/tutorials\/author\/server2202kwik\/","name":"Kwik Server","image":{"@type":"ImageObject","@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/b0b10492ce76cec12cc2303f4951f725e776449ce91e8fff43130c3174c94d70?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kwik Server"}},{"@type":"WebPage","@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#webpage","url":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/","name":"How to Self-Host n8n with Docker Compose and Nginx (2026)","description":"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/kwikserver.com\/tutorials\/#website"},"breadcrumb":{"@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#breadcrumblist"},"author":{"@id":"https:\/\/kwikserver.com\/tutorials\/author\/server2202kwik\/#author"},"creator":{"@id":"https:\/\/kwikserver.com\/tutorials\/author\/server2202kwik\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2026\/10\/self-host-n8n-docker-nginx.png.webp","@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#mainImage","width":1659,"height":948,"caption":"n8n workflow editor running on a Linux VPS behind Nginx"},"primaryImageOfPage":{"@id":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/#mainImage"},"datePublished":"2026-10-07T19:07:29+05:30","dateModified":"2026-10-07T19:07:29+05:30"},{"@type":"WebSite","@id":"https:\/\/kwikserver.com\/tutorials\/#website","url":"https:\/\/kwikserver.com\/tutorials\/","name":"Tutorials Kwik Server","inLanguage":"en-US","publisher":{"@id":"https:\/\/kwikserver.com\/tutorials\/#organization"}}]},"og:locale":"en_US","og:site_name":"Tutorials Kwik Server -","og:type":"article","og:title":"How to Self-Host n8n with Docker Compose and Nginx (2026)","og:description":"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.","og:url":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/","og:image":"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2025\/02\/cropped-Kwik-Server-Logo-1.png","og:image:secure_url":"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2025\/02\/cropped-Kwik-Server-Logo-1.png","article:published_time":"2026-10-07T13:37:29+00:00","article:modified_time":"2026-10-07T13:37:29+00:00","twitter:card":"summary_large_image","twitter:title":"How to Self-Host n8n with Docker Compose and Nginx (2026)","twitter:description":"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.","twitter:image":"https:\/\/kwikserver.com\/tutorials\/wp-content\/uploads\/2025\/02\/cropped-Kwik-Server-Logo-1.png"},"aioseo_meta_data":{"post_id":"2062","title":"How to Self-Host n8n with Docker Compose and Nginx (2026)","description":"Self-host n8n with Docker Compose and Nginx on a VPS. Covers WebSocket and webhook proxy settings, free SSL, backups, updates and common errors.","keywords":null,"keyphrases":{"focus":{"keyphrase":"self-host n8n with Docker Compose and Nginx"}},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2026-10-07 09:30:26","updated":"2026-10-07 09:30:26","seo_analyzer_scan_date":null,"focus_keyword":"self-host n8n with Docker Compose and Nginx","additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kwikserver.com\/tutorials\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kwikserver.com\/tutorials\/category\/linux\/\" title=\"Linux\">Linux<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Self-Host n8n with Docker Compose and Nginx (2026)\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/kwikserver.com\/tutorials\/"},{"label":"Linux","link":"https:\/\/kwikserver.com\/tutorials\/category\/linux\/"},{"label":"How to Self-Host n8n with Docker Compose and Nginx (2026)","link":"https:\/\/kwikserver.com\/tutorials\/self-host-n8n-docker-nginx\/"}],"_links":{"self":[{"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/posts\/2062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/comments?post=2062"}],"version-history":[{"count":4,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/posts\/2062\/revisions"}],"predecessor-version":[{"id":2067,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/posts\/2062\/revisions\/2067"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/media\/2065"}],"wp:attachment":[{"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/media?parent=2062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/categories?post=2062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/tags?post=2062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}