Friday, January 7, 2022

How To Install SABnzbd Usenet Client with Nginx on Ubuntu 18.04 LTS

 SABnzbd is a free open-source and web-based Usetnet client for downloading binary content (image, audio, video, e-book, etc.) on Usetnet. It’s cross-platform, available for Linux, BSD, MacOS, UNIX, Windows, Synology, QNAP and so on.
Offcial Website: https://sabnzbd.org/
Github:https://github.com/sabnzbd/sabnzbd                        
_______________________________________________________________________________________________________
Our Server Specification- [ Os:  Ubuntu 18.04.2 LTS Bionic Beaver 64Bit ]
_______________________________________________________________________________________________________
lsb_release -cd  ; getconf LONG_BIT ; whoami ; apt update -y ; apt install -y build-essential software-properties-common curl gdebi vim wget aptitude leafpad nano git net-tools lsb-release apt-transport-https nginx

sed -i 's/ubuntu/www.yourdomain.com/g' /etc/hosts
sed -i 's/ubuntu/www.yourdomain.com/g' /etc/hostname

apt update ; apt install sabnzbdplus -y
man sabnzbdplus
sabnzbdplus -d
sabnzbdplus -d --browser 0
sabnzbdplus -d -s 127.0.0.1:8081 --browser 0


nano /etc/systemd/system/sabnzbd.service
[Unit]
Description=SABnzbd Usenet Client
After=network.target

[Service]
Type=simple
User=sabnzbd
Group=sabnzbd
ExecStart=/usr/bin/python -OO /usr/bin/sabnzbdplus --browser 0 &
ExecStop=/usr/bin/pkill sabnzbdplus
Restart=always
SyslogIdentifier=SABnzbd Usenet Client

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
adduser --system --home /home/sabnzbd sabnzbd

addgroup --system sabnzbd
adduser sabnzbd sabnzbd
pkill sabnzbdplus
systemctl start sabnzbd ; systemctl enable sabnzbd ; systemctl status sabnzbd

nano /etc/nginx/conf.d/sabnzbd.conf
server {
       listen 80;
       server_name www.yourdomain.com;

       location / {
              proxy_pass http://localhost:8080;
              proxy_set_header Host $http_host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Proto $scheme;
        }
}
nginx -t ; ifconfig
systemctl enable nginx ; systemctl reload nginx
echo "192.168.11.131 www.yourdomain.com" >> /etc/hosts
http://www.yourdomain.com
_______________________________________________________________________________________________________

No comments:

Post a Comment