TrueNAS Scale for Noobs like me

raskitoma

Dabbler
Joined
Sep 28, 2018
Messages
17
Hi guys,

First of all, sorry for any typo or error, English is not my first language (Spanish is)

Just take note that the way I implemented docker containers on my server is allowed by TrueNAS but it's not recommended by iX, if you don't handle carefully you can break something for sure.

Please refer to their Discord Server for more and proper support and use the official supported Truecharts.

sep 6th 2021:
  • I love the new panels on the dashboard, it helps to keeps things clear and tidy. The new Storage panel is more functional than including one for each pool.
  • Thanks for the new Network panel!
  • That's some fancy design on the login screen!
  • The extra functionality on the pools section is awesome.
  • Upgraded with 0 problems with my current docker configuration.

may 4th 2021:
  • The gui update is really neat, but I must say, the cron options are better and makes more sense in the new section!
  • I'm really happy to see that you have an easy way to list all containers, even those that I have installed using docker-compose command or portainer stack, etc.

feb 2nd 2021:
I just switched from TrueNAS Core to SCALE. The idea was to take advantage of all the features that comes when you're using docker instead of jails(I love jails btw)

Version: TrueNAS-SCALE-21.08-BETA.1
Hardware: Just see my signature... everything is there

So right now I have a full working setup with: (I will always update this list accordingly)
  • Plex Media Server for media (migrated all the tiles/metadata/user_accounts/user_stats from jail to docker!!! created from scratch using Launch Docker Image button) - I'm already a PlexPass user
  • Jellyfin just for fun... it's nice to try something new as it does mostly the same as Plex, but for free. I'm using it as an alternative for some kind of media and for iptv manage (recording, etc. It's much better for this than Plex)
  • XTEVE with xml auto updater (using Schedules Direct) Moved to another machine dedicated for this
  • dizqueTV - Put some series I have in Plex with commercials and created my own TV-Channel (this is actually fun when you see it working) Moved to the same machine as xteve
  • YACReader Komga for Comics
  • Calibre and Calibre-Web for Books
  • Subsonic for music Right now I'm using Plex for music.
  • Ombi for requests
  • Sonarr/Radarr/Lidarr/Bazarr/Mylar/LazyLibrarian for media management
  • Jackett with Flaresolver
  • Deluge
  • Handbrake for autoenconding and optimization using HEVC
  • Tautulli for Plex stats
  • Nextcloud (not using the template provided by IX)
  • MineOS with 2 instances running move this to another machine
  • 2 Valheim dedicated server instances got rid of those... I'm not playing anymore... lol
  • Resilio Sync
  • Wordpress
  • Papermerge for doc organization (receipts, scans, etc)
  • Chevereto image gallery Not using it anymore!
  • MySQL, PostgreSQL, Mongo and Redis
  • HASS - Home automation Moved to a raspberry pi 3 the same machine where xteve is located I have with pihole and smokeping
  • Caddy - to manage redirects, proxy reverse, auth, etc.
  • GoDaddyddns to auto register dynamic ip with domain
  • Netbootxyz
  • Doublecommander not using anymore, also was for testing purposes only... too dangerous to keep this alive!
  • Sqlite editor
  • webtop for testing
  • remmina (rdp/vnc web browser client)
  • Kimai2 for time tracking - this is specially useful for remote working
  • Organizr Not using it anymore!
  • Portainer for monitoring and testing(I'm not gonna ever use it for deploy anything I'm actually using it as an easy way to manage containers)
  • Netdata for monitoring.
  • APCUPSD (Moved to other machine(where xteve is), I didn't have time to deal with recompiling Maxlinear drivers)
  • WikiJS
  • 1 small monero CPU mining instances activated via cron to run on specific times.
  • 1 small nicehash CPU mining instance
  • Multiple telegraf instances to fill up an...
  • ...influx db
  • Grafana instance
  • Graylog
  • Appsmith
  • Machinaris, but I installed it using docker-compose, not the one our great guys from Truenas provided... I haven't saw it before... sorry!
  • Folding@Home - 1 cpu, low power... Just to help with disease investigation efforts
  • liquidctl - To control Corsair Pump and Fans via docker
  • 2 x Watchtower instances: one notifies to my slack when there's an update available for all cointainers, other instance keeps some containers auto updated using flags(the ones I consider not critical) while notifying about the update operation.
Also, I was able to setup a cloud sync with OneDrive to backup all the config files, etc.

My idea is to share my experience with all the migration, docker setups, etc. Even if a solution has been made available, sometimes for noobs it is really hard to find. Also most of the times people just want a simple explanation of how to do things. (For example how to solve many things on Caddy!)

So well guys, I'm gonna try to be available and read this post as much as I can so I can help you with any questions.

See ya!
 
Last edited:

raskitoma

Dabbler
Joined
Sep 28, 2018
Messages
17
I did all the work using the provided GUI. Please remember that this is an alpha release, even some things are working pretty well others have some kind of troubles here and there (i.e. UPS service). Also remember that always there's a risk involved. But as an enthusiast, I love to live on the edge and try new things.

I still have a doubt on how to properly set an image name to each container. Right now, all the containers have their names generated using k8s{set of chars}{name you put on the gui}{another set of chars} when using the docker ps command. If anyone have an idea on how set this, please share. I have already tried to use the "name" attribute with no luck.

BTW for proper installation and operation remember to set user id(PUID - varies on docker image) and group id(PGID - varies on docker image) to prevent any permission related issues between radarr/sonarr/torrent/plex containers. Also your NAS media and download folders must be owned by the same user. Also as a good practice, remember to set TZ accordingly and set a std config path so you can be able to get a backup of all the configurations.

Sometimes you can encounter with some images that can't be started when setting up for example the /config path on the "volumes" section. The workaround for this is to create the dataset with a custom path i.e. "/my_own_config" and start the container. After starting on terminal enter the docker container using
Code:
docker exec -it {docker_autogenerated_name} bash(or "sh")
and locate the proper config or settings folder for that app. Then copy all the content to your "custom config folder", take a note on the path of the config folder using
Code:
pwd

Next, stop the container and edit the custom dataset(by now it will have all the config files copied before) with the proper path and that's it. An easy way to find your container is using this command:
Code:
docker ps | grep {docker_name}


Btw It will be great if we could assign a persistent hw address to the containers.

-Edit 2021-02-05 - Here's a list of the repositories I'm actually using on my server!
Code:
REPOSITORY                                  TAG                 IMAGE ID            CREATED             SIZE
homeassistant/home-assistant                latest              3f879746e972        6 hours ago         1.13GB
linuxserver/sonarr                          latest              2efbc90cfa22        3 days ago          614MB
linuxserver/ombi                            <none>              2cc3f09e221b        3 days ago          289MB
linuxserver/jackett                         <none>              a562e4aafa98        3 days ago          260MB
linuxserver/lazylibrarian                   latest              6a2f77052497        3 days ago          232MB
linuxserver/tautulli                        latest              6d9e9f5aa50c        3 days ago          150MB
linuxserver/radarr                          latest              934373743023        4 days ago          303MB
linuxserver/resilio-sync                    latest              927efae29e1d        5 days ago          129MB
linuxserver/lidarr                          latest              b3e1ffbd5bd9        6 days ago          663MB
plexinc/pms-docker                          latest              5681919e94f8        8 days ago          654MB
linuxserver/deluge                          <none>              20d1cdd4553b        9 days ago          260MB
nextcloud                                   <none>              c6d390bc4501        10 days ago         800MB
linuxserver/bazarr                          latest              d31f97543307        12 days ago         351MB
wordpress                                   <none>              d94129b6e1f4        2 weeks ago         550MB
postgres                                    latest              4ea2949e4cb8        2 weeks ago         314MB
mysql                                       latest              c8562eaf9d81        2 weeks ago         546MB
xthursdayx/yacreaderlibrary-server-docker   latest              b8dd10f4a9c4        2 weeks ago         925MB
ghcr.io/flaresolverr/flaresolverr           latest              aa2b9be5b45f        3 weeks ago         435MB
caddy                                       latest              2c73dc9258a8        4 weeks ago         39.4MB
jlesage/handbrake                           latest              c7fb045a0207        4 weeks ago         447MB
organizr/organizr                           latest              33cebd54b9ce        6 weeks ago         67.6MB
linuxserver/mylar                           latest              8e7dbae2fb43        6 weeks ago         216MB
hexparrot/mineos                            latest              055da8a096a2        3 months ago        570MB
zerpex/ubooquity-docker                     latest              3aa66238e328        15 months ago       106MB
monitorr/monitorr                           latest              3d44bf0006d9        2 years ago         66.3MB
hurricane/subsonic                          latest              666c11ae2172        3 years ago         440MB

Notes about <none> tags: obmi is the development branch. Jackett and Deluge are latest. Nextcloud is the latest from the official repository as well Plex and Wordpress.
 
Last edited:

Salty1

Cadet
Joined
Sep 2, 2020
Messages
4
I am interested to hear first how you managed to move Plex intact with the "tiles/metadata/user_accounts/user_stats from the jail to the docker". This is one of the primary reasons that I haven't tried as yet but I am anxious to get containers ;)
 

raskitoma

Dabbler
Joined
Sep 28, 2018
Messages
17
I am interested to hear first how you managed to move Plex intact with the "tiles/metadata/user_accounts/user_stats from the jail to the docker". This is one of the primary reasons that I haven't tried as yet but I am anxious to get containers ;)

I feel you bro... I was feeling the same anxiety... this is the process:
  1. First, you must keep a copy of the iocage folder where all the jail's data is located. So for plex it should be {Pool_Jail}/iocage/jails/plex/root/usr/local/Plex Media Server/Library/Application Support/Plex Media Server (I could be a little bit wrong with the actual path, but you should look for one like that, specially with the last 3 levels, you will now when you find it when you see the Cache, Logs folders with others, and also the Preferences.xml file. see image for the folder structure you should look for)
    • If you were like me, I created an "application" folder so all the config files for all my jails where routed to that one, so it was easy to locate.
  2. Don't use the Plex template(thanks @ornias!) provided by TrueNAS, it's fine, but it's not fully configurable, also I found hard to set multiple mount points. I create my own using the Launch Docker Image button, filling the correct environment variables(TZ, PLEX_UI, PLEX_GID), set your network settings, I suggest no to use the host option because right now TrueNAS has a restriction for port numbers(must be over 9000) so if you're like me I have already set up all the port forwarding options. Actually I used the same IP address as before. REALLY IMPORTANT: use the same folder structure in the "Host Path Volumes" section for your media mounts, i.e. if you used /mnt/media/movies in your jail, you must use the same pattern for the docker. At last, create in the Volume section a dataset for /config with your name choice << this you must remember.
  3. Third, start your docker container... this is just to make sure that everything is ok and working, you can try to check it, but that's it... in this step all the standard config files should be written into the /config folder (the one you choose the dataset name in the previous step). After you check that plex is running, you should stop the container.
  4. Now it comes the best part of it... copy (or move) all the data located in step 1 to the dataset location. Actual path is defined by you configure the pool for Apps (much more like TrueNAS Core), so lets imagine is located in /mnt/poolscale, the final path for Plex config files will be /mnt/poolscale/ix-applications/releases/plex/volumes/ix_volumes/{your dataset name}/Library/Application Support/Plex Media Server/. This path should contain the same folder structure as the one you found in step 1. You have to delete or replace this files before. I suggest to clear them.
  5. Make a coffee, sit and relax... it could take a while, depending on how much media do you have and if you have all enabled as me. For me it was near 300GB
  6. Once it finishes, change folder owner(recursively) to the PLEX_UI:PLEX_GID on step 2 - This could take a while also, so grab a soda...
  7. That's it, just run the container and everything should work fine. If everything is running ok you can delete the previous PLEX config folder.
Actually this guide will work for other things, like reinstallations, etc. The idea is, if you keep a copy of PLEX's data/config folder you should be fine.

I hope you can find this useful.

Screenshot 2021-02-02 181406.png
 
Last edited:

Salty1

Cadet
Joined
Sep 2, 2020
Messages
4
Thank you so much for your post. I had not seen it until today. I will work on this this weekend and report back how it went :)

Thanks again.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
I feel you bro... I was feeling the same anxiety... this is the process:
  1. First, you must keep a copy of the iocage folder where all the jail's data is located. So for plex it should be {Pool_Jail}/iocage/jails/plex/root/usr/local/Plex Media Server/Library/Application Support/Plex Media Server (I could be a little bit wrong with the actual path, but you should look for one like that, specially with the last 3 levels, you will now when you find it when you see the Cache, Logs folders with others, and also the Preferences.xml file. see image for the folder structure you should look for)
    • If you were like me, I created an "application" folder so all the config files for all my jails where routed to that one, so it was easy to locate.
  2. Don't use the Plex image provided by TrueNAS, it's fine, but it's not fully configurable, also I found hard to set multiple mount points. I used the official docker image (plexinc/pms-docker), fill the correct environment variables(TZ, PLEX_UI, PLEX_GID), set your network settings, I suggest no to use the host option because right now TrueNAS has a restriction for port numbers(must be over 9000) so if you're like me I have already set up all the port forwarding options. Actually I used the same IP address as before. REALLY IMPORTANT: use the same folder structure in the "Host Path Volumes" section for your media mounts, i.e. if you used /mnt/media/movies in your jail, you must use the same pattern for the docker. At last, create in the Volume section a dataset for /config with your name choice << this you must remember.
  3. Third, start your docker container... this is just to make sure that everything is ok and working, you can try to check it, but that's it... in this step all the standard config files should be written into the /config folder (the one you choose the dataset name in the previous step). After you check that plex is running, you should stop the container.
  4. Now it comes the best part of it... copy (or move) all the data located in step 1 to the dataset location. Actual path is defined by you configure the pool for Apps (much more like TrueNAS Core), so lets imagine is located in /mnt/poolscale, the final path for Plex config files will be /mnt/poolscale/ix-applications/releases/plex/volumes/ix_volumes/{your dataset name}/Library/Application Support/Plex Media Server/. This path should contain the same folder structure as the one you found in step 1. You have to delete or replace this files before. I suggest to clear them.
  5. Make a coffee, sit and relax... it could take a while, depending on how much media do you have and if you have all enabled as me. For me it was near 300GB
  6. Once it finishes, change folder owner(recursively) to the PLEX_UI:PLEX_GID on step 2 - This could take a while also, so grab a soda...
  7. That's it, just run the container and everything should work fine. If everything is running ok you can delete the previous PLEX config folder.
Actually this guide will work for other things, like reinstallations, etc. The idea is, if you keep a copy of PLEX's data/config folder you should be fine.

I hope you can find this useful.

View attachment 44827
Actually IX doesnt provide any(!) images and uses official images just like you.
I agree about those env-vars and unlimited storage not being available, thats annoying at best.
 

raskitoma

Dabbler
Joined
Sep 28, 2018
Messages
17
Actually IX doesnt provide any(!) images and uses official images just like you.
I agree about those env-vars and unlimited storage not being available, thats annoying at best.
Yes, you're right, my mistake... IX doesn't provide images, they provide templates... thank you... I'm going to edit the post!

About the limitations, yeah, those are annoying, but you can manage to do everything just tweaking here and there...

Also I'm going to update the list, because I added more containers
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
Yes, you're right, my mistake... IX doesn't provide images, they provide templates... thank you... I'm going to edit the post!

About the limitations, yeah, those are annoying, but you can manage to do everything just tweaking here and there...

Also I'm going to update the list, because I added more containers
Yeah I solved the first one (permission issues) for TrueCharts, took a bit of work... (more than just some tweaking tbh).
Second one (unlimited user defined mounted volumes) is in the works. Mostly just some UI code :)
 

Grinas

Contributor
Joined
May 4, 2017
Messages
174
@raskitoma
Thank you for the post

You look to be in similar situation than me where i have to migrate a lot of jails to containers.

I installed Scale but from what i can see and find online it no longer supports Jails. This is going to make it migrating them all a lot more difficult since I will have to move them all at once.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
from what i can see and find online it no longer supports Jails.
No, it doesn't. Jails are a FreeBSD thing. FreeNAS, and TrueNAS Core, run on FreeBSD, but TrueNAS SCALE runs on Linux.

But since SCALE is alpha code, I don't see why anyone's migrating anything to it at this point. Beat on it all you want for testing, but you shouldn't be running anything important there.
 

raskitoma

Dabbler
Joined
Sep 28, 2018
Messages
17
@raskitoma
Thank you for the post

You look to be in similar situation than me where i have to migrate a lot of jails to containers.

I installed Scale but from what i can see and find online it no longer supports Jails. This is going to make it migrating them all a lot more difficult since I will have to move them all at once.

Hi,

It's actually simple that it looks. I love FreeBSD jails, but I'm more confortable with docker containers just for the wide support of options you have (for example the handbrake container that helps me to automate media conversion to x265).

You just need to plan things first so, once you have a strategy, you will be like me, with all my containers fully working in SCALE.

If you have the time, do it man. If you need some advice, don't hesitate to ask.

Right now I'm working with no problems with TrueNAS SCALE since feb 2nd. and I have all the containers that are detailed in the list on the original post I made.
 

Grinas

Contributor
Joined
May 4, 2017
Messages
174
No, it doesn't. Jails are a FreeBSD thing. FreeNAS, and TrueNAS Core, run on FreeBSD, but TrueNAS SCALE runs on Linux.

But since SCALE is alpha code, I don't see why anyone's migrating anything to it at this point. Beat on it all you want for testing, but you shouldn't be running anything important there.

I understand your point currently I am only looking to see whats involved as the plan is to migrate as soon as SCALE is stable.

If you have the time, do it man. If you need some advice, don't hesitate to ask.

Where you able to create any of your containers from the command line Im new to kubernetes and I usually use docker-compose to create my containers.

I would prefer to have configs ready so i can just spin up the containers from the commandline as entering in the data from the UI is going to take forever.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
But since SCALE is alpha code, I don't see why anyone's migrating anything to it at this point. Beat on it all you want for testing, but you shouldn't be running anything important there.
I run everything on SCALE since half a year now. Also important data (of which i've daily backups externally).

That being said: I know where I can and can-not beat SCALE because I beat on it MANY hours a week for TrueCharts development.... So I think I'm one of the few cases that knows enough about the ALPHA problems to be able to mitigate :)


That being said:
This thread does give me some inspiration to add migration guides from CORE plugins, Jailman, Pentaflake-jails and @danb35 -jails to SCALE Apps for TrueCharts. ^^
 

raskitoma

Dabbler
Joined
Sep 28, 2018
Messages
17
Where you able to create any of your containers from the command line Im new to kubernetes and I usually use docker-compose to create my containers.

Of course I do it now... at first I used(and I'm still using) the GUI to create any containers. But for somethings I used std docker commands. The CLI support those and they survive reboots. One example is the fix I had to do to make my UPS work with APCUPSD container. The std for some models that uses serial to usb is with CDC drivers, but mine uses EXAR drivers. So long story short I have to edit some things on the CLI side and actually parse the correct device to the container (in my case it was /dev/ttyXRUSB0 not /dev/ttyACM0) and everything works like charm.

I've also installed rocket chat and mongo db as containers using plain docker-compose commands and also I have a portainer container to manage those as well...

I'm not an expert like @ornias, but I found my way to make things work, no problems at all (yet!) and I had a strong reason to run in alpha: Just to be able to run containers with software that sometimes you cannot run on FreeBSD.

BTW, ALPHA code is released so people like us to test it, that way it can evolve to BETA and then go to RC.
 

hbastos

Cadet
Joined
Apr 5, 2021
Messages
2
Hi everyone

Thank you @raskitoma for the guides.
Just a question, how did you solve permission across multiple containers/pods? you using same uid/guid for all user across the containers/pods?

From my understanding of the current implementation, it is the only way, right? or is there a way to share groups and user and user in groups across the containers/pods?

Thanks
HB
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
BTW, ALPHA code is released so people like us to test it, that way it can evolve to BETA and then go to RC.
With one caveat:
Once you start hacking at unsupported things, it gets increasingly hard for developers to help you when you encounter errors.

Just a question, how did you solve permission across multiple containers/pods? you using same uid/guid for all user across the containers/pods?
Thats the easiest solution, iX even provides a default uid/gid for it: 568

From my understanding of the current implementation, it is the only way, right? or is there a way to share groups and user and user in groups across the containers/pods?
I don't know what iX is doing with it, but we at TrueCharts already provide the option to set supplemental groups on containers that support native-kubernetes usermanagement. (That basically means: everything that doesn't use shitty overlays like linuxserver.io does)
 

hbastos

Cadet
Joined
Apr 5, 2021
Messages
2
Thanks for the quick reply @ornias, and for all the involvement.
I noticed you pretty active in the scale forums and your posts/comments have been helpful to read.
best.
 

raskitoma

Dabbler
Joined
Sep 28, 2018
Messages
17
Thanks for the quick reply @ornias, and for all the involvement.
I noticed you pretty active in the scale forums and your posts/comments have been helpful to read.
best.
Hi, sorry for the late reply... had very stressful days. I suggest you to follow @ornias advice. I used the one single uid:gid approach for all the containers shared data (mostly between radarr/sonnar and deluge). Remember, only the shared data, not all the data on your containers (not configs, etc)

@ornias, yeah... once you go with unsupported things, you will encounter a lot of errors. I like to document everything so I know what I'm doing and I can trackback everything as well if I f*kd somenthing there... lol
 

bodly

Dabbler
Joined
Jan 1, 2021
Messages
16
I wish the default UID/GID was configurable. All my existing data is owned by 1000/1000 which is the user on my self-built NAS/docker server. I replicate the data back and forth. So I run the apps that are going to need access to the data with that UID/GID combo.

And because I'm lazy, I leave the ones that don't need access to that data as 568.
 

raskitoma

Dabbler
Joined
Sep 28, 2018
Messages
17
I wish the default UID/GID was configurable. All my existing data is owned by 1000/1000 which is the user on my self-built NAS/docker server. I replicate the data back and forth. So I run the apps that are going to need access to the data with that UID/GID combo.

And because I'm lazy, I leave the ones that don't need access to that data as 568.

Well, linuxserver.io has multiple docker containers ready with easy config path folders, UID/GID as 1000, etc. Also if you can't find an image there you can build your own starting with one you found there.
 
Top