# OAuth Callback URL is localhost:5678

**URL:** <https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867>\
**Category:** Questions\
**Tags:** credentials, deployment\
**Created:** [30. Oktober 2020 um 15:45 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867 "2020-10-30T15:45:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Fialkoff](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/josh_fialkoff/32/2268_2.png) [@Josh\_Fialkoff](https://community.n8n.io/u/Josh_Fialkoff)\
**Post date:** [30. Oktober 2020 um 15:45 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/1 "2020-10-30T15:45:01Z")

</div>

I am trying to connect with ClickUp.  
When I create an OAuth2 connection, the OAuth Callback URL is  
[http://localhost:5678/rest/oauth2-credential/callback](http://localhost:5678/rest/oauth2-credential/callback), rather than the subdomain where n8n is installed.  
Do I need to change the permalink in a configuration setting?  
Thanks,  
Josh

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [30. Oktober 2020 um 15:59 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/2 "2020-10-30T15:59:08Z")

</div>

Yes, your setup is not complete. You can find instructions for a production setup here:

> **[Server Setup | n8n Docs](https://docs.n8n.io/getting-started/installation/advanced/server-setup.html)**
>
> n8n is an extendable workflow automation tool that enables you to connect anything to everything via its open, fair-code model.

What is specifically missing here is the environment variable `WEBHOOK_TUNNEL_URL`. You can find the documentation here:

> **[Configuration | n8n Docs](https://docs.n8n.io/getting-started/installation/advanced/configuration.html)**
>
> n8n is an extendable workflow automation tool that enables you to connect anything to everything via its open, fair-code model.

---

<div class="post-metadata">

**Author:** ![Sergio\_Spieler](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/sergio_spieler/32/5860_2.png) [@Sergio\_Spieler](https://community.n8n.io/u/Sergio_Spieler)\
**Post date:** [4. August 2021 um 17:22 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/3 "2021-08-04T17:22:18Z")

</div>

Hello Jan, how are you? The documentation mentioned above for setting up WEBHOOK\_TUNNEL is no longer available - do you have the updated link? We are trying to setup the callback url. Thanks!

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [4. August 2021 um 20:25 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/4 "2021-08-04T20:25:26Z")

</div>

You might be looking for:

> **[Configuration methods | n8n Docs](https://docs.n8n.io/hosting/configuration/configuration-methods/)**
>
> How to set environment variables for n8n.

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [9. August 2021 um 09:05 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/5 "2021-08-09T09:05:30Z")

</div>

Hey @Sergio_Spieler!

Were you able to configure the WEBHOOK\_TUNNEL variable? Let us know if you need more help 🙂

---

<div class="post-metadata">

**Author:** ![docspool](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/docspool/32/10871_2.png) [@docspool](https://community.n8n.io/u/docspool)\
**Post date:** [6. März 2022 um 15:34 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/7 "2022-03-06T15:34:20Z")

</div>

Hi,  
I’m curently running a self hosted instance of n8n on an debian VM  
I couldn’t find a solution to configure the WEBHOOK\_TUNNEL variable to be able to create a credential for Microsoft via OAuth.  
Regards  
Arnaud

---

<div class="post-metadata">

**Author:** ![Thomas\_Pedot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thomas_pedot/32/11975_2.png) [@Thomas\_Pedot](https://community.n8n.io/u/Thomas_Pedot)\
**Post date:** [29. März 2022 um 14:05 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/8 "2022-03-29T14:05:36Z")

</div>

Hello, it seems to be WEBHOOK\_URL now ? I will check…

---

<div class="post-metadata">

**Author:** ![Giorgio](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/giorgio/32/15807_2.png) [@Giorgio](https://community.n8n.io/u/Giorgio)\
**Post date:** [16. August 2022 um 09:50 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/9 "2022-08-16T09:50:51Z")

</div>

> [@Thomas\_Pedot](#):
>
> WEBHOOK\_URL

I confirm the solution, that’s the right command to “adjust” the webhook URL on “auth settings” for the http request, thank you.

---

<div class="post-metadata">

**Author:** ![aigor9534](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aigor9534/32/17098_2.png) [@aigor9534](https://community.n8n.io/u/aigor9534)\
**Post date:** [11. September 2022 um 11:50 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/10 "2022-09-11T11:50:53Z")

</div>

I have the same problem.  
I am trying to connect with Google Sheets.  
When I create an OAuth2 connection, the OAuth Callback URL is  
[http://localhost:5678/rest/oauth2-credential/callback](http://localhost:5678/rest/oauth2-credential/callback), rather than the subdomain where n8n is installed.  
I did it - **export WEBHOOK\_URL=[https://mysite.com](https://mysite.com)** , but it does not work  
Do I need to change the permalink in a configuration setting?  
Thanks,

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [11. September 2022 um 12:32 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/11 "2022-09-11T12:32:48Z")

</div>

Hey @aigor9534,

Just the webhook url option with do the job but depending on your setup getting the option to apply can be different.

With docker I like to recreate the container to be safe.

---

<div class="post-metadata">

**Author:** ![aigor9534](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aigor9534/32/17098_2.png) [@aigor9534](https://community.n8n.io/u/aigor9534)\
**Post date:** [11. September 2022 um 13:05 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/12 "2022-09-11T13:05:50Z")

</div>

Hello Jon,  
I installed it with npm.  
Do I understand correctly that when installing with docker this problem is solved by specifying export WEBHOOK\_URL ?  
If so, is it correct to remove with npm uninstall n8n and reinstall with docker?

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [11. September 2022 um 15:06 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/13 "2022-09-11T15:06:14Z")

</div>

Hey @aigor9534,

You can use it with npm as well if you set the environment variable then start n8n.

---

<div class="post-metadata">

**Author:** ![aigor9534](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aigor9534/32/17098_2.png) [@aigor9534](https://community.n8n.io/u/aigor9534)\
**Post date:** [11. September 2022 um 16:11 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/14 "2022-09-11T16:11:03Z")

</div>

Hey @Jon,  
I do not understand what I need to do else.  
Please, look at image.

 ![3c981f6f9a](https://europe1.discourse-cdn.com/n8n/original/3X/9/5/9526d96b31b752c7e722358fe6d05ce697291af4.jpeg)

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [12. September 2022 um 09:05 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/15 "2022-09-12T09:05:42Z")

</div>

Hey @aigor9534,

Can you try…

```auto
export WEBHOOK_URL=“https://app10-igor.chatarchitect.com/” | sudo n8n start

```

---

<div class="post-metadata">

**Author:** ![aigor9534](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aigor9534/32/17098_2.png) [@aigor9534](https://community.n8n.io/u/aigor9534)\
**Post date:** [12. September 2022 um 09:18 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/16 "2022-09-12T09:18:24Z")

</div>

Hi @Jon,  
Unfortunately, that didn’t work either.

 ![8b29a36685](https://europe1.discourse-cdn.com/n8n/original/3X/9/e/9e7a646e0bab0e9dd9eacfb4e6f6db7c977d8c22.jpeg)

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [12. September 2022 um 09:44 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/17 "2022-09-12T09:44:06Z")

</div>

What about…

```auto
export WEBHOOK_URL=https://app10-igor.chatarchitect.com
n8n start

```

Does that work? Just have it a bash here and it does the trick for me.

---

<div class="post-metadata">

**Author:** ![aigor9534](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aigor9534/32/17098_2.png) [@aigor9534](https://community.n8n.io/u/aigor9534)\
**Post date:** [12. September 2022 um 10:19 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/18 "2022-09-12T10:19:59Z")

</div>

> [@Jon](#):
>
> ```auto
> export WEBHOOK_URL=https://app10-igor.chatarchitect.com
> n8n start
> 
> ```

Oh, it’s working! 😀  
Thank you very much @Jon

---

<div class="post-metadata">

**Author:** ![aigor9534](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aigor9534/32/17098_2.png) [@aigor9534](https://community.n8n.io/u/aigor9534)\
**Post date:** [12. September 2022 um 12:17 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/19 "2022-09-12T12:17:46Z")

</div>

> [@Jon](#):
>
> ```auto
> export WEBHOOK_URL=https://app10-igor.chatarchitect.com
> n8n start
> 
> ```

@Jon, why does it not works with **sudo** n8n start ?  
Only **n8n start**

Thanks,  
Aigor

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [12. September 2022 um 13:49 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/20 "2022-09-12T13:49:50Z")

</div>

Hey @aigor9534,

With sudo something like `sudo WEBHOOK_URL=https://app10-igor.chatarchitect.com n8n start` would probably do it or use the `-E` option with sudo.

---

<div class="post-metadata">

**Author:** ![farhan\_Y](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/farhan_y/32/15417_2.png) [@farhan\_Y](https://community.n8n.io/u/farhan_Y)\
**Post date:** [5. Dezember 2022 um 13:06 UTC](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867/21 "2022-12-05T13:06:45Z")

</div>

Hey @Jon @RicardoE105 , someone please teach me how to get WEBHOOK URL from Development Server? Any link video or something, I’m stuck…

 ![D1 Server 103 edited](https://europe1.discourse-cdn.com/n8n/original/3X/2/c/2c4865791701ef6901ff7917b5f361fffa9841f4.jpeg)

So my WEBHOOK is ip server, not any unique name, please show me how to create one.

 ![localhost error](https://europe1.discourse-cdn.com/n8n/original/3X/1/f/1ff74cf9d760750d7f3f30c552183e706d48c89e.jpeg)

I am using npm to install this n8n to server

[Nächste Seite](https://community.n8n.io/t/oauth-callback-url-is-localhost-5678/2867.md?page=2)
