How to Change Webhook URL in n8n – Step-by-Step Guide

How to Change Webhook URL in n8n – Step-by-Step Guide

how to change webhook url in n8n

How to Change Webhook URL in n8n

When managing automations through an n8n integrations (for example, syncing workflows with HubSpot), you may find that the generated webhook URL points to the wrong address often localhost. This misconfiguration can stop your external services, such as forms or CRMs, from sending data properly.

This guide explains how to change the webhook URL in n8n and how to change the webhook URL in n8n Docker so your workflows stay connected and your triggers fire as expected.

Why the Webhook URL May Be Incorrect

Understanding Default Behaviour

When you create a webhook in n8n, the platform automatically generates a URL using its internal host and port. For local environments, this is often something like “localhost:5678”. In production, however, n8n may be running behind a reverse proxy or in a Docker container meaning the internal and external addresses differ.

As a result, your public services can’t reach the webhook endpoint, and data transfer fails.

Real-Life Example

A marketing team uses n8n to capture new leads from a form builder and send them to HubSpot. On their local machine, everything works. But once deployed to a cloud server, the webhook still references localhost. The external form tool rejects the URL because it isn’t publicly accessible.

This common situation leads to confusion even though the workflow logic is fine, the webhook URL is simply misconfigured.

How to Change Webhook URL in n8n

For Self-Hosted (Non-Docker) Setups

  1. Identify your correct public domain — for example, “https://automation.yourcompany.com”.

  2. Stop n8n temporarily.

  3. In your environment settings, specify your public domain as the webhook URL.

  4. If you use a proxy, ensure that proxy headers are enabled so n8n recognises the correct public address.

  5. Restart n8n after making these adjustments.

  6. Deactivate and then reactivate any workflows using webhooks to refresh their URLs.

How to Confirm the Change

  • Open the webhook node inside n8n and check the URL. It should now display your public domain instead of “localhost”.

  • Send a test webhook from your external system.

  • Open the Executions panel in n8n to verify that the request triggered successfully.

Common Mistakes

  • Using an HTTP URL instead of HTTPS can cause validation failures with many platforms.

  • Forgetting to reactivate workflows after changing settings will keep the old URLs active.

  • If n8n runs behind a reverse proxy, ensure the proxy headers (for host and protocol) are correctly passed along.

  • To customise the webhook path (for example, changing /webhook to /api), adjust the endpoint configuration in n8n’s environment variables.

how to change webhook url in n8n docker

How to Change Webhook URL in n8n Docker

When Running in Docker

If you deploy n8n through Docker Compose or another container platform, the webhook URL often defaults to “localhost” inside the container. Since external apps can’t access that, you must configure n8n to recognise your public domain.

Steps to Fix It

  1. Edit your Docker configuration to include your domain name, port, and protocol (for example, HTTPS).

  2. Specify your public webhook URL in the environment settings so n8n generates links based on your actual domain.

  3. If you use a reverse proxy like NGINX, ensure it forwards HTTPS requests to the correct container port.

  4. Save the changes and restart your containers.

  5. Deactivate and reactivate your workflows to apply the new webhook address.

  6. Test with your external service (for instance, GitHub, Slack, or HubSpot) to confirm the new endpoint works.

Additional Tips for Docker Users

  • Avoid using “localhost” or internal container names in webhook URLs.

  • For development with tools like ngrok, use your temporary public tunnel URL to test external triggers.

  • Always re-deploy n8n after modifying environment configurations so the new settings take effect.

Why It Matters for HubSpot and Other Integrations

In HubSpot or similar SaaS ecosystems, external systems often validate webhook URLs during registration. If n8n exposes a local or private address, integrations fail with messages like “webhook unreachable” or “URL mismatch.”

Correctly updating the webhook URL ensures your HubSpot forms, API events, and automated workflows remain stable. Many companies overlook this small step and waste hours debugging, when the fix is simply updating the environment settings.

Quick Recap

  • Identify your public domain and correct protocol.

  • Update the webhook URL in n8n’s environment configuration.

  • Restart or redeploy n8n.

  • Reactivate workflows to register the new address.

  • Test from the external service to confirm successful execution.

Doing this keeps your automations connected and ensures reliable communication between n8n and platforms such as HubSpot, Slack, or GitHub.

FAQs

Q1: Can I change the webhook path from “/webhook” to “/api”?

Yes. You can redefine the webhook path through your environment configuration settings.

Q2: Do I need to change the webhook URL for n8n Cloud?

In most cases, no. n8n Cloud automatically uses the correct domain, but check your integrations if you notice connection issues.

Q3: Will changing the webhook URL affect active workflows?

Yes. After changing the configuration, deactivate and reactivate workflows to refresh their registered URLs.

Q4: How can I use a temporary URL during testing?

You can set a temporary tunnel URL from services like ngrok in your configuration for short-term testing.

Q5: Do I need to manually edit each webhook node?

No. After updating the environment settings and reactivating workflows, n8n will automatically generate updated URLs.

Relevant Guide

How to Sign Up for HubSpot Academy Without a Company in 2025

HubSpot Free AI Writer – Your New Content Sidekick in 2025

HubSpot Snippets Guide – How Do i Use HubSpot Snippets?

HubSpot Add Border to Rich Text Box – Beginners Guide

Blackbaud HubSpot Integration

Eventbrite HubSpot

n8n Loop Over items

By Uttam Mogilicherla

I am a certified HubSpot Consultant, Full Stack Developer, and Integration Specialist with over 15 years of experience successfully transforming business-critical digital ecosystems. My expertise spans the entire software lifecycle, ranging from high-performance web application development to managing large-scale migrations, enterprise-grade CRM integrations, and secure compliance-driven solutions.

BACK TO TOP
Mpire Solutions - TYPE: CRM RATING:
5 ( 20 ratings )