Based on the mini-screen-shot with https://./rest...
looks like none of the environment variables are being picked up by n8n… never mind which ones n8n is actually using in which context. I saw one of the previous posts that looked like your “env” file is named n8n.env
(where you said something about the output of cat n8n.env
) Just double checking that your file is actually named .env
(i.e. no filename root, just dot e n v).
Hi @hubschrauber my environment file is named n8n.env
Hi @barn4k Here is the current environment file configuration. I have removed the port number from the Webhook URL entry.
I hope now it works, I am checking it, also I used the docker compose installation method as suggested by you guys at N8N community support so the SSL is automatically valid.
I am aware that this thread is becoming complicated, but with a little friendly support and cooperation this ticket will be resolved and I will get access to the Google API.
Thanks for all the support till now, I really appreciate it.
Hi @Jon , I am not sure whether do I have to delete the n8n.env file or remove the N8N_EDITOR_BASE_URL entry from the config file. Also I dont know where exactly is the docker compose file.
Is this the one you were asking for?
Could you try renaming your environment file from “n8n.env” to “.env” to see if that is what’s wrong? There could be some code in the n8n product that looks for “n8n.env” but docker-compose doesn’t know anything about that, and node.js wouldn’t load that by default. Both would load “.env” automatically though.
@mynewopportunities , I’m curious what instructions led you to name it “n8n.env” or why you expect n8n to see/load that. Does your docker-compose.yml file contain env_file: "n8n.env"
as documented here ? (Your screen shot of docker-compose.yml cuts off before the n8n section… It would be more helpful if you could include the entire text of it.) Are you seeing changes in n8n reflecting any other env var you have in the “n8n.env” file?
Anyone else want to chime in on whether n8n is “rigged” somewhere to actually load “n8n.env”, or if that is a convention in one of the framework libraries n8n uses? I searched through source and docs and couldn’t find anything.
I removed the controversial n8n.env file and created a new .env with the same contents as in the earlier file.
I am afraid the oauth url is still the same, even after renaming it to the .env file and a server reboot.
Your docker-compose.yml
has:
environment:
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
which should work since .env
contains:
SUBDOMAIN=n8n
DOMAIN_NAME=clouddevops.online
but you could change docker-compose.yml
to:
environment:
- WEBHOOK_URL=${WEBHOOK_URL}
to reference the value of WEBHOOK_URL from .env
The root problem might be that the docker-compose.yml
and/or .env
changes have NOT been applied to the containers. Try rebuilding your containers with:
docker compose up --no-start --force-recreate && docker compose start
I got this output. @hubschrauber what could be missing here?
This error indicates that n8n is probably already started some other way and docker can’t bind to port 5678. It’s hard to guess at what’s going on, but the first thing I would check is whether you have n8n running as a system service (i.e. not in Docker).
What does systemctl status
tell you?
Is n8n running as a service? If so, you might try shutting it down and disabling it from starting again on reboot by:
sudo systemctl status n8n
sudo systemctl stop n8n
sudo systemctl disable n8n
and then try starting n8n as a Docker container by:
docker compose start
@mynewopportunities I would stop trying to do multiple things at once as you will make mistakes.
So far in this post you have been given the correct answer fairly early on that would have solved this but since then you have likely tried the install script, using a tunnel and renamed some files when all you needed to do was set 1 env option, delete the incorrect one then stop and start the container.
One of the requirements we have for self hosting is that you know how to manage a server and containers and sadly in this case you have taken the hard path to learning more about them.
What I would do at this point assuming it is a server that you are only using for n8n is completely reset it and from there follow one of our install guides and that will get you up and running in less than 10 minutes.
If you can’t reset the server I would stop and remove the docker containers, delete the images and make sure there is nothing running then follow the guide.
@hubschrauber It has started working. I just followed all your instructions. Thank You! We can now close this thread.
Please dont remove anything from the central server now, I think everything is working fine now.
Appreciate your valuable support and patience!
Thank You once again @hubschrauber
Sure @mynewopportunities. Glad you finally got it working. The only reason I keep trying to help on stuff like this is that I’ve been there too. Quite a lot of the n8n documentation is written from the perspective of someone who is intermediate to expert level with LOTs of stuff. That’s not so much of a criticism as it is just a matter-of-fact. While you can’t (shouldn’t) include instructions about basic things like “How to use a Linux shell” in every set of instructions, everywhere, once it becomes apparent where several people have run in to trouble, it would be nice to see some of these things included in the official docs as “troubleshooting notes.” I suppose that’s why the community forum exists, but sifting through a bunch of 50+ message posts, or no-(useful)-response posts, or outdated posts, in hopes of finding an answer is often painful.
Also, BTW, I find it a little bit entertaining that you picked Jon’s post, where he’s lecturing you about not knowing what you’re doing, as the “solution.” That’s sorta poetic. Kudos to Jon for continuing to help in spite of his apparent frustration.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.