Docker - Sonarr listening on port 7878 by default

Sonarr version (exact version): Latest from Docker
OS: Ubuntu 20.04
Debug logs:
Description of issue: Sonarr is listening on the wrong port.

I used the command from the docker hub: https://hub.docker.com/r/linuxserver/sonarr

docker run -d \
  --name=sonarr \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -p 8989:8989 \
  -v /path/to/data:/config \
  -v /path/to/tvseries:/tv `#optional` \
  -v /path/to/downloadclient-downloads:/downloads `#optional` \
  --restart unless-stopped \
  lscr.io/linuxserver/sonarr

I can’t access Sonarr, so I checked docker log and saw that it’s listening on port 7878, like Radarr. Not sure why because as you can see, I exposed port 8989.


[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr.exe - Version 3.0.7.1477 

[Info] AppFolderInfo: Data directory is being overridden to [/config] 

[Info] Router: Application mode: Interactive 

[Info] MigrationLogger: *** Checking database for required migrations data source=/config/sonarr.db;cache size=-10000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 

[Info] MigrationLogger: *** Checking database for required migrations data source=/config/logs.db;cache size=-10000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 

[Info] OwinHostController: Listening on the following URLs: 

[Info] OwinHostController:   http://*:7878/ 

[Info] SonarrBootstrapper: Starting Web Server

Any ideas on how to change it?

EDIT

Found the solution. Simply ran docker exec, installed nano, edited /config/config.xml to use the correct port, restarted the container and now it works on localhost:8989.

for future reference, the config folder is (volume mapped) on the host so you can edit it outside of docker (thats the entire point of mapping volumes to the host)

even if you didnt have access to the config file you could just change the docker port mapping to 8989:7878 so externally youd use 8989 (thats the point of port mappings).

if you really wanted to change it inside the container without external tools then set your docker config back to 7878:7878 open the sonarr web gui (on 7878) and change it in there to 8989, then also change the docker config back to 8989:8989 and recreate the container.

you need to remember that just because you exposed/mapped an internal port that doesnt mean theres anything actually listening on that internal port. you have to make sure the application is configured to use that port as well.

ie you could have added a port mapping for 8080:80 and that too would not work because sonarr wasnt configured to use port 80 either

just to be clear you didnt use that exact command did you? you changed the /path/to/... bits to the actual host paths?

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