[TUTORIAL] How to set up unpackerr utility in LXC with torrent

papatikka

New Member
Jun 26, 2023
27
0
1
Disclaimer, first off I want to tell you that I'm learning and spent hours troubleshooting this so I want to help you to avoid spending hours at this. My setup might not be perfect, but, I don't know of any other setup with unpackerr in LXC that works.

This setup aims for you who have Proxmox-VE that is separated from a or multiple dedicated NAS/Server, you use network fileshare to work with your files and folders between all clients and servers. It also aims for you that only wants to use the utility unpackerr offers, not for you if you already use other 'arr' apps such as Sonarr, Lidarr etc. Of course this setup aims for you who deal with a lot of compressed files in business or in private.

With that sorted out, lets start!

Dependency (you have already done these steps before following this guide)
  • Privileged container running any template of your choice (ubuntu mantic minotaur 23.10 in this case, Debian works well too)
  • Installed cifs-utils, curl and torrent app (qbittorrent-nox in this case)
  • Unpackerr and torrent or similar utility must be in the same container (I have yet succeed make it work across containers)
  • Mounted network share with Cifs (Samba) and confirmed it's working.
There is already guides on how to for every bullet above, please read them if you don't know how to set-up.

Unpackerr Linux Repo

Installation phase:

This will install golift (dev of unpackerr)'s repo and unpackerr automatically
Bash:
curl -s https://golift.io/repo.sh | bash -s - unpackerr

Config phase:

We need to change uid/gid because for most users, we are running with different users AND/OR is just using root for private reasons. Also you want to make sure that the service unpackerr does not activates before network mounts been done. P.s Unpackerr already automatically runs systemd and will autostart with the boot of LXC.

Add following:

Bash:
Mkdir /etc/systemd/system/unpackerr.service.d/
Bash:
nano /etc/systemd/system/unpackerr.service.d/override.conf

Add this in override.conf
Code:
User=username or root
Group=group or root
After=network.target mnt-name.mount

Now it's time to configure the unpackerr itself. Here we want to specify folders that unpackerr shall watch and, also, we want to be able to troubleshoot if something happens. The conf file for unpackerr is in /etc/unpackerr/unpackerr.conf run following:

Bash:
nano /etc/unpackerr/unpackerr.conf

Uncomment and set path for logging file '/var/log/unpackerr/unpackerr.log' inside unpackerr.conf.
1688411403217.png

Scroll further down to the folders section, here is where you add the directories you want unpackerr to watch.

Code:
[[folder]]
 path = "/mnt/foo/bar/"
[[folder]]
 path = "/mnt/foo/bar2/"

1688411957720.png

At last, unpackerr doesn't generally work well with network fileshare straight out of box, so you need to scroll to the last line and add

Code:
[folders]
interval = "1s"

Activation phase:
Now it's time to activate everything. Run following commands:
systemctl daemon-reload
systemctl restart unpackerr

Check if its running
systemctl status unpackerr

Test by downloading something compressed through torrent utility or similar to a watched folder, OR, by adding
Bash:
mkdir /mnt/foo/bar/test-dir

Then grab logs to see that unpackerr detects it and try to automatically de-compress for you

Bash:
tail /var/log/unpackerr/unpackerr.log

There you go, let me know if I've missed out on something.

Cheers
 
Last edited:
Please ignore.

I believe this:

INI:
After=network.target mnt-name.mount

should be this:

INI:
After network.target = mnt-name.mount

At least in my case.
 
Last edited:
I believe this:

INI:
After=network.target mnt-name.mount

should be this:

INI:
After network.target = mnt-name.mount

At least in my case.

Thank you for bringing attention to this, I suspect either works because it does in my case and in your case. Referencing to this link.

Did everything work out for you?
 
Thank you for bringing attention to this, I suspect either works because it does in my case and in your case. Referencing to this link.

Did everything work out for you?
Strange. I can't reproduce the error now despite taking a deep dive into stackexchange and finding *my* resolution.
In the absence of anything solid, I would ignore my post. I'll edit accordingly.
 
Disclaimer, first off I want to tell you that I'm learning and spent hours troubleshooting this so I want to help you to avoid spending hours at this. My setup might not be perfect, but, I don't know of any other setup with unpackerr in LXC that works.

This setup aims for you who have Proxmox-VE that is separated from a or multiple dedicated NAS/Server, you use network fileshare to work with your files and folders between all clients and servers. It also aims for you that only wants to use the utility unpackerr offers, not for you if you already use other 'arr' apps such as Sonarr, Lidarr etc. Of course this setup aims for you who deal with a lot of compressed files in business or in private.

With that sorted out, lets start!

Dependency (you have already done these steps before following this guide)
  • Privileged container running any template of your choice (ubuntu mantic minotaur 23.10 in this case, Debian works well too)
  • Installed cifs-utils, curl and torrent app (qbittorrent-nox in this case)
  • Unpackerr and torrent or similar utility must be in the same container (I have yet succeed make it work across containers)
  • Mounted network share with Cifs (Samba) and confirmed it's working.
There is already guides on how to for every bullet above, please read them if you don't know how to set-up.

Unpackerr Linux Repo

Installation phase:

This will install golift (dev of unpackerr)'s repo and unpackerr automatically
Bash:
curl -s https://golift.io/repo.sh | bash -s - unpackerr

Config phase:

We need to change uid/gid because for most users, we are running with different users AND/OR is just using root for private reasons. Also you want to make sure that the service unpackerr does not activates before network mounts been done. P.s Unpackerr already automatically runs systemd and will autostart with the boot of LXC.

Add following:

Bash:
Mkdir /etc/systemd/system/unpackerr.service.d/
Bash:
nano /etc/systemd/system/unpackerr.service.d/override.conf

Add this in override.conf
Code:
User=username or root
Group=group or root
After=network.target mnt-name.mount

Now it's time to configure the unpackerr itself. Here we want to specify folders that unpackerr shall watch and, also, we want to be able to troubleshoot if something happens. The conf file for unpackerr is in /etc/unpackerr/unpackerr.conf run following:

Bash:
nano /etc/unpackerr/unpackerr.conf

Uncomment and set path for logging file '/var/log/unpackerr/unpackerr.log' inside unpackerr.conf.
View attachment 52541

Scroll further down to the folders section, here is where you add the directories you want unpackerr to watch.

Code:
[[folder]]
 path = "/mnt/foo/bar/"
[[folder]]
 path = "/mnt/foo/bar2/"

View attachment 52543

At last, unpackerr doesn't generally work well with network fileshare straight out of box, so you need to scroll to the last line and add

Code:
[folders]
interval = "1s"

Activation phase:
Now it's time to activate everything. Run following commands:
systemctl daemon-reload
systemctl restart unpackerr

Check if its running
systemctl status unpackerr

Test by downloading something compressed through torrent utility or similar to a watched folder, OR, by adding
Bash:
mkdir /mnt/foo/bar/test-dir

Then grab logs to see that unpackerr detects it and try to automatically de-compress for you

Bash:
tail /var/log/unpackerr/unpackerr.log

There you go, let me know if I've missed out on something.

Cheers
Thanks so much for this walkthrough, I was able to get unpackerr installed and working properly.
The issue I am having is the unpacked file's ownership changing from root:root when it is in /mnt/Downloads to nobody:nogroup when it is moved to /mnt/Series. Do you know why it is doing this and how can I fix it?
 
Thanks so much for this walkthrough, I was able to get unpackerr installed and working properly.
The issue I am having is the unpacked file's ownership changing from root:root when it is in /mnt/Downloads to nobody:nogroup when it is moved to /mnt/Series. Do you know why it is doing this and how can I fix it?
No problem! However I would suggest you to get into Go Lift (unpackerr) discord and ask for help there, I never personally encountered the problem you are facing. But please get back here and post any solution if you find it, could be good for other people looking at this in the future!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!