TrueNAS Portainer

Hi everyone, Im trying to decom one of my servers that runs containers by moving them to my TrueNAS server. Cant find any good details or tutorials about using Portainer for containers, so hoping someone can help me out?

Right now I am assuming that the Portainer storage when I am setting up an app should just be a dataset that is set to apps while the additional storage in the set up process would be a different(?) dataset thats for the containers that portainer manages? What would the share be if its a different datset?

If thats the case, I assume then the volumes in my stacks would just be something like “./volume/*”?

Thanks!

I think they method you describe will work, but I chose a completely different approach, that could also work for you. I was trying to set up Nextcloud in TrueNAS Scale 24.10 and it had a lot of “peculiarities” that I just wasn’t vibing with. The first time I installed Nextcloud it worked fine, then an update to TrueNAS broke it. On a subsequent install attempt, it wouldn’t allow me to reach the Nextcloud interface unless I added ‘overwritehost’ => ‘storage.mydomain.com:30027’, to the environmental variables at set up. Unfortunately this “tweak” wasn’t documented anywhere and it took a bit of googling to find it. I then started running into problems where when I tried to reach the Nextcloud interface, it would redirect me right back to the TrueNAS web interface.

All of this is a long way of saying I am not really satisfied with how TrueNAS implements docker. So I went the other way. I changed the port assignments for the TrueNAS interface from 80 to 8080 and 443 to 8443. Then I just do everything through Portainer/Portainer stacks. Volumes are bind mounts to data sets on my TrueNAS. The data sets are “generic” type data sets and work fine. There is no SAMBA or NFS share required with this method. I use Nginx Proxy Manager to reverse proxy my containers, with 80, 81 and 443 exposed to my network. I also like to be able to access the Nginx management interface on port 81 to get domain specific certs from Let’s Encrypt, independent of the TrueNAS system.

To do a bind mount be sure to specifiy the full path on your TrueNAS host. Doing something like “./volume/” will create regular docker volumes, in the directory you have set for ix volumes. I prefer Tom’s approach of having specific data sets for each container/application. So the volumes for my Nextcloud instance looks like

  • /mnt/my_pool/nextcloud/html:/var/www/html
  • /mnt/my_pool/nextcloud/data:/var/www/html/data

I hope this helps