How would you replicate this in Truenas Scale?

KeithW

Dabbler
Joined
Mar 3, 2019
Messages
14
Hi All,

So I have a Proxmox Server that I have been running for 5 years or so but I no longer use proxmox itself as I have moved everything over to docker with portainer. I really like the direction TrueNAS has gone with most things and would like to use it as my docker host and fileserver but I dont really understand the interface for adding docker containers.

I use Cloudflare and DNS-O-Matic and ZeroSSL with a Swag container for reverse proxy and various other containers for my media server apps - OpenVPN, Radarr, Sonarr, Sabnzbd, Plex and Jellyfin (testing as a plex replacement) and next I want to set up Nextcloud. My current Docker CLI for the various containers are as follows

Code:
docker create \
  --name=swag \
  --cap-add=NET_ADMIN \
  --net=lsio \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -e URL=mytld.com \
  -e SUBDOMAINS=wildcard \
  -e VALIDATION=dns \
  -e CERTPROVIDER=zerossl \
  -e DNSPLUGIN=cloudflare \
  -p 443:443 \
  -e EMAIL=my.email.address@mail.com \
  -p 80:80 \
  -v /mnt/storage/share/mediaserver/appdata/swag:/config \
  --restart unless-stopped \
  linuxserver/swag


Code:
docker run -d \
--cap-add=NET_ADMIN \
--device=/dev/net/tun \
--name=openvpn \
--dns 1.1.1.1 \
--dns 1.0.0.1 \
-e 'HOST_IP=192.168.1.50' \
-e 'VPN_PROVIDER=ipvanish' \
-e 'VPN_USERNAME=my.email.address@mail.com' \
-e 'VPN_PASSWORD=MyPassword' \
-e 'VPN_COUNTRY=NL ' \
-v /mnt/storage/share/mediaserver/vpn/cache:/cache/ \
rundqvist/openvpn


Code:
docker run -d \
  --name=sabnzbd \
  --net container:openvpn \
  --restart unless-stopped \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -p 8080:8080 \
-v /mnt/storage/share/mediaserver/appdata/sabnzbd:/config \
-v /mnt/storage/share/mediaserver/downloads:/data/downloads

 lscr.io/linuxserver/sabnzbd:latest


Code:
docker run -d \
--name=radarr \
--net container:openvpn \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-p 7878:7878 \
-v /mnt/storage/share/mediaserver/appdata/radarr:/config \
-v /mnt/storage/share/mediaserver:/data \
--restart unless-stopped \
lscr.io/linuxserver/radarr:latest


ETC

Is there a guide on how to convert a docker CLI or even a docker compose file to the freenas Launch Docker Image interface options or better still is there a way to simply use or import a CLI or docker compose file without having to go through Launch Docker Image form? Am I better of finding another solution? I feel like using FreeNAS Scale for Docker containers is much harder than it needs to be but maybe I am missing something.

If you were me and wanted to achieve the above with TrueNAS Scale how would you do it?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Well, OpenVPN is included in TrueNAS (CORE and SCALE) itself. Sonarr, Radarr, Plex, Jellyfin, and a bunch of other software are available as prepackaged apps (considerably more through TrueCharts than through the iX official apps). It'd much simpler to just install those through the GUI rather than to reinvent the wheel.

Beyond that, TrueCharts has a docker-compose app, which I understand can be used to run pretty much any docker-compose file.
 

KeithW

Dabbler
Joined
Mar 3, 2019
Messages
14
Well, OpenVPN is included in TrueNAS (CORE and SCALE) itself. Sonarr, Radarr, Plex, Jellyfin, and a bunch of other software are available as prepackaged apps (considerably more through TrueCharts than through the iX official apps). It'd much simpler to just install those through the GUI rather than to reinvent the wheel.

Beyond that, TrueCharts has a docker-compose app, which I understand can be used to run pretty much any docker-compose file.
Hi danb35 and thanks, do you know if I configure the TrueNAS VPN Client does the whole server use it or can I just use it for certain services and does it create a new interface for Containers to use? I have had a look at it in the documentation and I am not sure it can do what I need, like how do you make sure it is connected and if not block all traffic configured to use it?

I realise that there are Official Apps and TrueChart apps but the problem comes when trying to configuring them with the right network and settings, the TrueNAS Interface is confusing and doesn't seem to have all of the options I need to set them up so, for instance, they go through my VPN Service.

The Docker Compose App seems like it might do what I need, it didnt seem to be an option when I tried to look into this several months ago. I would really like to be able to use Portainer with it.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
if I configure the TrueNAS VPN Client does the whole server use it or can I just use it for certain services and does it create a new interface for Containers to use?
AFAIK, the whole server uses it. The TrueCharts apps can individually be configured to use OpenVPN or WireGuard VPNs if desired, complete with the "kill switch" to turn it off if the VPN goes down.
 

DaSnipe

Explorer
Joined
Jun 26, 2021
Messages
86
Hi danb35 and thanks, do you know if I configure the TrueNAS VPN Client does the whole server use it or can I just use it for certain services and does it create a new interface for Containers to use? I have had a look at it in the documentation and I am not sure it can do what I need, like how do you make sure it is connected and if not block all traffic configured to use it?

I realise that there are Official Apps and TrueChart apps but the problem comes when trying to configuring them with the right network and settings, the TrueNAS Interface is confusing and doesn't seem to have all of the options I need to set them up so, for instance, they go through my VPN Service.

The Docker Compose App seems like it might do what I need, it didnt seem to be an option when I tried to look into this several months ago. I would really like to be able to use Portainer with it.
There's configs around for Portainer using the TrueCharts docker-compose app. TrueNAS SCALE uses Kubernetes so things aren't straightforward docker but you could run "most" things through the TC chart.
 
Top