Deluge can be setup in such a way that several machines (clients) can control deluge (daemon) on a central machine (server) through one of deluge's UI. For Deluge 1.2 upwards, all communication between the GTK UI and daemon is encrypted so SSH tunnelling is not a requirement.
The server setup sections are written for a headless linux server although they could be adapted for other platforms. The client setup sections are platform independent.
Note: Both the client and the server need to be similar versions, i.e. both 1.2.x or both 1.3.x.
GTK UI
Server Setup
- Install Deluge (including deluged) on the server.
- Run deluged, the Deluge daemon: (You may wish to enable logging and/or use an InitScript)
deluged
- Add a user and password to the authentication file (this does not have to be your server's user/pass):
echo "username:password:level" >> ~/.config/deluge/auth
echo "bob:letMEin:10" >> ~/.config/deluge/auth
See UserGuide/Authentication for more information on authentication levels.
Enable Remote Connection
We will use deluge-console to configure deluged to accept connections from machines other than localhost.
Note: These steps can be omitted if you are using SSH Tunnelling.
- Run the Console UI:
deluge-console
- Enable remote connections and check it was set properly:
config -s allow_remote True config allow_remote
- Exit the Console UI:
exit
Restart Daemon
pkill deluged deluged
Verify IP Addresses
You will need to know the server IP address for setting up the client(s). If you do not know your server's private or public IP address use these commands:
- Private IP:
ifconfig | grep -e 'inet addr' | grep -v '127.0.0.1' | cut -f2 -d':' | cut -f1 -d' '
- Public IP:
curl ifconfig.me
Congratulations! The server is now setup for remote GTK UI access.
Client Setup
- Run deluge.
- Go to "Preferences -> Interface" and untick 'Classic Mode' to disable it.
- Restart deluge. You should now see the Connection Manager pop up.
- Remove the localhost daemon.
- Click "Add" and for 'Hostname' enter your server's IP. (For SSH Tunnelling use '127.0.0.2' and Create SSH Tunnel before continuing)
- Leave the Port as default (58846).
- Enter the Username & Password you added to the authentication file then finish by clicking 'Add'. A green tick should now appear as the status for the host you just added.
- (Optional) Expand "Options" and select "Automatically connect to selected host on startup" and "Do not show this dialog on start-up".
- Click "Connect" and the connection manager pop up box should disappear.
Congratulations! You can now access deluge on the server via the GTK UI.
Create SSH Tunnel
- Open up a terminal and enter the following, replacing <server> with the public IP of your server.
ssh -fNL 127.0.0.2:58846:localhost:58846 <server>
Note: We use 127.0.0.2 instead of localhost so that deluge client knows that we are connecting to a remote daemon.
Note: If you get the error:
bind: Can't assign requested addressYou need to add 127.0.0.2 as an alias for the loopback device:
sudo ifconfig lo0 add 127.0.0.2
Web UI
Server Setup
- Install Deluge on the server.
- Run the deluge daemon (You may want to enable logging and/or use an InitScript.):
deluged
- Run deluge Web UI:
deluge-web
deluge-web --fork
- (Optional) If you do not know your server's public ip, run:
curl ifconfig.me
Congratulations! The server is now setup for web UI access.
Client Setup
- Open your preferred web browser.
- Open the URL:
http://<server>:8112
where <server> is either the private or public ip of the server depending if you are on the server's private network or not.
- Default password is "deluge".
Congratulations! You can now access deluge on the server via the web UI.
No comments:
Post a Comment