First make sure Docker is installed (obviously).
curl -sSL https://get.docker.com | sh
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
Then we simply need to create the systemd
file, enable, then start it. Using your favourite text editor create a systemd service file;
Check out the config here; https://hub.docker.com/r/lsioarmhf/nzbget/
sudo vim /etc/systemd/system/nzbget.service
[Unit]
Description=NZBGet container
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker run -p 6789:6789 --name=nzbget -e PUID=1000 -e PGID=1000 -e /etc/localtime:/etc/localtime:gb -v /opt/nzbget:/config -v /mnt:/Downloads lsioarmhf/nzbget
ExecStop=/usr/bin/docker stop -t 2 nzbget
ExecStopPost=/usr/bin/docker rm -f nzbget
[Install]
WantedBy=default.target
Now enable the service;
sudo systemctl enable nzbget
and then start it with sudo systemctl start nzbget
You can check it with sudo systemctl status nzbget
Just open a browser on any device in your network, type in the IP address with port 6789
e.g. 192.168.1.100:6789
2 Likes
eekfonky helped me out last year setting up my pi with nzbget, sonarr and CP, and its still going strong!
now, I tried helping a friend of mine setting up a similar system.
I used his guides to docker install nzbget, sonarr, CP and muximux. the install took me 15 minutes max, so I’m really impressed with the docker way of doing things. ![:+1: :+1:](https://discourse.osmc.tv/images/emoji/twitter/+1.png?v=9)
now im adding an external HDD and the trouble started.
I formatted the drive in exfat, so that should be alright, but I cant seem to give nzbget permission to write to it.
my fstab looks like this:
UUID=DC29-836E /media/hdd exfat nofail,uid=osmc,gid=osmc 0 0
is this correct?
I would suggest using the new options in docker to allow for automatic restarting at boot time instead of a SystemD service, in particular the --restart=unless-stopped
option, which allows docker
to manage containers (which is closer to the intended behaviour). Here the link for reference.
By fiddling around with the OS it’s also possible to add the whatever-device as a docker-machine
and, for example, control it from your laptop.
1 Like
Sorry for my ignorance, but I don’t understand.
I am to use docker features to fix permission issues with my hard drive? I still need to create a mount point and fstab to give it read/write permission, right?
I’m very new at this docker business and basically just copy-pasted from eekfunky’s guide. ![:innocent: :innocent:](https://discourse.osmc.tv/images/emoji/twitter/innocent.png?v=9)
I was commenting on the systemd
script above, I posted soon after you but didn’t realize it.
The command @eekfonky is using makes nzbget
run as the user which has UID=1000
and GID=1000
, does your osmc
user have the same user and group identifiers?
docker is not working anymore to install stuff on the raspi. ![:frowning: :frowning:](https://discourse.osmc.tv/images/emoji/twitter/frowning.png?v=9)
(wish I hadn’t tried to reinstall everything)
so now I’m looking at all the older posts on how to get everything running again.
I have some questions:
- does nzbget, sonarr and CP work with the automount that osmc makes (/media/…) ?
- I have formatted the external drive in the exfat format, so that I can use the drive with both osmc and a windows pc. does this have any effect on write permissions?
- which of the many install instructions can I use to get nzbget, sonarr and CP working?
- do I need to unnmount the osmc mount point and make my own?
thanks for your help!
I’m getting
ERROR: Unsupported distribution ‘osmc’
should I change /etc/os-release
PRETTY_NAME="Open Source Media Center"
NAME="OSMC"
VERSION="May 2019"
VERSION_ID="2019.05-1"
ID=osmc
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.osmc.tv"
SUPPORT_URL="https://www.osmc.tv"
BUG_REPORT_URL="https://www.osmc.tv"
to
ID=Raspbian
EDIT: I tried this and aparently got it running fine, hello world worked just right
But I’ve uninstalled and followed the steps on Install from a package as it seems a cleaner method