(SOLVED) Swag: "bind: address already in use"

Running docker-compose up, I get the error message

ERROR: for swag  Cannot start service swag: driver failed programming external connectivity on endpoint swag (6c200ae56241c84154e76a71058be36ffa7bd8af19f7b6de7b8a9841b4ffc2cb): failed to bind port 0.0.0.0:443/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use
ERROR: Encountered errors while bringing up the project.

I can’t figure out why the port 443 is taken.

“docker ps -a” gives

> docker ps -a
CONTAINER ID   IMAGE                                          COMMAND                  CREATED         STATUS                         PORTS                                       NAMES
786ab35c6eda   lscr.io/linuxserver/nextcloud:version-29.0.4   "/init"                  5 minutes ago   Up 5 minutes                   80/tcp, 443/tcp                             nextcloud
422d24f69194   wallabag/wallabag                              "/entrypoint.sh wall…"   5 minutes ago   Up 5 minutes (healthy)         0.0.0.0:32770->80/tcp, [::]:32770->80/tcp   wallabag
6ae7528e289d   linuxserver/swag                               "/init"                  5 minutes ago   Created                                                                    swag
1cb41e346f8f   linuxserver/mariadb                            "/init"                  5 minutes ago   Up 5 minutes                   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp   mariadb
307590a591ce   privatebin/nginx-fpm-alpine:1.2.1              "/init"                  5 minutes ago   Up 5 minutes                   80/tcp, 8080/tcp                            docker_privatebin_1
16c9c6d81e44   benbusby/whoogle-search                        "/bin/sh -c 'misc/to…"   5 minutes ago   Restarting (1) 4 seconds ago                                               whoogle
3d325c2254ce   lscr.io/linuxserver/dokuwiki:latest            "/init"                  5 minutes ago   Up 5 minutes                   80/tcp, 443/tcp                             dokuwiki
cfb032e6ddfd   lscr.io/linuxserver/calibre-web                "/init"                  5 minutes ago   Up 5 minutes                   0.0.0.0:8083->8083/tcp, :::8083->8083/tcp   calibre-web
028a28aad9f6   homeassistant/home-assistant:stable            "/init"                  5 minutes ago   Up 5 minutes                   0.0.0.0:8123->8123/tcp, :::8123->8123/tcp   homeassistant
3d55c2b03b82   lscr.io/linuxserver/freshrss:latest            "/init"                  5 minutes ago   Up 5 minutes                   80/tcp, 443/tcp                             freshrss
65d5ab80367f   redis:alpine                                   "docker-entrypoint.s…"   5 minutes ago   Up 5 minutes (healthy)         6379/tcp                                    docker_redis_1
95ca51efba15   mysql:5.7                                      "docker-entrypoint.s…"   5 minutes ago   Up 5 minutes                   3306/tcp, 33060/tcp                         docker_wdb_1
e124f962597e   ghcr.io/linuxserver/piwigo                     "/init"                  5 minutes ago   Up 5 minutes                   80/tcp, 443/tcp                             piwigo
4cc43c59959e   lscr.io/linuxserver/jellyfin                   "/init"                  5 minutes ago   Up 5 minutes                   8096/tcp, 8920/tcp                          jellyfin
6069493eff5f   lscr.io/linuxserver/nzbget:latest              "/init"                  5 minutes ago   Up 5 minutes                   0.0.0.0:6789->6789/tcp, :::6789->6789/tcp   nzbget
159511117a16   mariadb                                        "docker-entrypoint.s…"   5 minutes ago   Up 5 minutes (unhealthy)       3306/tcp                                    walladb
cdb84ad97bc8   onlyoffice/documentserver                      "/app/ds/run-documen…"   5 minutes ago   Up 5 minutes                   80/tcp, 443/tcp                             documentserver

Nextcloud, dokuwiki, freshrss, piwigo and documentserver all seem to use 443, but I can’t understand why. My docker-compose doesn’t bind the port to them:
Docker-compose.yml

“docker logs swag” gives no output.

swag/log/nginx/error.log and access.log both have nothing from the latest attempts to get the container going.

Nginx.conf is here.

Solved this, for some reason tailscaled was taking up port 443 also for non-tailscale connections. That’s weird, as docker and tailscaled have lived happily together on this machine for years.

But anyway, this was solved by looking real hard at the output of

netstat -tulpn

and then doing a


systemctl stop tailscaled.service

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.