[HOW-TO] Docker Sonarr


First make sure Docker is installed.

It’s also useful to add the current user to Docker group to avoid having to use sudo in front of every Docker command.

sudo usermod -aG docker $USER
Now reboot for changes to take affect.

Once you’re up and running again SSH back in and we simply need to run the Docker parameters to get it up and running. It’s sometimes handy to put them in a wee script for future reference.

Check out the config here; https://hub.docker.com/r/lsioarmhf/sonarr/

I like to keep my config files in /opt in the host (OSMC) but it’s really up to you, (avoiding critical system folders obviously)
To do this I need to create and change permissions on the folders.
sudo mkdir /opt/sonarr
sudo chown -R $USER:USER /opt/sonarr

We’ll also need the PUID and GUID of the user running Docker.
id $USER

uid=1000(osmc) gid=1000(osmc) groups=1000(osmc),4(adm),6(disk),7(lp),20(dialout),24(cdrom),29(audio),44(video),999(docker)

So it’s 1000 for both here

Now for the script, this can go anywhere that’s handy to run so /home/osmc works pretty well
sudo vim start_sonarr_docker.sh

docker run -d \
--restart=unless-stopped \
--name sonarr \
-p 8989:8989 \
-e PUID=1000 \
-e PGID=1000 \
-v /opt/sonarr:/config \
-v /mnt/TV:/tv \
-v /mnt/Downloads/tv:/downloads \

Save & exit

This isn’t a tricky as it looks. The basic rule of thumb is;
The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. So really it’s up to you. I have a HDD mounted at /mnt hence my choice on the left of the colon.

Now make the file executable chmod +x start_sonarr_docker.sh
Run it with the dot slash command

Just open a browser on any device in your network, type in the IP address of OSMC with port 8989


To keep Docker containers up to date I like to use watchtower Google it and you’ll see. It basically keeps things up to date automatically. So again I create a file and make it executable as above;

vim start_watchtower_docker.sh

docker run -d \
--restart=unless-stopped \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \

Save & exit and chmod +x start_watchtower_docker.sh

SImply run docker ps to see all running containers and docker ps -a to see all containers stopped and started.
docker stop <container name>
docker start <container name>
docker restart <container name>
docker rm <container name>

All do exactly as you’d expect with rm meaning remove.

[HOW-TO] Docker Muximux (to control NZBGet, Sonarr & Couchpotato..etc)

out of curiosity, in this scenario the docker pull sonarr in not needed?



No, it does it all from the systemd service


Why use docker? What is it good for? Why not just install sonarr without docker?


It has been my experience that Sonarr randomly crashes on OSMC when installed normally. Updates to Sonarr have also crashed the entire system to an unrecoverable state more than once. I figured containerising it would stop this. It has.

Also I find that real world solutions to problems help me learn new things way better as it’s not just an academic exercise. Once I have learned it I try to share my experience to help others as I’m always on forums asking for help.


One thing to be wary of is Docker ‘layers’ can take up a lot of space.

Also check if aufs is being used instead of Device Mapper. This can make a big difference too.


Does this method also work with the other lsioarmhf versions of other docker containers?
I was thinking of also doing this with Radarr, Jackett, Mylar, Headphones, LazyLibrarian and Deluge. Not sure how to do all of that though.


I just tried with Radarr and all I get is website cannot be reached.


I managed to install radarr on my pi 2 , not in docker
and runs ok, no issues there.
On the other hand radarr without jackett is useless for me…
Jackett doesn t star cause of mono version been to old, it seams mono 4 and higher is needed.
I didn’t find a way to install a newer version of mono on the rpi.
Any advice would be more then welcome :slight_smile:


There’s no reason you can’t use Docker. Or just install Mono as per the instructions here


Can you send your setup and I’ll try to help?