{"id":122902,"date":"2025-02-18T13:13:27","date_gmt":"2025-02-18T13:13:27","guid":{"rendered":"\/tutorials\/?p=122902"},"modified":"2026-03-10T09:34:38","modified_gmt":"2026-03-10T09:34:38","slug":"how-to-install-n8n","status":"publish","type":"post","link":"\/ph\/tutorials\/how-to-install-n8n","title":{"rendered":"How to install n8n and self-host on Ubuntu VPS"},"content":{"rendered":"<p><strong>n8n<\/strong> is a workflow automation tool that enables seamless integration between various applications and APIs. The ability to self-host it on an Ubuntu VPS provides better data privacy, customization options, and cost savings compared to managed solutions.<\/p><p>This guide covers two installation methods: Hostinger&rsquo;s easy one-click setup and a manual installation for users who prefer hands-on control. By the end of this tutorial, you&rsquo;ll have a fully functional n8n instance running on your VPS, ready to automate workflows.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h2><p>Before installing n8n, make sure your hosting environment meets the following requirements:<\/p><ul class=\"wp-block-list\">\n<li><strong>Ubuntu Virtual Private Server (VPS)<\/strong><\/li>\n<\/ul><p>Minimum: 1 vCPU, 1GB RAM (<strong>KVM1<\/strong>)<\/p><p>Recommended: 2 vCPU, 2GB RAM (<strong>KVM2<\/strong>)<br>If you don&rsquo;t yet have one, Hostinger offers a range of VPS options, including <a href=\"\/ph\/vps\/n8n-hosting\">n8n VPS hosting<\/a>. <\/p><ul class=\"wp-block-list\">\n<li><strong>Domain<\/strong>\/<strong>subdomain<\/strong>: Optional, but recommended to set up HTTPS and easier access.<\/li>\n\n\n\n<li><strong>Access to your VPS<\/strong>: You&rsquo;ll need to connect to your VPS either over SSH (root required) or by using a hosting control panel (like <a href=\"http:\/\/hpanel.hostinger.com\" target=\"_blank\" rel=\"noopener\">hPanel<\/a>).<\/li>\n\n\n\n<li><strong><a href=\"\/ph\/tutorials\/what-is-docker\">Docker<\/a><\/strong>: If you&rsquo;re following the manual approach, ensure <a href=\"\/ph\/tutorials\/how-to-install-docker-on-ubuntu\">Docker is installed<\/a> on your VPS (it&rsquo;s not required for the template).<\/li>\n<\/ul><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/ph\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner-1024x300.png\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/02\/VPS-hosting-banner.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/02\/VPS-hosting-banner-300x88.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/02\/VPS-hosting-banner-150x44.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2023\/02\/VPS-hosting-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-how-to-install-n8n-using-hostinger-s-vps-template\">How to install n8n using Hostinger&rsquo;s VPS template<\/h2><p>Let&rsquo;s start with the easiest method: using Hostinger&rsquo;s one-click n8n template. This method automates the Ubuntu server setup and installs n8n and its dependencies.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-access-the-vps-dashboard\">1. Access the VPS dashboard<\/h3><p>First, you need to access your VPS dashboard.<\/p><ol class=\"wp-block-list\">\n<li>Go to <a href=\"http:\/\/hpanel.hostinger.com\" target=\"_blank\" rel=\"noopener\">hPanel<\/a> and log in using your preferred method.<\/li>\n\n\n\n<li>Once you&rsquo;re logged in, navigate to the <strong>VPS<\/strong> section on the right-side menu.<\/li>\n\n\n\n<li>Choose the VPS you want to apply the n8n template to and hit the <strong>Manage<\/strong> button next to it.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a380cb\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"310\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/manage-vps-1024x310.png\" alt=\"VPS tab open on hpanel with Manage button highlighted\" class=\"wp-image-122906\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/manage-vps-1024x310.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/manage-vps-300x91.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/manage-vps-150x45.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/manage-vps-768x233.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/manage-vps.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-2-install-the-n8n-template\">2. Install the n8n template<\/h3><ol class=\"wp-block-list\">\n<li>Once in the VPS dashboard, open the <strong>OS &amp; Panel<\/strong> dropdown menu on the left and select <strong>Operating System<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a39b7f\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"428\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/operating-system-1024x428.png\" alt=\"Operating system window open on VPS dashboard\" class=\"wp-image-122907\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/operating-system-1024x428.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/operating-system-300x125.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/operating-system-150x63.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/operating-system-768x321.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/operating-system.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>This is where you can find operating systems and their templates available for your VPS server.<\/p><ol start=\"2\" class=\"wp-block-list\">\n<li>In the <strong>Change OS<\/strong> panel, type <strong>n8n<\/strong> into the search bar and select the n8n template.<\/li>\n<\/ol><ol start=\"3\" class=\"wp-block-list\">\n<li>In the dialogue window that opens, click or tap <strong>Change OS.<\/strong>&nbsp;<\/li>\n<\/ol><ol start=\"4\" class=\"wp-block-list\">\n<li>You&rsquo;ll see a dialog window informing you that your VPS OS will be overwritten and all files will be deleted. Put a checkmark next to &ldquo;<strong>I recognize that all my files will be deleted and cannot be restored<\/strong>&ldquo; and click <strong>Next.<\/strong><\/li>\n<\/ol><ol start=\"5\" class=\"wp-block-list\">\n<li>Enter a password for the root user and click <strong>Confirm<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a3b63a\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"616\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/root-password-1024x616.png\" alt=\"Create New Root Password screen\" class=\"wp-image-122909\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/root-password-1024x616.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/root-password-300x180.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/root-password-150x90.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/root-password-768x462.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/root-password.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Template setup will begin. You&rsquo;ll see a progress bar at the top of your dashboard, like in the example below:<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a3cd83\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"219\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/install-progress-1024x219.png\" alt=\"Progress bar for Recreate VPS action\" class=\"wp-image-122910\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/install-progress-1024x219.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/install-progress-300x64.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/install-progress-150x32.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/install-progress-768x164.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/install-progress.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>After a short wait, your n8n instance will be ready to use.<\/p><h3 class=\"wp-block-heading\" id=\"h-3-test-the-installation\">3. Test the installation<\/h3><p>With n8n set up on your VPS, you should be able to log in and confirm that it&rsquo;s working.<\/p><ol class=\"wp-block-list\">\n<li>In the <strong>VPS dashboard<\/strong> on the <strong>Overview <\/strong>page, click <strong>Panel access <\/strong>and then click on the <strong>Login URL.<\/strong><\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a3e63a\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"168\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/panel-access-1024x168.png\" alt=\"Panel Access tab open showing login url\" class=\"wp-image-122911\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/panel-access-1024x168.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/panel-access-300x49.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/panel-access-150x25.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/panel-access-768x126.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/panel-access.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>This will open the n8n dialog window for registration, which should look something like the example below:<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a3ffeb\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"737\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/n8n-register-1024x737.png\" alt=\" n8n set up owner account window\" class=\"wp-image-122912\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-register-1024x737.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-register-300x216.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-register-150x108.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-register-768x553.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-register.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Simply enter your details and create a password according to the specs indicated. Hit the <strong>Next<\/strong> button, then click through any additional popups, leaving them empty for now. This should bring you to the n8n Overview page:<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a4179c\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"545\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/n8n-Overview-page-1024x545.png\" alt=\"n8n Overview page\" class=\"wp-image-122913\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-Overview-page-1024x545.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-Overview-page-300x160.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-Overview-page-150x80.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-Overview-page-768x409.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-Overview-page-1536x817.png 1536w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-Overview-page.png 1940w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>If you can see the n8n panel in its default view like this, your setup was successful!<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-4-configure-your-n8n-instance\">4. Configure your n8n instance<\/h3><p>Now that your n8n instance is up and running, let&rsquo;s fine-tune its settings for security and customization.<\/p><ol class=\"wp-block-list\">\n<li>Click or tap the three-dot icon next to your name in the bottom left corner and select <strong>Settings<\/strong>:<br><\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a4327e\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"349\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/n8n-settings-1024x349.png\" alt=\"Dialogue selector displayed next to user name with settings highlighted\" class=\"wp-image-122914\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-settings-1024x349.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-settings-300x102.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-settings-150x51.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-settings-768x262.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-settings.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Select <strong>Personal<\/strong> on the left side menu:<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a44e9d\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"335\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/n8n-personal-1024x335.png\" alt=\"Personal page in n8n settings showing user credentials\" class=\"wp-image-122915\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-personal-1024x335.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-personal-300x98.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-personal-150x49.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-personal-768x251.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/n8n-personal.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>This is where you can see and adjust all of your credentials like <strong>First Name<\/strong>, <strong>Last Name<\/strong>, <strong>Email,<\/strong> and <strong>Password<\/strong>.<\/p><p>You can also modify n8n with environment variables:<br><\/p><ol class=\"wp-block-list\">\n<li>Connect to your VPS via SSH or through the <a href=\"https:\/\/support.hostinger.com\/en\/articles\/7978544-how-to-use-the-browser-terminal\" target=\"_blank\" rel=\"noopener\">Browser Terminal<\/a>.<\/li>\n<\/ol><ol start=\"2\" class=\"wp-block-list\">\n<li>Open the <strong>docker-compose.yml <\/strong>file with <strong>nano<\/strong>:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">nano ..\/root\/docker-compose.yml<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Edit the <strong>Environment <\/strong>section &ndash; add or adjust the environment variables. For example, if you want to enable basic authentication, add:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">  - N8N_BASIC_AUTH_ACTIVE=true\n  - N8N_BASIC_AUTH_USER=username\n  - N8N_BASIC_AUTH_PASSWORD=\"password\"<\/pre><p><br>Replace <strong>username<\/strong> and <strong>password above <\/strong>with the actual username and password of your user.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69ee6a6a46665\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"346\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/02\/environment-variables-1024x346.png\" alt=\"Environment section of docker-compose file\" class=\"wp-image-122917\" srcset=\"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/environment-variables-1024x346.png 1024w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/environment-variables-300x102.png 300w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/environment-variables-150x51.png 150w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/environment-variables-768x260.png 768w, https:\/\/www.hostinger.com\/ph\/tutorials\/wp-content\/uploads\/sites\/44\/2025\/02\/environment-variables.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p><\/p><p>Some other commonly used environment variables you may want to include or adjust:<\/p><ul class=\"wp-block-list\">\n<li><strong>N8N_HOST<\/strong> &ndash; Set this to your domain if using one.<\/li>\n\n\n\n<li><strong>N8N_PORT<\/strong> &ndash; The default is <strong>5678<\/strong>, but you can change it if needed.<\/li>\n\n\n\n<li><strong>N8N_PROTOCOL<\/strong> &ndash; Specifies which protocol n8n should use.<\/li>\n\n\n\n<li><strong>WEBHOOK_URL<\/strong> &ndash; Required if using webhooks with a domain.<\/li>\n\n\n\n<li><strong>GENERIC_TIMEZONE<\/strong> &ndash; Optional timezone.<br><\/li>\n<\/ul><ol start=\"4\" class=\"wp-block-list\">\n<li>Save and close nano by typing <strong>CTRL<\/strong>+<strong>X<\/strong>, then <strong>Y, <\/strong>and <strong>ENTER<\/strong>. You can confirm your changes were saved by running:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cat docker-compose.yml<\/pre><p>This will return the whole Docker Compose file. You should see your changes there.<\/p><ol start=\"5\" class=\"wp-block-list\">\n<li>Restart Docker Compose to apply changes:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker-compose down\ndocker-compose up -d<\/pre><p>After restarting Docker Compose, your changes will be implemented. n8n will then use the environment variables you&rsquo;ve set.<\/p><p>If you&rsquo;re using a custom domain, you should also set up SSL. For a secure HTTPS connection, you can use <strong>Let&rsquo;s Encrypt<\/strong> with <strong>NGINX<\/strong> as a reverse proxy:<\/p><ol class=\"wp-block-list\">\n<li>Install <strong>Certbot<\/strong> and <strong>NGINX<\/strong>:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install certbot nginx python3-certbot-nginx -y<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>Create\/open the NGINX site file for n8n:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nano \/etc\/nginx\/sites-available\/n8n<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Configure NGINX as a proxy for traffic to n8n. Add the following, replacing <strong>yourdomain.com<\/strong> below with your own custom domain name:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">server {\nserver_name yourdomain.com;\nlocation \/ {\n    proxy_pass http:\/\/localhost:5678;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n}\n}<\/pre><p>Save and close the file with <strong>CTRL<\/strong>+<strong>X<\/strong>, then <strong>Y <\/strong>and <strong>ENTER.<\/strong><\/p><ol start=\"4\" class=\"wp-block-list\">\n<li>Enable the configuration and restart NGINX:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ln -s \/etc\/nginx\/sites-available\/n8n \/etc\/nginx\/sites-enabled\/\nsudo systemctl restart nginx<\/pre><ol start=\"5\" class=\"wp-block-list\">\n<li>Get an SSL certificate for your custom domain (replace <strong>yourdomain.com<\/strong> below with your custom domain name):<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo certbot --nginx -d yourdomain.com<\/pre><ol start=\"6\" class=\"wp-block-list\">\n<li>Open crontab:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo certbot renew<\/pre><p>Select <strong>nano<\/strong> if prompted to select the editor.<\/p><ol start=\"7\" class=\"wp-block-list\">\n<li>Add the following cron job:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">0 2 * * * certbot renew --quiet --post-hook \"systemctl restart nginx\"<\/pre><p>Let&rsquo;s Encrypt certificates expire every 90 days by default. With this job in place, certbot will renew your certificate automatically when needed.<\/p><ol start=\"8\" class=\"wp-block-list\">\n<li>Open the <strong>docker-compose.yml<\/strong> file with nano:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">nano ..\/root\/docker-compose.yml<\/pre><ol start=\"9\" class=\"wp-block-list\">\n<li>Update the following environment variables:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&nbsp; - WEBHOOK_URL=https:\/\/yourdomain.com\/\n- N8N_HOST=yourdomain.com\n&nbsp; - N8N_PORT=5678\n&nbsp; - N8N_PROTOCOL=https<\/pre><p><br>Save and close the file with <strong>CTRL<\/strong>+<strong>X<\/strong>, then <strong>Y <\/strong>and <strong>ENTER.<\/strong><\/p><ol start=\"10\" class=\"wp-block-list\">\n<li>Restart Docker Compose to run the changes<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker-compose down\ndocker-compose up -d<\/pre><p>With this done, your n8n instance can then be accessed securely using your custom domain name (e.g. <strong>https:\/\/yourdomain.com<\/strong>).<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-n8n-on-ubuntu-manually\">How to install n8n on Ubuntu manually<\/h2><p>If you&rsquo;re using a VPS hosting provider without a one-click n8n template, you&rsquo;ll have to install n8n manually. Let&rsquo;s walk through the step-by-step process to get it up and running on Ubuntu.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-install-dependencies\">1. Install dependencies<\/h3><p>Before setting up n8n manually, we need to install some essential dependencies. Start by connecting to your VPS via SSH or a web-based console. Next, update your package lists and upgrade existing packages to their latest versions by running:<br><\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get update &amp;&amp; sudo apt-get upgrade -y<\/pre><p>This ensures that your system has the latest security patches and software versions before proceeding.<\/p><p>There are two main methods of running self-hosted n8n:<\/p><ul class=\"wp-block-list\">\n<li><strong>Direct installation<\/strong><\/li>\n\n\n\n<li><strong>Containerized installation<\/strong><\/li>\n<\/ul><p>Containerized installation is preferred in most scenarios, however we&rsquo;ll briefly describe both.<\/p><p><strong>Direct installation<\/strong><\/p><p>n8n can run directly in a <strong>Node.js <\/strong>environment, so if you&rsquo;re not using Docker, install the latest long-term support (LTS) version of Node.js:<\/p><ol class=\"wp-block-list\">\n<li>Install <strong>curl <\/strong>and the <strong>Node.js<\/strong> setup script:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">curl -fsSL https:\/\/deb.nodesource.com\/setup_18.x | sudo -E bash -<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>Install <strong>Node.js<\/strong> and <strong>npm<\/strong>:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install -y nodejs<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Verify the installations:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">node -v\nnpm -v<\/pre><p>These commands will return versions of npm and Node.js if they are installed.<\/p><p><strong>Containerized installation<\/strong><\/p><p>If you&rsquo;d prefer to run n8n in a Docker container, install Docker first.<\/p><ol class=\"wp-block-list\">\n<li>Install required dependencies:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>Add Docker&rsquo;s official GPG key:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/usr\/share\/keyrings\/docker-archive-keyring.gpg<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Add the Docker repository and install Docker:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">echo \"deb [arch=amd64 signed-by=\/usr\/share\/keyrings\/docker-archive-keyring.gpg] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null\nsudo apt-get update\nsudo apt-get install -y docker-ce docker-ce-cli containerd.io<\/pre><ol start=\"4\" class=\"wp-block-list\">\n<li>Verify Docker is installed:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker --version<\/pre><p>This command will return the Docker version if it is installed.<\/p><h3 class=\"wp-block-heading\" id=\"h-2-set-up-n8n\">2. Set up n8n<\/h3><p>Once you have all the dependencies installed, you can set up n8n.<\/p><p><strong>Direct installation<\/strong><\/p><p>If you installed Node.js earlier, you can install n8n globally using npm:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">npm install -g n8n<\/pre><p>Start a screen session called n8n:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">screen -S n8n<\/pre><p>Run n8n inside the screen session:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">n8n<\/pre><p>To detach from the screen session, type <strong>CTRL<\/strong>+<strong>A<\/strong> then <strong>D<\/strong>. If you want to re-attach to interact with n8n, run:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">screen -R n8n<\/pre><p>By default, n8n runs on port <strong>5678<\/strong>. You can now access it at:<\/p><p><strong>http:\/\/your-server-ip:5678<\/strong><\/p><p>You might receive a secure cookie error at this point. We will cover SSL certificate creation in later steps.<\/p><p><strong>Containerized installation<\/strong><\/p><p>Pull the latest n8n Docker image:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker pull n8nio\/n8n<\/pre><p>Run the container with port mapping:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker run -d --name n8n -p 5678:5678 n8nio\/n8n<\/pre><ul class=\"wp-block-list\">\n<li><strong>-d<\/strong><strong> <\/strong>&ndash; Runs the container in the background.<\/li>\n\n\n\n<li><strong>&ndash;name n8n<\/strong> &ndash; Names the container n8n.<\/li>\n\n\n\n<li>-p 5678:5678 &ndash; Maps port 5678 on the server to port 5678 in the container.<\/li>\n<\/ul><p>To access n8n in your browser, open:<\/p><p><strong>http:\/\/your-server-ip:5678<\/strong><\/p><p>As with the installation steps above, you might encounter a secure cookie error. Refer to the SSL certificate creation section below.<\/p><p>By default, data inside a Docker container is not persistent. To ensure your workflows and settings are saved, run n8n with a mounted volume:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker stop n8n &amp;&amp; docker rm n8n #stop and remove previous n8n container\ndocker run -d --name n8n -p 5678:5678 -v ~\/.n8n:\/home\/node\/.n8n n8nio\/n8n<\/pre><p>This maps your local <strong>~\/.n8n<\/strong> folder to n8n&rsquo;s data directory inside the container.<\/p><p>If the container does not start, you might lack permissions to write to the volume. Claim permissions by running:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo chown -R 1000:1000 ~\/.n8n\nsudo chmod -R 755 ~\/.n8n<\/pre><p>Then start the container:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker start n8n<\/pre><h3 class=\"wp-block-heading\" id=\"h-3-configure-n8n\">3. Configure n8n<\/h3><p>By default, n8n doesn&rsquo;t enforce authentication, so anyone who accesses your server&rsquo;s IP can use it. To secure your instance, set environment variables before running the container.<\/p><p>With <strong>direct installation<\/strong>, you can use the export command to add variables. In the example below, be sure to replace <strong>username<\/strong>, <strong>password<\/strong>, and <strong>yourdomain.com<\/strong> with your chosen credentials:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">export N8N_BASIC_AUTH_ACTIVE=true\nexport N8N_BASIC_AUTH_USER=username\nexport N8N_BASIC_AUTH_PASSWORD=password\nexport N8N_HOST=yourdomain.com\nexport N8N_PORT=5678\nexport WEBHOOK_URL=https:\/\/yourdomain.com\/\nexport GENERIC_TIMEZONE=UTC<\/pre><p>When running n8n as a Docker container (<strong>containerized installation<\/strong>), you can pass these variables using the -e flag (again, add your own credentials below):<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker stop n8n &amp;&amp; docker rm n8n #stop and remove previous n8n container\ndocker run -d --name n8n \n&nbsp; -p 5678:5678 \n&nbsp; -e N8N_BASIC_AUTH_ACTIVE=true \n&nbsp; -e N8N_BASIC_AUTH_USER=username \n&nbsp; -e N8N_BASIC_AUTH_PASSWORD=password \n&nbsp; -e N8N_HOST=yourdomain.com \n&nbsp; -e N8N_PORT=5678 \n&nbsp; -e WEBHOOK_URL=https:\/\/yourdomain.com\/ \n&nbsp; -e GENERIC_TIMEZONE=UTC \n&nbsp; -v ~\/.n8n:\/home\/node\/.n8n \n&nbsp; n8nio\/n8n<\/pre><h3 class=\"wp-block-heading\" id=\"h-4-enable-secure-access\">4. Enable secure access<\/h3><p>To protect your n8n instance and ensure encrypted connections, we&rsquo;ll set up <strong>SSL <\/strong>(HTTPS) using <strong>Let&rsquo;s Encrypt<\/strong> and <strong>NGINX <\/strong>as a reverse proxy. This is especially important if you&rsquo;re using a custom domain.<\/p><ol start=\"5\" class=\"wp-block-list\">\n<li>Install <strong>NGINX <\/strong>and <strong>Certbot<\/strong>:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt update &amp;&amp; sudo apt install nginx certbot python3-certbot-nginx -y<\/pre><ol start=\"6\" class=\"wp-block-list\">\n<li>Enable and start NGINX:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl enable nginx\nsudo systemctl start nginx<\/pre><ol start=\"7\" class=\"wp-block-list\">\n<li>Create and open a new NGINX configuration file for n8n:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nano \/etc\/nginx\/sites-available\/n8n<\/pre><ol start=\"8\" class=\"wp-block-list\">\n<li>Add the following configuration, replacing <strong>yourdomain.com<\/strong> with your actual domain:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">server {\n&nbsp; &nbsp; server_name yourdomain.com;\n\n&nbsp; &nbsp; location \/ {\n&nbsp; &nbsp; &nbsp; &nbsp; proxy_pass http:\/\/localhost:5678;&nbsp; # Forward requests to n8n\n&nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header Host $host;\n&nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header X-Real-IP $remote_addr;\n&nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n&nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header X-Forwarded-Proto $scheme;\n&nbsp; &nbsp; }\n\n&nbsp; &nbsp; listen 80;\n}<\/pre><p>Then, save and exit by typing <strong>CTRL<\/strong>+<strong>X<\/strong>, then <strong>Y<\/strong>, then <strong>ENTER.<\/strong><\/p><ol start=\"9\" class=\"wp-block-list\">\n<li>Enable the configuration:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ln -s \/etc\/nginx\/sites-available\/n8n \/etc\/nginx\/sites-enabled\/<\/pre><ol start=\"10\" class=\"wp-block-list\">\n<li>Restart NGINX:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart nginx<\/pre><ol start=\"11\" class=\"wp-block-list\">\n<li>Generate a free Let&rsquo;s Encrypt SSL certificate:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo certbot --nginx -d yourdomain.com<\/pre><ol start=\"12\" class=\"wp-block-list\">\n<li>Open crontab:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo certbot renew<\/pre><p>Select <strong>nano<\/strong> if prompted to select the editor.<\/p><ol start=\"13\" class=\"wp-block-list\">\n<li>Add the following cron job:<br><\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">0 2 * * * certbot renew --quiet --post-hook \"systemctl restart nginx\"<\/pre><p>Let&rsquo;s Encrypt certificates expire every 90 days by default. With this job in place, Certbot will renew your certificate automatically.<\/p><p>To confirm that n8n is running with HTTPS, open your browser and enter your domain name in the format <strong>https:\/\/yourdomain.com<\/strong>. If you see the n8n interface without any SSL warnings, your setup was successful and n8n is now ready to use!<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Congratulations! You&rsquo;ve successfully installed and are now self-hosting n8n on your own server. Whether you used Hostinger&rsquo;s one-click setup or installed n8n manually, you now have a powerful workflow automation tool at your fingertips.<\/p><p>Now it&rsquo;s time to start building workflows and automating tasks! From simple <a href=\"\/ph\/tutorials\/n8n-integrations\">n8n integrations<\/a> to complex business processes, n8n gives you the flexibility to connect apps, APIs, and databases without writing tons of code. You can explore various <a href=\"\/ph\/tutorials\/what-can-you-automate-with-n8n\">n8n automation ideas<\/a> that streamline workflows and simplify everyday tasks<\/p><p>Remember these key points:<\/p><ul class=\"wp-block-list\">\n<li><strong>Keep n8n secure<\/strong>: Use authentication, enable HTTPS, and restrict access where necessary.<\/li>\n\n\n\n<li><strong>Update regularly<\/strong>: Stay up to date with the latest n8n and security patches by updating your installation periodically.<\/li>\n\n\n\n<li><strong>Back up your data<\/strong>: If using Docker, ensure persistent storage so your workflows and credentials are safe.<\/li>\n<\/ul><p>If you run into any issues or want to explore advanced configurations, check out the <a href=\"https:\/\/docs.n8n.io\/\" target=\"_blank\" rel=\"noopener\">n8n documentation<\/a> or join the <a href=\"https:\/\/community.n8n.io\/\" target=\"_blank\" rel=\"noopener\">n8n community<\/a> for support.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-n8n-faq\">How to install n8n FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1739883776011\"><h3 class=\"schema-faq-question\">Can you run n8n locally?<\/h3> <p class=\"schema-faq-answer\">Yes, you can run n8n locally by installing it globally using <strong>npm <\/strong>with the command npm install n8n -g. After installation, start n8n by running n8n or n8n start.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1739883781566\"><h3 class=\"schema-faq-question\">Which VPS plan do I need to run n8n?<\/h3> <p class=\"schema-faq-answer\">A VPS with <strong>2 vCores<\/strong> and <strong>4GB RAM<\/strong> should be sufficient to get you started, in which case <a href=\"\/ph\/vps-hosting\">Hostinger&rsquo;s <strong>KVM2<\/strong><\/a><strong> <\/strong>will be more than enough.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1739883800819\"><h3 class=\"schema-faq-question\">How do I access n8n after installing it?<\/h3> <p class=\"schema-faq-answer\">After installing n8n locally, you can access its interface by navigating to<strong> http:\/\/localhost:5678<\/strong> in your web browser if running locally. If you&rsquo;re self-hosting on a VPS with a custom domain, use <strong>http:\/\/yourdomain.com:5678,<\/strong> or <strong>https:\/\/yourdomain.com<\/strong> if SSL is configured.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>n8n is a workflow automation tool that enables seamless integration between various applications and APIs. The ability to self-host it on an Ubuntu VPS provides better data privacy, customization options, and cost savings compared to managed solutions. This guide covers two installation methods: Hostinger&rsquo;s easy one-click setup and a manual installation for users who prefer [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ph\/tutorials\/how-to-install-n8n\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":471,"featured_media":120144,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to install n8n to host your own automation","rank_math_description":"Learn how to install and self-host n8n on VPS using Hostinger\u2019s one-click template or manual setup to automate tasks easily and securely.","rank_math_focus_keyword":"how to install n8n","footnotes":""},"categories":[1],"tags":[],"class_list":["post-122902","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"hreflangs":[],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts\/122902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/users\/471"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/comments?post=122902"}],"version-history":[{"count":12,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts\/122902\/revisions"}],"predecessor-version":[{"id":124484,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts\/122902\/revisions\/124484"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/media\/120144"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/media?parent=122902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/categories?post=122902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/tags?post=122902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}