Deluge container breaks when restarted ("libtorrent_exception")


It took some efforts, but a few weeks ago, I’ve successfully migrated my Deluge bare metal install to LinuxServer’s docker container.

Yesterday I wanted to move torrents to the defaults “video” and “music” shares on my Synology NAS. So I stopped the container, edited my docker-compose file to add the new binds, then launched “sudo docker-compose up”.

I get the same result than when I first tried to migrate:
terminate called after throwing an instance of ‘libtorrent::libtorrent_exception’
what(): invalid type requested for entry

I’ve search for this error and haven’t found anything relevant, so I don’t understand what’s wrong.
Can you help me make my container work accross restarts, please?
I still have backups of the config and downloads folders from previous working states of my Deluge install, all the way up to my previous bare install, I can restart from there if it’s easier.

Thank you in advance!

Can we see your compose file?


Sure! Sorry I should have included it in the first place!

Here it is:

version: "2.1"
    image: linuxserver/deluge
    container_name: deluge
    network_mode: host
      - PUID=1026
      - PGID=100
      - TZ=Europe/Paris
      - /volume1/docker/deluge/config:/config
      - /volume1/docker/deluge/downloads:/downloads
      - /volume1/Sauvegardes/MicroServer/storage:/storage
      - /volume1/video:/video
      - /volume1/music:/music
    restart: unless-stopped

When I migrated, /config and /storage were copies of my existing Deluge bare install. Before starting the container for the first time, I had fixed a few things, like disabling HTTPS or modifying the default download and watch folders. Obviously they’ve been altered further in the meantime.

Let me know if I can provide anything else!

Does anyone have an idea? :innocent:

try deploying without your bare install configs (ie, fresh install) see if you can reproduce the issue. If you cannot, slowly merge your config into the clean config until it breaks, then you’ll know what broke it.

1 Like

In fact, all I want to migrate are my 100 seeding torrents with some of their statistics (added date and ratio). I don’t care about Deluge’s config. Do you know how I can migrate only seeding torrents? Because I don’t! Thank you anyway for the suggestion, I hope that someone knows.

just take all the .torrent files from your current client and put them in the appropriate deluge directory, then copy all the actual data from your current client and put into the appropriate deluge directory.

In ./config/state, I have torrents named like “ab2cb26baf23d9b787c334146be688dfcce1b082.torrent”. Are you talking about these?

If I copy only these torrents and the actual files, won’t I lose my precious statistics?

yes, you will lose your stats either way

I’m not losing them when I manage to launch Deluge with my existing config folder, so there must be a file in there which holds statistics. Do you know which one? Maybe I can copy the torrents, the actual files and this file with statistics?

sorry that one is too deep into deluge for me (i dont use deluge) but i imagine there is a .db file of some sort which contains that data? that question may be better asked to the deluge guys (or in our discord in #other-support)

The Deluge community is almost dead, but I’ll try a few things before resolving to start from scratch.

Thank you anyway for your help!