How to Set a Custom Domain for n8n on Your VPS
Why use a custom domain name for n8n on your VPS?
Using a custom domain name for n8n on your VPS provides better accessibility, improved security with HTTPS, and enables necessary features like OAuth2 authentication for third-party services. It also makes the n8n interface easier to access, share, and integrate into our existing infrastructure.
Benefit of using a custom domain on your VPS with n8n
- Simplified access - Accessing n8n at URLs like
https://n8n.[your-vps-hostname].gbnet.cloud
works out of the box, but replacing this with a custom domain improves readability and more aligned with your brand. - Professional setup - A branded, custom domain reflects a production-level service and improves user confidence.
- Secure connection - A custom domain makes it easy to enable HTTPS with an SSL certificate, ensuring encrypted and secure communication with your n8n instance.
- Third-Party Integration Support - Many external services (like Google, GitHub, and Slack) require a valid domain for OAuth2 authentication and webhook callbacks.
In the guide below, we’ll walk you through how to configure a custom domain name for your n8n instance running on your VPS.
- The first step is to point the A record of your domain to your server’s IP address within your DNS zone settings.
- You may verify if the A record is successfully pointed by using the DNSWatch website.
- After verifying the A record for your domain, you can proceed to connect to your n8n Virtual Private Server (VPS) via SSH.
- You can use the command below to update the n8n URL to your custom domain name.
- Stop and remove older version
docker compose down
- You can edit the docker-compose.yml file and update the existing URL to your desired custom domain name.
nano docker-compose.yml
The highlighted line in the image above is where you need to update the URL to your desired custom domain name. In this example, we changed the default URL from n8n.gbnetwork-78920837.gbnet.cloud to n8n.onetime.my. Below is the result after the changes have been applied.
To save the file, press Ctrl + X
, then press Y
to confirm, and hit Enter
to exit.
- Start the container
docker compose up -d
- You may now try accessing the n8n panel using your custom domain name.
If you face any issues or need assistance, don’t hesitate to reach out — our support team is always ready to help!
🔧 Need help? Submit a Support Ticket
💬 **Chat with us on Live Chat via our ** website ****
Updated on: 11/06/2025
Thank you!