# Torrent downloader with VPN only

**URL:** https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641
**Category:** General Discussion
**Created:** [19 November 2020 21:14 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641 "2020-11-19T21:14:24Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [19 November 2020 21:14 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/1 "2020-11-19T21:14:24Z")

</div>

Hello, I want to install transmission or rtorrent on my Dietpi and connect it to my openvpn that I have on external cloud VPS. I’m not good at that to make it manually so I find docker images like `rtorrent-rutorrent-openvpn`, `transmission-openvpn` or `wireguard-transmission`. I have openvpn and wireguard installed on my VPS. I use openvpn for my smartphone and laptops. I don’t know nothing about wireguard but try to learn so i first try wireguard. I install it on my VPS and on Dietpi. Then I do:  
`docker pull sebdanielsson/wireguard-transmission`.  
Next there’s some commands that I don’t know how to change to work with my Dietpi:

```auto
docker run --name wireguard-transmission \
--privileged \
-e "USERNAME=transmission" \
-e "PASSWORD=transmission" \
-e "INTERFACE=wg0" \
-e "KILLSWITCH=wg0" \
-p 51820:51820/udp \
-p 9091:9091 \
-v /path/to/wg-conf-dir:/etc/wireguard \
-v /path/to/transmission-conf-dir:/etc/transmission-daemon \
-v /path/to/transmission-complete-dir:/transmission/complete \
-v /path/to/transmission-incomplete-dir:/transmission/incomplete \
-v /path/to/transmission-watch-dir:/transmission/watch \
sebdanielsson/wireguard-transmission

```

I don’t know what to do in wireguard config.  
Maybe more easy will be to use openvpn-transmission image?  
If someone had time to help me, I would be very grateful.  
Regards,  
Przemek

---

<div class="post-metadata">

### Author: ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)
#### Post date: [20 November 2020 09:03 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/2 "2020-11-20T09:03:28Z")

</div>

Normally if you start the wireguard interface on your system and allow the whole internet as allowed IPs, then all traffic will go through the tunnel. The wireguard should be supported by dietpi scripts, so you need to set up the keys to both peers, exchange the public keys, and create the configuration file.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [20 November 2020 09:19 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/3 "2020-11-20T09:19:08Z")

</div>

Looks like WIreguard delivered by the docker image is a server according the configuration. But you would need to have a client to be able to connect to your VPS Wireguard server.

More easier to install wireguard and transmission directly. The docker image make thinks more complicate. I don’t see any benefit on using docker in this case.

First start and complete your wireguard installation on your VPS. Once you have created the client configurations files on VPS side, you can install wireguard client on DietPi and transfer the client file. A small how-to is available on our online docs [https://dietpi.com/docs/software/vpn/#wireguard-an-extremely-simple-yet-fast-and-modern-vpn](https://dietpi.com/docs/software/vpn/#wireguard-an-extremely-simple-yet-fast-and-modern-vpn)

Once wireguard is working you can start with transmission

---

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [20 November 2020 15:19 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/4 "2020-11-20T15:19:12Z")

</div>

> Looks like WIreguard delivered by the docker image is a server according the configuration. But you would need to have a client to be able to connect to your VPS Wireguard server.
> 
> More easier to install wireguard and transmission directly. The docker image make thinks more complicate. I don’t see any benefit on using docker in this case.
> 
> First start and complete your wireguard installation on your VPS. Once you have created the client configurations files on VPS side, you can install wireguard client on DietPi and transfer the client file. A small how-to is available on our online docs \> [VPN Software Options - DietPi.com Docs](https://dietpi.com/docs/software/vpn/#w) \> … modern-vpn
> 
> Once wireguard is working you can start with transmission

Hi, I have installed wireguard server on my VPS and I install wireguard and transmission from dietpi-software on my Dietpi local server. But I don’t know how to make only transmission from dietpi works with wireguard. I have also nextcloud and emby on dietpi and I don’t want then to use wireguard.  
I find that tutorial:

> **[How to setup Transmission-daemon over a Wireguard VPN](https://cowboyprogrammer.org/2019/09/wireguard-transmission/)**
>
> How to setup the tunnel, the routes, and transmission.

Will it work as I want?  
Regards,  
Przemko

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [20 November 2020 22:10 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/5 "2020-11-20T22:10:57Z")

</div>

yeah that could be a way. Basically you would go to bind transmission to the VPN IP.

But trendy is much more an expert on iptables than I. Probably he has some thought on the config and how it will influence your Nextcloud installation.

---

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [21 November 2020 11:12 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/6 "2020-11-21T11:12:03Z")

</div>

Can You tell me few things?  
In that tutorial TRANSMISSION CONFIG section there’re X.X.X.X and xxxx.xxxx… addreses.

1. What IP I have to put there? My VPS serwer IP [wireguard server]?
2. What peer-port?  
In `/etc/systemd/system/transmission-daemon.service` there’s `<wg-quick@wgtorrents.service>` =\> what is that service? Do I have to make that file with some config or it was created automatically when I installed wireguard on Dietpi?  
In WIREGUARD CONFIG section.
3. Is is wireguard client on Dietpi config or on my VPS server?
4. What I need to put here:

```nohighlight
PostUp = systemd-resolve -i %i --set-dns=193.138.218.74 --set-domain=~.; ip rule add from X.X.X.X table 42; ip route add default dev %i table 42; ip -6 rule add from xxxx:xxxx:xxxx:xxxx::xxxx table 42
PostDown = ip rule del from X.X.X.X table 42; ip -6 rule del from xxxx:xxxx:xxxx:xxxx::xxxx table 42

```

and here:

```nohighlight
Endpoint=se4-wireguard.mullvad.net:51820
AllowedIPs=0.0.0.0/0,::/0

```

?  
Regards Przemko.

---

<div class="post-metadata">

### Author: ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)
#### Post date: [21 November 2020 17:30 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/7 "2020-11-21T17:30:16Z")

</div>

> [@](#):
>
> 1. What IP I have to put there? My VPS serwer IP [wireguard server]?

The IP of the dietpi.

> [@](#):
>
> 1. What peer-port?

This is your choice.

> [@](#):
>
> 1. Is is wireguard client on Dietpi config or on my VPS server?

Dietpi

> [@](#):
>
> 1. What I need to put here:

Replace the xxx with your tunnel IP.

> [@](#):
>
> In `/etc/systemd/system/transmission-daemon.service` there’s `<wg-quick@wgtorrents.service>` =\> what is that service? Do I have to make that file with some config or it was created automatically when I installed wireguard on Dietpi?

I am not so sure about that, maybe you should ask the author.

> [@](#):
>
> But @trendy is much more an expert on iptables than I. Probably he has some thought on the config and how it will influence your Nextcloud installation.

That would be difficult. Outgoing torrent ports are not always fixed. Then one would have to match userid or process id in iptables, but I have never tried it myself.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [21 November 2020 21:47 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/8 "2020-11-21T21:47:35Z")

</div>

I would try to setup Wireguard connection first before going to integrate transmission

---

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [23 November 2020 19:31 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/9 "2020-11-23T19:31:57Z")

</div>

trendy , Joulinar thanks very much. I will try those options and experiment first on my laptop and then on Dietpi if I figure something out.  
Regards,  
Przemko

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [23 November 2020 19:45 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/10 "2020-11-23T19:45:01Z")

</div>

Usually it’s quite simple to configure Wireguard. Keep in mind that you need to configure server side as well as client side.

---

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [26 November 2020 21:52 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/11 "2020-11-26T21:52:37Z")

</div>

Joulinar Hi, I don’t understand that wireguard config so I think something like that:

- I will install qbittorrent on Dietpi
- install shadowsocks-libev proxy server on my Debian VPS ([https://kirelos.com/how-to-install-shadowsocks-libev-proxy-server-on-debian-10-vps/](https://kirelos.com/how-to-install-shadowsocks-libev-proxy-server-on-debian-10-vps/)
- use that proxy on qbittorrent web dashboard.  
What do You think about that?

Regards,  
Przemko

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [27 November 2020 11:09 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/12 "2020-11-27T11:09:26Z")

</div>

Well looks like something that could be working. But I need to say, I never used something like this.

---

<div class="post-metadata">

### Author: ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)
#### Post date: [27 November 2020 13:03 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/13 "2020-11-27T13:03:14Z")

</div>

All this looks way more complicated to me, than setting up a wireguard tunnel.

---

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [28 November 2020 22:36 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/14 "2020-11-28T22:36:22Z")

</div>

> [@](#):
>
> All this looks way more complicated to me, than setting up a wireguard tunnel.

Hi, It was very easy. Everything was clear described. I install Deluge on Dietpi and I see it works with proxy (my VPS IP) like with VPN.  
Thanks for help and Your time.  
Regards,  
Przemko

---

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [30 November 2020 21:12 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/15 "2020-11-30T21:12:53Z")

</div>

Hello trendy and Joulinar I have strange problem when I install Radarr and configure Deluge with that proxy. I don’t know it is those apps problem because I have that earlier about 2 times in 3 months but from 27.11.2020 I have about 2 times a day when my Dietpi lose internet connection. I have my Rpi4 connected with ethernet cable. When my Dietpi loose connection I can’t ssh, my nextcloud, emby and other services can’t acces from browser, only Kodi works but don’t sync. I see on my smartphone app Finge that my Raspbery is online. I must turn off and turn on manually and everything wors. How can I check what is wrong?

Edit. I have that error just few minutes ago and something new happen, Dietpi restart byself. I find command in google but I’m new in journalctl.

```auto
root@Przemas82:/home/dietpi# journalctl -p 3 -xb
-- Logs begin at Thu 2019-02-14 11:11:58 CET, end at Mon 2020-11-30 22:13:23 CET. --
lis 30 20:31:35 Przemas82 blkmapd[146]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory

lis 30 20:32:08 Przemas82 noip2[1031]: execl /tmp/DietPi-Config/nextcloud failed (No such file or directory)
lis 30 22:09:54 Przemas82 kernel: Out of memory: Killed process 963 (mono) total-vm:933400kB, anon-rss:713088kB, file-rss:
0kB, shmem-rss:0kB, UID:999 pgtables:1888kB oom_score_adj:0

```

Regards,  
Przemek

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [30 November 2020 21:31 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/16 "2020-11-30T21:31:39Z")

</div>

looks like you are running out of memory. In the case below, Mono get killed. And this is impacting Radarr.

```nohighlight
kernel: Out of memory: Killed process 963 (mono)

```

Do you have swap enabled? can you check free -m

---

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [30 November 2020 22:29 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/17 "2020-11-30T22:29:27Z")

</div>

Hi, I have swap:

```nohighlight
dietpi@Przemas82:~$ free -m
              total used free shared buff/cache available
Mem: 1626 910 287 116 427 516
Swap: 58 52 6

```

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [30 November 2020 22:35 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/18 "2020-11-30T22:35:31Z")

</div>

hmm its 58MB only. Let’s try to get it bigger

```nohighlight
/boot/dietpi/func/dietpi-set_swapfile 1024

```

---

<div class="post-metadata">

### Author: ![przemko](https://dietpi.com/forum/user_avatar/dietpi.com/przemko/32/2308_2.png) [@przemko](https://dietpi.com/forum/u/przemko)
#### Post date: [1 December 2020 06:16 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/19 "2020-12-01T06:16:48Z")

</div>

> [@](#):
>
> hmm its 58MB only. Let’s try to get it bigger
> 
> ```plaintext
> /boot/dietpi/func/dietpi-set_swapfile 1024
> 
> ```

I do that  
Now:

```plaintext
dietpi@Przemas82:~$ free -m
              total used free shared buff/cache available
Mem: 1626 658 340 88 626 793
Swap: 1023 0 1023

```

I must tell You that I find that error in journalctl:

```plaintext
journalctl -p 3 -xb
-- Logs begin at Tue 2020-12-01 07:11:24 CET, end at Tue 2020-12-01 07:13:11 CET. --
gru 01 07:11:24 Przemas82 blkmapd[137]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory

gru 01 07:11:57 Przemas82 noip2[1042]: execl /tmp/DietPi-Config/nextcloud failed (No such file or directory)
root@Przemas82:/home/dietpi# systemctl status nfs-blkmap.service 
● nfs-blkmap.service - pNFS block layout mapping daemon
   Loaded: loaded (/lib/systemd/system/nfs-blkmap.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-12-01 07:11:24 CET; 2min 47s ago
  Process: 135 ExecStart=/usr/sbin/blkmapd $BLKMAPDARGS (code=exited, status=0/SUCCESS)
 Main PID: 137 (blkmapd)
    Tasks: 1 (limit: 3283)
   CGroup: /system.slice/nfs-blkmap.service
           └─137 /usr/sbin/blkmapd

gru 01 07:11:24 Przemas82 blkmapd[137]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory

```

I disable that service but I see still this occur. What do You think about that and that other error with nextcloud:  
` noip2[1042]: execl /tmp/DietPi-Config/nextcloud failed (No such file or directory)` ?

Edit. After that I set downloading in deluge and after about 2 minutes I have connection lost.

```plaintext
root@Przemas82:/# journalctl -p 3 -xb
-- Logs begin at Tue 2020-12-01 07:17:02 CET, end at Tue 2020-12-01 07:33:48 CET. --
gru 01 07:17:02 Przemas82 blkmapd[149]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory

gru 01 07:31:27 Przemas82 noip2[1064]: execl /tmp/DietPi-Config/nextcloud failed (No such file or directory)

```

Maybe this something with deluge proxy options?  
  
  
  
Regards,  
Przemko

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [1 December 2020 08:20 UTC](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641/20 "2020-12-01T08:20:14Z")

</div>

I guess you have multiple issues. I guess they need to be fixed one by one

Do you mount anything via NFS? If not I would recommend to remove that package!  
Do you use NoIP? If yes you could try to setup configuration again.

[Next page](https://dietpi.com/forum/t/torrent-downloader-with-vpn-only/4641.md?page=2)
