Remote deluge daemon connection

I'm trying to follow this guide to run a deluge daemon on a headless server. The client part seems to be working, but the server part doesn't seem to work at all.

Deluge-console is supposed to allow you to send commands to the daemon in a text-only environment. However I can't get it to connect to itself. Whenever I start it, it says Failed to connect to 127.0.0.1:58846 with reason: Password does not match. If I try a command like deluge-console "config -s allow_remote True", I get an error dump like this:

[ERROR   ] 03:21:31 client:391 RPCError Message Received!
--------------------------------------------------------------------------------
RPCRequest: daemon.login(localclient, <a long string>)
--------------------------------------------------------------------------------
  File "/usr/lib/python2.7/dist-packages/deluge/core/rpcserver.py", line 259, in dispatch
    ret = component.get("AuthManager").authorize(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/deluge/core/authmanager.py", line 93, in authorize
    raise BadLoginError("Password does not match")

BadLoginError: Password does not match
--------------------------------------------------------------------------------
Failed to connect to 127.0.0.1:58846 with reason: Password does not match

~/.config/deluge/auth looks like this:

localclient:<a long string>:10

where appears identically in both files. So I'm pretty sure it's not that the auth file is wrong. I notice that when I start the deluge daemon, htop tells me the processes associated with deluged belong to my deluge user. this guide has you create the user "deluge" for running deluge. Should I run deluge as myself, instead?

Ultimately, what am I missing?


It turns out the fact that it was running as a user called "deluge" is significant. The guide had me set deluge's home directory to /var/lib/deluge, where there was a second configuration directory - the one which was actually read by the daemon. When I used the password for localclient from that auth, instead of the previous <a long string>, I was able to use deluge-console as expected. I was able to complete the guide and give myself remote access by modifying that auth file and ignoring the one in my home directory.


I would leave a comment to Adam's answer, but I don't have the reputation to do that. Adam's answer worked for me, but I thought it would be helpful to be a little more explicit about the steps necessary to fix this problem.

  1. Open /var/lib/deluge/.config/deluge/auth in a text editor.
  2. Copy the password found there.
  3. Open ~/.config/deluge/auth in a text editor.
  4. Paste the password from the other auth file here.

Worked for me -- now I can use the GTK UI and the console client.