Docker build of SABnzbd but also include VPN configuration
5.5K
Docker container which runs the latest SABnzbd client while connecting to WireGuard or OpenVPN with iptables killswitch to prevent IP leakage when the tunnel goes down.
Original Credit goes to DyonR whom I forked from in order to get version 3.5 of SABnzbd.
The container is available from the Docker registry and this is the simplest way to get it
To run the container use this command, with additional parameters, please refer to the Variables, Volumes, and Ports section:
$ docker run --privileged -d \
-v /your/config/path/:/config \
-v /your/downloads/path/:/downloads \
-e "VPN_ENABLED=yes" \
-e "VPN_TYPE=wireguard" \
-e "LAN_NETWORK=192.168.0.0/24" \
-e "NAME_SERVERS=1.1.1.1,1.0.0.1" \
-p 8080:8080 \
--restart unless-stopped \
kalazzerx/sabnzbdvpn
This example uses pia vpn service
---
version: "3.4"
services:
sabnzbd:
image: kalazzerx/sabnzbdvpn:latest
container_name: sabnzbdvpn
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=America/Chicago
- VPN_ENABLED=yes
- VPN_CLIENT=wireguard
- VPN_PROV=pia
- VPN_USER={pia vpn user}
- VPN_PASS={pia vpn password}
- STRICT_PORT_FORWARD=yes
- ENABLE_PRIVOXY=yes
- VPN_INPUT_PORTS=1234
- VPN_OUTPUT_PORTS=5678
- DEBUG=false
- UMASK=0022
- LAN_NETWORK={your local network/24} 192.168.0.0/24
- NAME_SERVERS=84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1
volumes:
- /sabnzbd/config:/config
- /sabnzbd/incomplete:/incomplete-downloads
- /etc/localtime:/etc/localtime:ro
- /media:/downloads
ports:
- 8889:8080
- 8128:8118
restart: unless-stopped
privileged: true
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
| Variable | Required | Function | Example | Default |
|---|---|---|---|---|
VPN_ENABLED | Yes | Enable VPN (yes/no)? | VPN_ENABLED=yes | yes |
VPN_TYPE | Yes | WireGuard or OpenVPN (wireguard/openvpn)? | VPN_TYPE=wireguard | openvpn |
VPN_USERNAME | No | If username and password provided, configures ovpn file automatically | VPN_USERNAME=ad8f64c02a2de | |
VPN_PASSWORD | No | If username and password provided, configures ovpn file automatically | VPN_PASSWORD=ac98df79ed7fb | |
LAN_NETWORK | Yes (atleast one) | Comma delimited local Network's with CIDR notation | LAN_NETWORK=192.168.0.0/24,10.10.0.0/24 | |
NAME_SERVERS | No | Comma delimited name servers | NAME_SERVERS=1.1.1.1,1.0.0.1 | 1.1.1.1,1.0.0.1 |
PUID | No | UID applied to /config files and /downloads | PUID=99 | 99 |
PGID | No | GID applied to /config files and /downloads | PGID=100 | 100 |
UMASK | No | UMASK=002 | 002 | |
HEALTH_CHECK_HOST | No | This is the host or IP that the healthcheck script will use to check an active connection | HEALTH_CHECK_HOST=one.one.one.one | one.one.one.one |
HEALTH_CHECK_INTERVAL | No | This is the time in seconds that the container waits to see if the internet connection still works (check if VPN died) | HEALTH_CHECK_INTERVAL=300 | 300 |
HEALTH_CHECK_SILENT | No | Set to 1 to supress the 'Network is up' message. Defaults to 1 if unset. | HEALTH_CHECK_SILENT=1 | 1 |
ADDITIONAL_PORTS | No | Adding a comma delimited list of ports will allow these ports via the iptables script. | ADDITIONAL_PORTS=1234,8112 |
| Volume | Required | Function | Example |
|---|---|---|---|
config | Yes | SABnzbd, WireGuard and OpenVPN config files | /your/config/path/:/config |
downloads | No | Default downloads path for saving magnet links | /your/downloads/path/:/downloads |
| Port | Proto | Required | Function | Example |
|---|---|---|---|---|
8080 | TCP | Yes | SABnzbd WebUI (HTTP) | 8080:8080 |
8443 | TCP | Yes | SABnzbd WebUI (HTTPS) | 8443:8443 |
Access https://IPADDRESS:PORT from a browser on the same network. (for example: http://192.168.0.90:8443)
The container will fail to boot if VPN_ENABLED is set and there is no valid .conf file present in the /config/wireguard directory. Drop a .conf file from your VPN provider into /config/wireguard and start the container again. The file must have the name wg0.conf.
The container will fail to boot if VPN_ENABLED is set and there is no valid .ovpn file present in the /config/openvpn directory. Drop a .ovpn file from your VPN provider into /config/openvpn and start the container again. You may need to edit the ovpn configuration file to load your VPN credentials from a file by setting auth-user-pass.
Note: The script will use the first ovpn file it finds in the /config/openvpn directory. Adding multiple ovpn files will not start multiple VPN connections.
auth-user-pass credentials.conf
username
password
User ID (PUID) and Group ID (PGID) can be found by issuing the following command for the user you want to run the container as:
id <username>
If you are having issues with this container please submit an issue on GitHub.
Please provide logs, Docker version and other information that can simplify reproducing the issue.
If possible, always use the most up to date version of Docker, you operating system, kernel and the container itself. Support is always a best-effort basis.
I personally do not use SABnzbd, thus providing support about the product is nearly impossible for me.
Content type
Image
Digest
sha256:d3c43df79…
Size
391.1 MB
Last updated
about 1 month ago
docker pull kalazzerx/sabnzbdvpn