Then sadly no idea what is going on here. If you stop and delete everything via docker-compose and afterward really no other containersgets listed if you run docker ps (as in one of the previous posts above) I have no idea why these ports are still blocked. (unless you have a outside of Docker some kind of webserver running and additionally n8n)
Maybe restart your machine after doing the docker-compose rm and only after the restart run the docker-compose up.
You can also try to run sudo lsof -i -P -n | grep LISTEN. That should display you all the ports that are in use and by what. You should run that after the rm and before the up to see if all ports are really free.
root@vps767290:~# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3da5381f524d traefik “/entrypoint.sh --ap…” 10 days ago Created root_traefik_1
70bff1987a58 n8nio/n8n “tini – /docker-ent…” 10 days ago Created root_n8n_1
root@vps767290:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ERROR: for root_traefik_1 Cannot start service traefik: driver failed programming external connectivity on endpoint root_traefik_1 (f26f1d2e3ee67cee9dcc73209f5b089ba2e5f1f9ee851f7d9ce1c29b543c758f): Error starting userland proxy: lisCreating root_n8n_1 … error
WARNING: Host is already in use by another container
ERROR: for root_n8n_1 Cannot start service n8n: driver failed programming external connectivity on endpoint root_n8n_1 (b8b391a80284c130cca3cb29db07bd1911fd4ff5bf7b722a1d6911c2d7630e4c): Error starting userland proxy: listen tcp 127.0.0.1:5678: bind: address already in use
ERROR: for traefik Cannot start service traefik: driver failed programming external connectivity on endpoint root_traefik_1 (f26f1d2e3ee67cee9dcc73209f5b089ba2e5f1f9ee851f7d9ce1c29b543c758f): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use
ERROR: for n8n Cannot start service n8n: driver failed programming external connectivity on endpoint root_n8n_1 (b8b391a80284c130cca3cb29db07bd1911fd4ff5bf7b722a1d6911c2d7630e4c): Error starting userland proxy: listen tcp 127.0.0.1:5678: bind: address already in use
ERROR: Encountered errors while bringing up the project.
root@vps767290:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
So you have 443 and 5678 ports already listening according to your output:
This is why your container won’t start.
I find a post on StackOverflow where the problem is the same than yours: Docker, host-OS restart and busy ports - Stack Overflow
Maybe you can help you from this post to resolve your issue.