{"id":17146,"date":"2025-09-13T11:59:58","date_gmt":"2025-09-13T10:59:58","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=17146"},"modified":"2025-09-13T12:04:18","modified_gmt":"2025-09-13T11:04:18","slug":"how-to-install-n8n-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/","title":{"rendered":"How to Install n8n on Ubuntu | Step-by-Step Setup Guide"},"content":{"rendered":"\n<p>n8n is an open-source automated workflow software that creates seamless connections between apps and APIs. Its node-centric design aids enterprises and developers to automate mundane operations and orchestrating complex workflows. When you self-host n8n on a VPS, you gain complete control and flexibility over your automations.<\/p>\n\n\n\n<p>This guide aims to explain fully how to install n8n on Ubuntu and run it on your own self-hosted server.<\/p>\n\n\n\n<p><strong>Recommended Blog: <\/strong><a href=\"https:\/\/www.milesweb.co.uk\/blog\/hosting\/vps\/how-to-install-n8n\/\"><strong>How to Install n8n? A Step-by-Step Guide for Self-Hosted Workflow Automation<\/strong><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"WPT1WPTheme\">Prerequisites<\/h2>\n\n\n\n<p>Before beginning the n8n setup guide on Ubuntu installation, please verify that the system meets the following specifications.<\/p>\n\n\n\n<p>A server with Ubuntu version 20.04 or higher<br>A non-root user with sudo privileges<br>Node.js (&gt;= 18) with npm<br>Docker with Docker Compose, its optional but recommended for production<br>Fundamental understanding of the command line of the Operating System<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"WPT2WPTheme\">Steps to Install n8n on Ubuntu<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Update and Upgrade Ubuntu<\/h3>\n\n\n\n<p>First, complete the system\u2019s package list to ensure everything is current.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Install Node.js and npm<\/h3>\n\n\n\n<p>n8n requires Node.js (version 18 or later). Use the NodeSource repository to install Node.js.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/deb.nodesource.com\/setup_18.x | sudo -E bash -\nsudo apt install -y nodejs<\/code><\/pre>\n\n\n\n<p>Confirm installation is done via:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -v\nnpm -v<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3 &#8211; Install n8n Globally<\/h3>\n\n\n\n<p>Use npm to install n8n on your server and set it for global usage.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>sudo npm install n8n -g<\/em><\/strong><\/code><\/pre>\n\n\n\n<p>It is possible to confirm the installation of n8n via:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>n8n --version&nbsp;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Run n8n<\/h3>\n\n\n\n<p>Next, after the installation step, n8n can be started with the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>n8n<\/em><\/strong><\/code><\/pre>\n\n\n\n<p>n8n can be accessed for usage on port 5678 with default settings. Open the browser and go to the following address: http:\/\/your-server-ip:5678<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Set n8n for Persistent Access<\/h3>\n\n\n\n<p>To ensure n8n runs continuously in the background, you need to use PM2 a process manager for Node.js. To install PM2 use the command below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>sudo npm install -g pm2<\/em><\/strong><\/code><\/pre>\n\n\n\n<p>To start n8n with PM2, use the command below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>pm2 start n8n<\/em><\/strong><\/code><\/pre>\n\n\n\n<p>After running the below codes, your n8n will start automatically after a system reboot.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pm2 startup\n\npm2 save<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Run n8n with Docker (Optional)<\/h3>\n\n\n\n<p>In case you want to use a containerized form of deployment, you can install n8n using the Docker option. To install Docker along with Docker Compose, use the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>sudo apt install docker.io docker-compose -y<\/em><\/strong><\/code><\/pre>\n\n\n\n<p>To run the n8n Container, use the below command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>docker run -it --rm -p 5678:5678 -v ~\/.n8n:\/home\/node\/.n8n n8nio\/n8n<\/em><\/strong><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7: Use a Reverse Proxy to Secure n8n<\/h3>\n\n\n\n<p>In a production environment, it is best practice to set up a reverse proxy with SSL\/TLS. To install NGINX, use the command below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>sudo apt install nginx -y<\/em><\/strong><\/code><\/pre>\n\n\n\n<p>Set NGINX to proxy requests from port 80\/443 to 5678. Then, set up SSL using Let\u2019s Encrypt with Certbot.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8: Access the n8n Dashboard<\/h3>\n\n\n\n<p>Open your web browser and type: &#8220;http:\/\/your-domain.com&#8221;<\/p>\n\n\n\n<p>If everything is set up correctly, you should see your n8n workflow automation dashboard that is running on the Ubuntu server.<\/p>\n\n\n\n<div class=\"vlt-box \">\n<div class=\"box-title\" style=\"background:#D5EAFF; color:#000\">Conclusion <\/div>\n<div class=\"box-content\" >\n<p>Congratulations on finishing n8n\u2019s Ubuntu installation.<\/p>\n\n<p>You can now self-host n8n and customize automation workflows for your projects using this n8n setup guide on Ubuntu. n8n can be executed in multiple ways, such as Node.js, PM2, and Docker. No matter how you choose to run it, n8n will always ensure scalability and flexible automated workflows on your Ubuntu server. <\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>n8n is an open-source automated workflow software that creates seamless connections between apps and APIs. Its node-centric design aids enterprises and developers to automate mundane operations and orchestrating complex workflows. When you self-host n8n on a VPS, you gain complete control and flexibility over your automations. This guide aims to explain fully how to install [&hellip;]<\/p>\n","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-17146","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-howtos"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install n8n on Ubuntu | Step-by-Step Setup Guide<\/title>\n<meta name=\"description\" content=\"Learn how to install n8n on Ubuntu with this step-by-step guide. Set up n8n on your Ubuntu server for workflow automation and self-hosting with ease.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install n8n on Ubuntu | Step-by-Step Setup Guide\" \/>\n<meta property=\"og:description\" content=\"Learn how to install n8n on Ubuntu with this step-by-step guide. Set up n8n on your Ubuntu server for workflow automation and self-hosting with ease.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-13T10:59:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-13T11:04:18+00:00\" \/>\n<meta name=\"author\" content=\"Olivia Jones\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Olivia Jones\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/\",\"name\":\"How to Install n8n on Ubuntu | Step-by-Step Setup Guide\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2025-09-13T10:59:58+00:00\",\"dateModified\":\"2025-09-13T11:04:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/3a641791b9511cfccbc9dffe66b65a86\"},\"description\":\"Learn how to install n8n on Ubuntu with this step-by-step guide. Set up n8n on your Ubuntu server for workflow automation and self-hosting with ease.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install n8n on Ubuntu | Step-by-Step Setup Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/3a641791b9511cfccbc9dffe66b65a86\",\"name\":\"Olivia Jones\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/71bfca68e492d224472a5bf10c3642f1?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/71bfca68e492d224472a5bf10c3642f1?s=96&d=blank&r=g\",\"caption\":\"Olivia Jones\"},\"description\":\"I'm a seasoned Technical Writer with over a decade of experience in the field. I've a strong background in translating complex technical information into clear and concise documentation for a variety of audiences. Also, known for meticulous attention to detail and his ability to work efficiently under tight deadlines.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/grace-cornish\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install n8n on Ubuntu | Step-by-Step Setup Guide","description":"Learn how to install n8n on Ubuntu with this step-by-step guide. Set up n8n on your Ubuntu server for workflow automation and self-hosting with ease.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/","og_locale":"en_GB","og_type":"article","og_title":"How to Install n8n on Ubuntu | Step-by-Step Setup Guide","og_description":"Learn how to install n8n on Ubuntu with this step-by-step guide. Set up n8n on your Ubuntu server for workflow automation and self-hosting with ease.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2025-09-13T10:59:58+00:00","article_modified_time":"2025-09-13T11:04:18+00:00","author":"Olivia Jones","twitter_misc":{"Written by":"Olivia Jones","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/","name":"How to Install n8n on Ubuntu | Step-by-Step Setup Guide","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2025-09-13T10:59:58+00:00","dateModified":"2025-09-13T11:04:18+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/3a641791b9511cfccbc9dffe66b65a86"},"description":"Learn how to install n8n on Ubuntu with this step-by-step guide. Set up n8n on your Ubuntu server for workflow automation and self-hosting with ease.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-n8n-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Install n8n on Ubuntu | Step-by-Step Setup Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/3a641791b9511cfccbc9dffe66b65a86","name":"Olivia Jones","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/71bfca68e492d224472a5bf10c3642f1?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/71bfca68e492d224472a5bf10c3642f1?s=96&d=blank&r=g","caption":"Olivia Jones"},"description":"I'm a seasoned Technical Writer with over a decade of experience in the field. I've a strong background in translating complex technical information into clear and concise documentation for a variety of audiences. Also, known for meticulous attention to detail and his ability to work efficiently under tight deadlines.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/grace-cornish\/"}]}},"views":0,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/17146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=17146"}],"version-history":[{"count":3,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/17146\/revisions"}],"predecessor-version":[{"id":17158,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/17146\/revisions\/17158"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=17146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=17146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=17146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}