= Thin Client = [[PageOutline(2-4,,inline)]] 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 === 1. [wiki:Installing Install Deluge] (including ''deluged'') on the server. 1. Run ''deluged'', the Deluge daemon: (You may wish to [wiki:Faq#HowdoIstartthedaemonwithloggingenabled enable logging] and/or use an [UserGuide/InitScript InitScript]) {{{ #!sh deluged }}} 1. Add a user and password to the authentication file (this does not have to be your server's user/pass): {{{ #!sh echo "username:password:level" >> ~/.config/deluge/auth }}} where "username" and "password" are the username and password you intend to use and "level" is your desired authentication level. For example: {{{ #!sh 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.'' 1. Run the Console UI: {{{ #!sh deluge-console }}} 1. Enable remote connections and check it was set properly: {{{ config -s allow_remote True config allow_remote }}} 1. Exit the Console UI: {{{ exit }}} ==== Restart Daemon ==== {{{ #!sh 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: 1. Private IP: {{{ #!sh ifconfig | grep -e 'inet addr' | grep -v '127.0.0.1' | cut -f2 -d':' | cut -f1 -d' ' }}} 1. Public IP: {{{ #!sh curl ifconfig.me }}} Congratulations! The server is now setup for remote GTK UI access. === Client Setup === 1. Run ''deluge''. 1. Go to "Preferences -> Interface" and ''untick'' 'Classic Mode' to disable it. 1. Restart deluge. You should now see the Connection Manager pop up. 1. Remove the localhost daemon. 1. Click "Add" and for 'Hostname' enter your server's IP. (For SSH Tunnelling use '127.0.0.2' and [UserGuide/ThinClient#CreateSSHTunnel Create SSH Tunnel] before continuing) 1. Leave the Port as default (58846). 1. 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. 1. ''(Optional)'' Expand "Options" and select "Automatically connect to selected host on startup" and "Do not show this dialog on start-up". 1. 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 ==== 1. Open up a terminal and enter the following, replacing with the public IP of your server. {{{ #!sh ssh -fNL 127.0.0.2:58846:localhost:58846 }}} '''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 address }}} You need to add 127.0.0.2 as an alias for the loopback device: {{{ #!sh sudo ifconfig lo0 add 127.0.0.2 }}} == Web UI == === Server Setup === 1. [wiki:Installing Install Deluge] on the server. 1. Run the deluge daemon (You may want to [wiki:Faq#HowdoIstartthedaemonwithloggingenabled enable logging] and/or use an [UserGuide/InitScript InitScript].): {{{ #!sh deluged }}} 1. Run deluge Web UI: {{{ #!sh deluge-web }}} You can also use the --fork option to have the deluge-web process run in the background and again, you may want to use an [UserGuide/InitScript InitScript]. {{{ #!sh deluge-web --fork }}} 1. ''(Optional)'' If you do not know your server's public ip, run: {{{ #!sh curl ifconfig.me }}} Congratulations! The server is now setup for web UI access. === Client Setup === 1. Open your preferred web browser. 1. Open the URL: {{{ http://:8112 }}} where is either the private or public ip of the server depending if you are on the server's private network or not. 1. Default password is "deluge". Congratulations! You can now access deluge on the server via the web UI.