Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

TrueNAS Scale for Noobs like me

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

raskitoma

Neophyte
Joined
Sep 28, 2018
Messages
10
Hi guys,

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

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)

Hardware: Just see my signature... everything is there

Version: TrueNAS-SCALE-21.02-ALPHA.1

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 the jail to the 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 media and for iptv manage (recording, etc. It's much better for this than Plex)
  • XTEVE with xml auto updater (using Schedules Direct)
  • 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)
  • YACReader for Comics
  • Calibre and Calibre-Web for Books
  • Subsonic 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
  • 2 Valheim dedicated server instances
  • Resilio Sync
  • Wordpress
  • Papermerge for doc organization (receipts, scans, etc)
  • Chevereto image gallery
  • MySQL and PostgreSQL
  • HASS - Home automation
  • Caddy - to manage redirects, proxy reverse, auth, etc.
  • GoDaddyddns to auto register dynamic ip with domain
  • Netbootxyz
  • Doublecommander
  • Sqlite editor
  • rdesktop for testing
  • remmina (rdp/vnc web browser client)
  • Kimai2 for time tracking - this is specially useful for remote working
  • Organizr
  • 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
  • WikiJS
  • Even I have 2 monero mining instances(high cpu and low cpu threads) activated via cron.
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

Neophyte
Joined
Sep 28, 2018
Messages
10
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

Neophyte
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

Neophyte
Joined
Sep 28, 2018
Messages
10
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

Neophyte
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

Neophyte Sage
Joined
Mar 6, 2020
Messages
1,016
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

Neophyte
Joined
Sep 28, 2018
Messages
10
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

Neophyte Sage
Joined
Mar 6, 2020
Messages
1,016
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

Member
Joined
May 4, 2017
Messages
100
@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

Wizened Sage
Joined
Aug 16, 2011
Messages
11,872
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

Neophyte
Joined
Sep 28, 2018
Messages
10
@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

Member
Joined
May 4, 2017
Messages
100
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

Neophyte Sage
Joined
Mar 6, 2020
Messages
1,016
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

Neophyte
Joined
Sep 28, 2018
Messages
10
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.
 
Top