I'm having difficulty installing in server

Hi, I’m following the installation tutorial to the letter.

But when I run the command ```
sudo docker-compose up -d


It returns me this error
![Screenshot_153|644x271](upload://nb3I43ael8cras8hrNFNjTiO75s.png)

root@n8n:~# sudo docker-compose up -d
Removing root_traefik_1
Recreating bd5edeccbd9d_root_traefik_1 ... 
root_n8n_1 is up-to-date
Recreating bd5edeccbd9d_root_traefik_1 ... error

ERROR: for bd5edeccbd9d_root_traefik_1  Cannot start service traefik: driver failed programming external connectivity on endpoint root_traefik_1 (238aefd5ba0885aa459c575445779397d4ec653bbebc1e4a039324a86fa10e3c): Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use

ERROR: for traefik  Cannot start service traefik: driver failed programming external connectivity on endpoint root_traefik_1 (238aefd5ba0885aa459c575445779397d4ec653bbebc1e4a039324a86fa10e3c): Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use
ERROR: Encountered errors while bringing up the project.

How can I fix this?
1 Like

Hi @vitor,

It looks like you probably already have something listening on Port 80 maybe another web service like Apache or NGINX.

You could change the traefik port by editing the port definitions in the compose file or depending on what is running on port 80 use that as a reverse proxy.

1 Like

Hi, @Jon,
I changed to port 8080 and it worked, however when I enter the domain the 404 error appears, could you tell me what to do?

Could be anything, I don’t use Traefik for my setup.

Have you set the domain for n8n to use in the .env file?

1 Like

You changed the port of the service that uses port 80 before, or you changed the port n8n/traffic uses? Because the latter will not work.

hi @jan I changed the n8n port.

Yes, i’m config

As mentioned above do not think it works with different ports. It expects the default ports 80 and 443 else will probably the verification for Lets Encrypt not be possible.

I am not a traefik/Lets Encrypt expert, but before looking into anything else would make sure to use the correct ports.

Hi @jan, can you confirm it won’t work 100%? I had a droplet that I didn’t run in a while (1 or 2 months). After powering on and trying to initiate the docker using the sudo docker-compose up -d, I had the same traefik error, then I opened the docker-compose.yml file and edited the port to 8080:8080 instead of 80:80, and tried again, and it went up ok.

I have tried opening the n8n UI in the browser, and looks ok… should I expect something not working? Or do the incoming/outcoming webhooks to fail?

Thanks.

Hey @yukyo,

You can use whatever ports you want for the reverse proxy as that is connecting to n8n so you can use any port you want as long as it passes the connection back to port 5678. The problem you might hit is Lets Encrypt for the HTTP-01 challenge requires port 80 so you may run into some issues with that.

Hmm, as said, the server was off for a couple of months. After being able to up the docker-compose (only after changing the port to 8080:8080), as you can imagine, the SSL certificate was expired, but it renewed automatically:

image

Is that the kind of problem I could face? I just want to make sure I have all angles covered.

Thanks.

Hey @yukyo,

I think the challenge may only be done once for the initial certificate request and after that it doesn’t matter, I have not really dug too much into the inner workings of Lets Encrypt. If anything though that will be the problem you run into as everything else I suspect is over 443 for HTTPS so no worries there.

1 Like