{"id":275,"date":"2025-08-04T08:35:15","date_gmt":"2025-08-04T08:35:15","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2025\/08\/04\/11927159-changing-the-domain-for-n8n-on-vps-at-hostinger\/"},"modified":"2026-01-19T04:06:17","modified_gmt":"2026-01-19T04:06:17","slug":"11927159-changing-the-domain-for-n8n-on-vps-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/11927159-changing-the-domain-for-n8n-on-vps-at-hostinger\/","title":{"rendered":"Changing the Domain for n8n on VPS at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">If you want to use your own domain (or subdomain) for accessing n8n instead of the default <code>srvXXXXX.hstgr.cloud<\/code> address, you can update the configuration by following these steps:<\/p><ol>\n<li>\n<p class=\"no-margin\">First, please make sure that the n8n subdomain of your desired domain is correctly <a class=\"intercom-content-link\" href=\"\/support\/1583227-how-to-point-a-domain-to-your-vps\" target=\"_blank\" rel=\"noopener\">pointed to your VPS IP address<\/a> using an A record in your DNS settings.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Access your VPS through a browser terminal:<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2025\/08\/c3be7195-4e5e-4aab-8173-fe07aaa9a263.jpg\" alt=\"Browser terminal\"><\/div>\n<\/li>\n<li>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Navigate to the n8n directory:<\/p>\n<div class=\"relative group\/copy bg-bg-000\/50 border-0.5 border-border-400 rounded-lg\">\n<div class=\"sticky opacity-0 group-hover\/copy:opacity-100 top-2 py-2 h-12 w-0 float-right\">\n<div class=\"absolute right-0 h-8 px-2 items-center inline-flex z-10\"><\/div>\n<\/div>\n<div>\n<pre class=\"code-block__code !my-0 !rounded-lg !text-sm !leading-relaxed\"><code>cd \/docker\/n8n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">Edit the environment configuration file by running:<\/p>\n<pre><code>nano .env<\/code><\/pre>\n<\/li>\n<li>\n<p class=\"no-margin\">On the second line of the file, locate the domain entry (typically something like <code>srvXXXXX.hstgr.cloud<\/code>) and replace it with your own domain that points to your VPS.<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2025\/08\/0e51d42b-738b-41d5-9d03-11ba393dba2c.jpg\" alt=\"n8n .env file\"><\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">Save the file by pressing Ctrl+X, then Y, and Enter.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Restart the n8n service to apply the changes:<\/p>\n<pre><code>docker compose down\r\ndocker compose up -d<\/code><\/pre>\n<\/li>\n<\/ol><p class=\"no-margin\">Once restarted, you should be able to access n8n via your custom domain. Make sure DNS propagation is complete before testing the new address.<\/p><p class=\"no-margin\">\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to change default domain for n8n VPS?<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[199],"tags":[],"class_list":["post-275","post","type-post","status-publish","format-standard","hentry","category-vps-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/11927159-changing-the-domain-for-n8n-on-vps-at-hostinger\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":7409,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/275\/revisions\/7409"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}