{"id":468224,"date":"2025-07-22T15:01:52","date_gmt":"2025-07-22T15:01:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=468224"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=468224","title":{"rendered":"<span>n8n Local Install Tutorial (CLI + Docker)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>n8n is a powerful, extendable workflow automation tool that allows you to connect different applications and services. Running it on your local machine gives you complete control over your data and workflows, which can be done on Windows, Mac, or Linux systems. This tutorial covers the two primary methods for local installation: using Docker and using Node.js (npm). If you are interested, then read this article until the end. \ud83d\ude42<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f28\/344\/fcd\/f28344fcd91b9cc5a68030efd82a16db.png\" alt=\"n8n Local Install Tutorial (CLI + Docker)\" title=\"n8n Local Install Tutorial (CLI + Docker)\" width=\"1231\" height=\"872\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f28\/344\/fcd\/f28344fcd91b9cc5a68030efd82a16db.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f28\/344\/fcd\/f28344fcd91b9cc5a68030efd82a16db.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>n8n Local Install Tutorial (CLI + Docker)<\/figcaption><\/div>\n<\/figure>\n<h3>How to Set Up n8n Locally<\/h3>\n<p>There are two main ways to install and run n8n locally: using Docker or using Node.js with npm.<\/p>\n<h4>Method 1: Installing n8n with Docker<\/h4>\n<p>This method utilizes Docker to run n8n in an isolated environment known as a container. It is often the recommended approach, as it bundles all dependencies together.<\/p>\n<p>First, visit <a href=\"https:\/\/www.docker.com\/products\/docker-desktop\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.docker.com\/products\/docker-desktop\/<\/a>, download Docker Desktop for Mac, Windows, or Linux, and install it on your computer.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/937\/ef3\/737\/937ef37374601c2448fe162436d0656d.png\" alt=\"Docker Website\" title=\"Docker Website\" width=\"1445\" height=\"639\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/937\/ef3\/737\/937ef37374601c2448fe162436d0656d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/937\/ef3\/737\/937ef37374601c2448fe162436d0656d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Docker Website<\/figcaption><\/div>\n<\/figure>\n<p>Then open Docker Desktop or your terminal window and create a dedicated volume for n8n. This ensures that your workflow data is saved persistently, even if you stop or remove the n8n container. Open your terminal (or Command Prompt\/PowerShell on Windows) and run the following command:<\/p>\n<pre><code class=\"bash\">docker volume create n8n_data <\/code><\/pre>\n<p><strong>Note for Linux Users:<\/strong>\u00a0If you receive a &#171;permission denied&#187; error, you may need to run the command with administrator privileges by adding\u00a0<strong>sudo<\/strong>\u00a0at the beginning:\u00a0<strong><em>sudo docker volume create n8n_data<\/em><\/strong><em>.<\/em><\/p>\n<p>Next, run the command that will download the official n8n image and start the container. This command maps your local port 5678 to the container&#8217;s port and links the volume you just created.<\/p>\n<pre><code class=\"bash\">docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:\/home\/node\/.n8n docker.n8n.io\/n8nio\/n8n<\/code><\/pre>\n<p><strong>Note for Linux Users:<\/strong>\u00a0As before, if you encounter a permission error, prepend the command with\u00a0sudo.<\/p>\n<p>Once the command finishes, the terminal will indicate that the n8n is now accessible. You can open your web browser and navigate to: http:\/\/localhost:5678<\/p>\n<p>The first time you access this URL, youwill see a \u201cSet up owner account\u201d screen. Fill in your details to create your main administrator account. Once completed, you will be taken to the n8n dashboard, ready to build your first workflow.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e14\/b4a\/ee7\/e14b4aee788ff5c783abdc3a715e5964.png\" width=\"1316\" height=\"983\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e14\/b4a\/ee7\/e14b4aee788ff5c783abdc3a715e5964.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e14\/b4a\/ee7\/e14b4aee788ff5c783abdc3a715e5964.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>Method 2: Installing n8n with Node.js (npm)<\/h4>\n<p>This method uses the Node Package Manager (npm), which comes with Node.js. It&#8217;s a straightforward alternative if you prefer not to use Docker.<\/p>\n<p>You must have Node.js and npm installed. It is essential to use a version of Node.js that is supported by n8n. The tool currently supports Node.js versions 18.x, 20.x, and 22.x. You can download Node.js from the\u00a0<a href=\"https:\/\/nodejs.org\/en\/download\" rel=\"noopener noreferrer nofollow\">official website,<\/a>\u00a0which is available for Mac, Windows, and Linux users. <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/97e\/2fb\/2b1\/97e2fb2b104945d51f9ed2515d8245ee.png\" alt=\"Installing Node.js (npm)\" title=\"Installing Node.js (npm)\" width=\"1651\" height=\"1011\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/97e\/2fb\/2b1\/97e2fb2b104945d51f9ed2515d8245ee.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/97e\/2fb\/2b1\/97e2fb2b104945d51f9ed2515d8245ee.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Installing Node.js (npm)<\/figcaption><\/div>\n<\/figure>\n<p>Then, open your terminal (or Command Prompt\/PowerShell on Windows) and run the following command to install n8n. <\/p>\n<pre><code class=\"bash\">npm install n8n -g<\/code><\/pre>\n<p>The\u00a0-g\u00a0flag ensures it&#8217;s installed globally, making the\u00a0n8n\u00a0command accessible from anywhere in your terminal.<\/p>\n<p><strong>Note for Linux\/Mac Users:<\/strong>\u00a0For global installations, you may need to use sudo:\u00a0sudo npm install n8n -g.<\/p>\n<p>After the installation is complete, you can start the n8n application with a simple command:<\/p>\n<pre><code class=\"bash\">n8n start<\/code><\/pre>\n<p>The terminal will show that the process has been initialized and is running on port 5678. You can now open your web browser and go to the following address:http:\/\/localhost:5678<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f7\/593\/6bf\/4f75936bfa967340eeb708bcca3c62f9.png\" width=\"1286\" height=\"656\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4f7\/593\/6bf\/4f75936bfa967340eeb708bcca3c62f9.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f7\/593\/6bf\/4f75936bfa967340eeb708bcca3c62f9.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>Just like with the Docker method, you will be prompted to create an owner account. After setting it up, you can begin creating and managing your workflows locally.<\/p>\n<h2>Video Tutorial: How to Install n8n on Your Computer<\/h2>\n<p>If you prefer a video tutorial, please watch my step-by-step video:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/687f874fe7b97ae5c5b83afc\" data-style=\"\" id=\"687f874fe7b97ae5c5b83afc\" width=\"\"><\/div>\n<p><em>Watch on YouTube:  <\/em><a href=\"https:\/\/youtu.be\/nAIU7_Hwy6M\" rel=\"noopener noreferrer nofollow\"><em>n8n locally<\/em><\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>Both methods result in the same result: n8n running on your local machine. You can pick the one that best fits your experience and system preferences. Give it a shot and share with me your comments below!<\/p>\n<p>Cheers! \ud83d\ude09<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/930006\/\"> https:\/\/habr.com\/ru\/articles\/930006\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>n8n is a powerful, extendable workflow automation tool that allows you to connect different applications and services. Running it on your local machine gives you complete control over your data and workflows, which can be done on Windows, Mac, or Linux systems. This tutorial covers the two primary methods for local installation: using Docker and using Node.js (npm). If you are interested, then read this article until the end. \ud83d\ude42<\/p>\n<figure class=\"full-width\">\n<div><figcaption>n8n Local Install Tutorial (CLI + Docker)<\/figcaption><\/div>\n<\/figure>\n<h3>How to Set Up n8n Locally<\/h3>\n<p>There are two main ways to install and run n8n locally: using Docker or using Node.js with npm.<\/p>\n<h4>Method 1: Installing n8n with Docker<\/h4>\n<p>This method utilizes Docker to run n8n in an isolated environment known as a container. It is often the recommended approach, as it bundles all dependencies together.<\/p>\n<p>First, visit <a href=\"https:\/\/www.docker.com\/products\/docker-desktop\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.docker.com\/products\/docker-desktop\/<\/a>, download Docker Desktop for Mac, Windows, or Linux, and install it on your computer.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>Docker Website<\/figcaption><\/div>\n<\/figure>\n<p>Then open Docker Desktop or your terminal window and create a dedicated volume for n8n. This ensures that your workflow data is saved persistently, even if you stop or remove the n8n container. Open your terminal (or Command Prompt\/PowerShell on Windows) and run the following command:<\/p>\n<pre><code class=\"bash\">docker volume create n8n_data <\/code><\/pre>\n<p><strong>Note for Linux Users:<\/strong>\u00a0If you receive a &#171;permission denied&#187; error, you may need to run the command with administrator privileges by adding\u00a0<strong>sudo<\/strong>\u00a0at the beginning:\u00a0<strong><em>sudo docker volume create n8n_data<\/em><\/strong><em>.<\/em><\/p>\n<p>Next, run the command that will download the official n8n image and start the container. This command maps your local port 5678 to the container&#8217;s port and links the volume you just created.<\/p>\n<pre><code class=\"bash\">docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:\/home\/node\/.n8n docker.n8n.io\/n8nio\/n8n<\/code><\/pre>\n<p><strong>Note for Linux Users:<\/strong>\u00a0As before, if you encounter a permission error, prepend the command with\u00a0sudo.<\/p>\n<p>Once the command finishes, the terminal will indicate that the n8n is now accessible. You can open your web browser and navigate to: http:\/\/localhost:5678<\/p>\n<p>The first time you access this URL, youwill see a \u201cSet up owner account\u201d screen. Fill in your details to create your main administrator account. Once completed, you will be taken to the n8n dashboard, ready to build your first workflow.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h4>Method 2: Installing n8n with Node.js (npm)<\/h4>\n<p>This method uses the Node Package Manager (npm), which comes with Node.js. It&#8217;s a straightforward alternative if you prefer not to use Docker.<\/p>\n<p>You must have Node.js and npm installed. It is essential to use a version of Node.js that is supported by n8n. The tool currently supports Node.js versions 18.x, 20.x, and 22.x. You can download Node.js from the\u00a0<a href=\"https:\/\/nodejs.org\/en\/download\" rel=\"noopener noreferrer nofollow\">official website,<\/a>\u00a0which is available for Mac, Windows, and Linux users. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>Installing Node.js (npm)<\/figcaption><\/div>\n<\/figure>\n<p>Then, open your terminal (or Command Prompt\/PowerShell on Windows) and run the following command to install n8n. <\/p>\n<pre><code class=\"bash\">npm install n8n -g<\/code><\/pre>\n<p>The\u00a0-g\u00a0flag ensures it&#8217;s installed globally, making the\u00a0n8n\u00a0command accessible from anywhere in your terminal.<\/p>\n<p><strong>Note for Linux\/Mac Users:<\/strong>\u00a0For global installations, you may need to use sudo:\u00a0sudo npm install n8n -g.<\/p>\n<p>After the installation is complete, you can start the n8n application with a simple command:<\/p>\n<pre><code class=\"bash\">n8n start<\/code><\/pre>\n<p>The terminal will show that the process has been initialized and is running on port 5678. You can now open your web browser and go to the following address:http:\/\/localhost:5678<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>Just like with the Docker method, you will be prompted to create an owner account. After setting it up, you can begin creating and managing your workflows locally.<\/p>\n<h2>Video Tutorial: How to Install n8n on Your Computer<\/h2>\n<p>If you prefer a video tutorial, please watch my step-by-step video:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/687f874fe7b97ae5c5b83afc\" data-style=\"\" id=\"687f874fe7b97ae5c5b83afc\" width=\"\"><\/div>\n<p><em>Watch on YouTube:  <\/em><a href=\"https:\/\/youtu.be\/nAIU7_Hwy6M\" rel=\"noopener noreferrer nofollow\"><em>n8n locally<\/em><\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>Both methods result in the same result: n8n running on your local machine. You can pick the one that best fits your experience and system preferences. Give it a shot and share with me your comments below!<\/p>\n<p>Cheers! \ud83d\ude09<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/930006\/\"> https:\/\/habr.com\/ru\/articles\/930006\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-468224","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=468224"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468224\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}