migrating regular install to a headless install on Ubuntu 16.04.2

General support for problems installing or using Deluge
blackdalek
New User
New User
Posts: 9
Joined: Fri Jul 21, 2017 11:00 pm
OS or Distro: Ubuntu 16.04.2

migrating regular install to a headless install on Ubuntu 16.04.2

Postby blackdalek » Fri Jul 21, 2017 11:20 pm

I had deluge installed and running with configuration/torrent state data in my user's home folder as a stand alone application (installed via sudo apt install deluge), but now I want to convert to headless install (under /usr/bin) running as a systemd service with access through the deluge-web GUI.

I tried following the guide at http://dev.deluge-torrent.org/wiki/User ... ce/systemd but must have messed something up because I ended up with broken system and the web interface did not show any of my torrent files (still in the home folder), could not get the deluge-console to connect (bad password?), and the web interface kept spewing error messages into the terminal window. I couldn't find any guide to uninstall the changes I made, so I just backed up my home folder with the good copy of my torrents and deluge config files, and re-installed the OS. Now I have a clean system again and can start from scratch, more or less.

So now I want to make a headless install of deluged which runs as a systemd service on startup and then copy my torrent states/files/downloads to it from my backed up home folder. How do I do this?

blackdalek
New User
New User
Posts: 9
Joined: Fri Jul 21, 2017 11:00 pm
OS or Distro: Ubuntu 16.04.2

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby blackdalek » Sat Jul 22, 2017 2:00 pm

ok. After leaving it for a while and coming back to it. I had another go at following the guide.

This time I have no errors and my system isn't broken (I must have got something right somehow lol)

However... I STILL don't know how to make the deluged daemon "find" my torrent states from the old full client (the torrent states stored under ~/.config/deluge/ )

At the moment I can connect to the daemon by pointing my browser to the deluge-web interface, but the list of torrents is empty (it can't find my torrent state info).

Please... how/where to I copy the torrent state info to where deluged can "see" it?

blackdalek
New User
New User
Posts: 9
Joined: Fri Jul 21, 2017 11:00 pm
OS or Distro: Ubuntu 16.04.2

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby blackdalek » Sat Jul 22, 2017 3:12 pm

I've figured out that there is a directory /var/lib/deluge/.config but I can't access it with my user despite having typed "sudo adduser myuser deluge" as per the instructions in the guide.

I assume I've got to copy the contents of ~/.config/deluge to /var/lib/deluge/.config/deluge but right now this seems impossible as I have no access.

Please can anyone help? Cas where are you?

Cas
Top Bloke
Top Bloke
Posts: 3466
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby Cas » Sat Jul 22, 2017 6:31 pm

This is not specific to deluge it's Linux cli usage and permissions. You can copy with 'sudo cp' and chmod config files to deluge user.

blackdalek
New User
New User
Posts: 9
Joined: Fri Jul 21, 2017 11:00 pm
OS or Distro: Ubuntu 16.04.2

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby blackdalek » Sat Jul 22, 2017 11:46 pm

OK, I'm not a whiz at using the command line, so.... is it "sudo cp ~/.config/deluge /var/lib/deluge/.config/deluge" then "sudo -u deluge chmod -R u+rwx /var/lib/deluge/.config" ?
Please correct me if I've messed up the command.

blackdalek
New User
New User
Posts: 9
Joined: Fri Jul 21, 2017 11:00 pm
OS or Distro: Ubuntu 16.04.2

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby blackdalek » Sun Jul 23, 2017 12:37 am

Someone was helping me in the #ubuntu IRC help channel. They suggested:
sudo cp -pvR ~/.config/deluge/* /var/lib/deluge/.config/deluge/
sudo chown deluge /var/lib/deluge/.config/deluge -R
sudo chmod 644 /var/lib/deluge/.config/deluge/ -R
sudo chmod 755 /var/lib/deluge/.config/deluge

After doing this, I can no longer start the deluged daemon :(

Code: Select all

kodi-user@kodiuser-Aspire-L3600:~$ sudo systemctl status deluged.service
● deluged.service - Deluge Bittorrent Client Daemon
   Loaded: loaded (/etc/systemd/system/deluged.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Sun 2017-07-23 10:25:09 AEST; 8min ago
     Docs: man:deluged
  Process: 2380 ExecStart=/usr/bin/deluged -d (code=exited, status=1/FAILURE)
 Main PID: 2380 (code=exited, status=1/FAILURE)

Jul 23 10:25:08 kodiuser-Aspire-L3600 systemd[1]: deluged.service: Main process exited, code=exited,
Jul 23 10:25:08 kodiuser-Aspire-L3600 systemd[1]: deluged.service: Unit entered failed state.
Jul 23 10:25:08 kodiuser-Aspire-L3600 systemd[1]: deluged.service: Failed with result 'exit-code'.
Jul 23 10:25:09 kodiuser-Aspire-L3600 systemd[1]: deluged.service: Service hold-off time over, sched
Jul 23 10:25:09 kodiuser-Aspire-L3600 systemd[1]: Stopped Deluge Bittorrent Client Daemon.
Jul 23 10:25:09 kodiuser-Aspire-L3600 systemd[1]: deluged.service: Start request repeated too quickl
Jul 23 10:25:09 kodiuser-Aspire-L3600 systemd[1]: Failed to start Deluge Bittorrent Client Daemon.
Jul 23 10:25:10 kodiuser-Aspire-L3600 systemd[1]: deluged.service: Start request repeated too quickl
Jul 23 10:25:10 kodiuser-Aspire-L3600 systemd[1]: Failed to start Deluge Bittorrent Client Daemon.


What went wrong?

blackdalek
New User
New User
Posts: 9
Joined: Fri Jul 21, 2017 11:00 pm
OS or Distro: Ubuntu 16.04.2

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby blackdalek » Sun Jul 23, 2017 5:29 am

I deleted all the files I copied to /var/lib/deluge/
Deleted the user deluge and group deluge
Recreated the user and group with "sudo adduser --system --gecos "Deluge Service" --disabled-password --group --home /var/lib/deluge deluge"

Now "sudo systemctl start deluged" runs the deluged.service again OK, but I am back to my problem of having no torrent states again.
I've basically undone all the changes I was told to make by the #ubuntu channel help. Back to square 1.

Cas
Top Bloke
Top Bloke
Posts: 3466
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby Cas » Sun Jul 23, 2017 7:34 am

Ah yes as per faq only copy the deluge/state folder over

Code: Select all

sudo cp -pvR ~/.config/deluge/state/* /var/lib/deluge/.config/deluge/state

blackdalek
New User
New User
Posts: 9
Joined: Fri Jul 21, 2017 11:00 pm
OS or Distro: Ubuntu 16.04.2

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby blackdalek » Sun Jul 23, 2017 12:25 pm

Thanks Cas... that got my torrent list back without making the daemon stop.
Only problem now is, I get an error on any incomplete torrents, but completed torrents seed without error. My downloaded files are not stored in /var/lib/deluge/ but ~/Downloads/Torrents/ so I think the user "deluge" doesn't have write access? Is that right?

Can I give write permission to user "deluge" for a specific folder (~/Downloads/Torrents) or do I have to move all the downloaded files into the /var/lib/deluge/ folder?

Cas
Top Bloke
Top Bloke
Posts: 3466
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: migrating regular install to a headless install on Ubuntu 16.04.2

Postby Cas » Sun Jul 23, 2017 9:16 pm

Yeah that is a write permission for the deluge user. There are various ways to tackle that but yes you can chmod the folder for deluge group and give it group write permission


Return to “Support”

Who is online

Users browsing this forum: No registered users and 12 guests