Deluge (Linux)

Aus Tutorials
Zur Navigation springen Zur Suche springen

Noch in Bearbeitung


Installation

Basis

sudo add-apt-repository ppa:deluge-team/ppa
sudo apt-get update
sudo apt-get install deluge

Dämon

sudo apt-get install deluged

Systembenutzer anlegen:

sudo addgroup --system --no-create-home --disabled-login --gid 134 deluge
sudo adduser --uid 134 --system --gid 134 --home /var/lib/deluge deluge

Der Gruppe deluge müssen noch Schreibrechte für das neu angelegte Verzeichnis gegeben werden:

sudo chmod g+w /var/lib/deluge/

Eigenen Benutzer der Gruppe hinzufügen:

sudo adduser <username> deluge
sudo vi /etc/init/deluged.conf

Und mit folgendem Inhalt befüllen:

# deluged - Deluge daemon
#
# The daemon component of Deluge BitTorrent client. Deluge UI clients
# connect to this daemon via DelugeRPC protocol.

description "Deluge daemon"
author "Deluge Team"

start on filesystem and static-network-up
stop on runlevel [016]

respawn
respawn limit 5 30

env uid=deluge
env gid=deluge
env umask=007

# exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d -l /var/log/deluge/daemon.log -L warning

Web UI

sudo apt-get install deluge-web
sudo vi /etc/init/deluge-web.conf

und mit folgendem Inhalt befüllen:

# deluge-web - Deluge Web UI
#
# The Web UI component of Deluge BitTorrent client, connects to deluged and
# provides a web application interface for users. Default url: http://localhost:8112

description "Deluge Web UI"
author "Deluge Team"

start on started deluged
stop on stopping deluged

respawn
respawn limit 5 30

env uid=deluge
env gid=deluge
env umask=027

exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web
http://<server>:8112

Apache

SSL-Zertifikat erstellen - dazu siehe SSL_Zertifikat

sudo vi /etc/apache2/sites-available/deluge.conf
<VirtualHost *:80>
        ServerName deluge.kirner.or.at
        Redirect / https://deluge.kirner.or.at
</VirtualHost>
sudo vi /etc/apache2/sites-available/deluge-ssl.conf
<VirtualHost *:443>
    ServerName deluge.kirner.or.at

    SSLEngine On
    SSLCertificateFile /etc/ssl/certs/deluge.crt
    SSLCertificateKeyFile /etc/ssl/private/apache.key

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyVia Off

    ProxyPass / http://127.0.0.1:8112/
    ProxyPassReverse / http://127.0.0.1:8112/

    ErrorLog ${APACHE_LOG_DIR}/deluge.kirner.or.at-error.log
    CustomLog ${APACHE_LOG_DIR}/deluge.kirner.or.at-access.log combined
</VirtualHost>

Logging

sudo mkdir -p /var/log/deluge
sudo chown -R deluge:deluge /var/log/deluge
sudo chmod -R 750 /var/log/deluge
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d -l /var/log/deluge/daemon.log -L warning
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web -- -l /var/log/deluge/web.log -L warning
sudo vi /etc/logrotate.d/deluge
/var/log/deluge/*.log {
        rotate 4
        weekly
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
        postrotate
                initctl restart deluged >/dev/null 2>&1 || true
                initctl restart deluge-web >/dev/null 2>&1 || true
        endscript
}

Links

Install Deluge

Dämon

Install Web-UI

Deluge as a Service


Zurück zu Ubuntu