I run n8n with npm on my local and using version 1.93.0
I have a spotify node and the callback url it gives me to paste to spotify is: http://localhost:5678/rest/oauth2-credential/callback
However: Spotify doesn’t accept http redirect urls anymore and force me to enter https but obviously it returns a “invalid redirect url” error.
In spotify documentation: https://developer.spotify.com/documentation/web-api/concepts/redirect_uri it says that i can’t use localhost but 127.0.0.1 if i want to use http, I try it and it seems like it accept url until i write oauth2-credential portion as for some reason spotify doesn’t like dash “-” for url using http.
If you have a registered domain name, or if you register a domain (typically from $20 to $50 per year), one way to do it is to use a subdomain for your n8n setup, and set up a reverse proxy like Traefik. Traefik can handle the SSL certificate part of it for you using LetsEncrypt. Also, you’ll probably need to use Docker to run Traefik and n8n.
I wrote up a tutorial for it if you want to try. Except for having a registered domain, the rest of it you can do cost-free.
Many hosting services where you can run n8n also handle the https part and you can use a subdomain that comes with the hosting account, but most of those options are arranged where you are either paying a bit or your resources are limited in some way.
Yes, also some people use ngrok, or temp domain but I wouldn’t recommend this, as mentioned using a actual domain is really cheap, Alot of people use traefik, I have to admit I prefer cloudflare tunnel, you can see brought guide here, I can explain more, but the tunnel is super easy and you get SSL through cloudflare, which a lot of providers use, avoid quite a few common problems I think.
I see some people using railway too, hosted in cloud but paying for usage I’ve used this one before but I don’t recommend if just doing dev stuff