TrueNAS-Compose | Your Docker Stacks for TrueNAS CE (Scale)

I’ve remove it for now… thanks a lot for your feedback! :wink:

PS - I’ll try to create different ZFS tunables depending on different media/layouts… :roll_eyes:

EDIT: I’ve changed it to this, what do you think? :roll_eyes:

Step 24: Tune ZFS Module Parameters (optional)- Ensure that ZFS is optimized for your high-performance storage (e.g.: Optane, NVMe): # Maximizes IOPS and reduces I/O bottlenecks
  1. Navigate to "System > Shell" in the TrueNAS interface.
  2. Copy and paste the following command into the TrueNAS SHELL: # Choose only the corresponding layout of your pools configuration

    - NVMe-only pools

          midclt call system.advanced.update '{"kernel_extra_options": "zfs_vdev_def_queue_depth=128 zfs_dmu_offset_next_sync=0 zfs_vdev_async_read_max_active=12 zfs_vdev_max_active=4096"}'

    - NVMe pools + SSD pools

          midclt call system.advanced.update '{"kernel_extra_options": ""}'

    - NVMe pools + SSD pools + HDD pools

          midclt call system.advanced.update '{"kernel_extra_options": ""}'

    - NVMe pools + HDD pools

          midclt call system.advanced.update '{"kernel_extra_options": ""}'

WARNING: If you previously configured Step 23, combine those options with these in a single command to avoid overwriting settings!

Best regards,
PapaGigas

I think this is just too complex tbh. Most will never need tuning 10gbe and below. If you are going faster you likely have a xi systems M class with custom tuning or you are a diyer. Diyer 100gbe are rare:)

1 Like

My goal here is to create a way that allows “everybody” to get the best performance out of ZFS… even without having technical knowledge (but learning along the way)! :roll_eyes:

Basically what I’m trying to do is unify @wendell 's “ultimate home server” and “forbidden router” in a simple step-by-step guide… making it as optimized and secure as possible… and… well… I’m doing my best to accomplish that, lol, but some help would be very much appreciated! :wink:

Best regards,
PapaGigas

Being honest TrueNAS is not the base to do this from. I love your stuff, just youd be better off making PapaGigasOS rather than modifying TrueNAS. 25.04 onwards is even more unfriendly to customizing, bu design. Thats not to knock on xi systems. Rather they are proceeding with the appliance approach and this seriously breaks that.A few years ago forbidden router with TrueNAS would work, now its really moving on as its trying to do both enterprise and branch office so big customers can consolidate workloads which are typically storage and edge computing centric which something like TrueNAS fits well in their toadmap.

That said if you changed uour instructions to download Debian iso, install that then configure with script that’d be great! If you need a gui for disk, nfs, smb and vm mamagement then add to your steps to install Cockpit ( https://cockpit-project.org/) and you are golden.

Otherwise all the if then else makes it so hard to follow. Imho :slightly_smiling_face:

2 Likes

I understand where your critic is coming from, and it’s totally fair… but to be honest, nothing of what I’m doing here breaks anything, lol, it’s basically TrueNAS optimized as much as possible, using native Docker and Incus (that is working just fine with OPNsense)! :wink:

If I had to say, this is the best moment to use TrueNAS (due to the move to Docker and Incus) if your not really going off label, which I don’t think I am… not really! :roll_eyes:

PS - Btw, they have no problem with people using ZFS tunables… as per their comments on one of the latest “TrueNAS Tech Talk” podcast! :wink:

EDIT: Maybe I can do that after I finish this, for people who prefer to go that route… :wink:

Best regards,
PapaGigas

I’ve added this to the TrueNAS installation instructions:

Step 7: Configure Auto TRIM (optional) - Enable Auto TRIM on NVMe/SSD pools to optimize performance and extend the lifespan of your drives: # Optane and HDDs do not use the TRIM command

  1. Navigate to "Storage" in the TrueNAS interface.

  2. Click "Edit Auto TRIM" on the "ZFS Health" widget of your NVMe/SSD pool.

  3. Check "Auto TRIM".

  4. Click "Save".

  5. Repeat steps 2-4 for each NVMe/SSD pool in your system.

     WARNING: Some older or lower-quality SSD firmware may mishandle TRIM commands, potentially leading to data loss!

EDIT: I’ve added 2 more step: :wink:

Step 25: Offload RCU Callbacks (optional) - Offload RCU (Read-Copy-Update) callbacks from CPU cores to kernel threads: # Reduces latency and improves performance, especially on high-core-count systems

  1. Navigate to "System > Shell" in the TrueNAS interface.

  2. Copy and paste the following command into the TrueNAS SHELL: # Replace '63' with the number of logical CPU cores in your system minus 1 (e.g.: 64 threads - 1 = 63)

     midclt call system.advanced.update '{"kernel_extra_options": "rcu_nocbs=0-63"}'

     WARNING: If you previously configured Step 24, combine those options with these in a single command to avoid overwriting settings!

  3. If needed, copy and paste the following command into the TrueNAS SHELL to find the number of logical CPU cores in your system:

     lscpu | grep '^CPU(s):'

Step 26: Tune NVMe Driver (optional) - Ensure that the NVMe driver is optimized for your high-performance storage (e.g.: Optane, NVMe): # Improves NVMe performance by enabling polling and optimizing queue usage

  1. Navigate to "System > Shell" in the TrueNAS interface.

  2. Copy and paste the following command into the TrueNAS SHELL: # Replace '32' with the number of physical CPU cores in your system

     midclt call system.advanced.update '{"kernel_extra_options": "nvme.poll_queues=32 nvme.write_queues=8 nvme.io_poll=1 nvme.io_poll_delay=0 nvme_core.io_timeout=2 max_host_mem_size_mb=512"}'

     WARNING: If you previously configured Step 24 and/or Step 25, combine those options with these in a single command to avoid overwriting settings!

  3. If needed, copy and paste the following command into the TrueNAS SHELL to find the number of physical CPU cores in your system:

     lscpu | grep 'Core(s) per socket'

Best regards,
PapaGigas

FYI the static IPs set for Dozzle are already in use by DIUN.

1 Like

DIUN is using the host network… :roll_eyes:

I noticed that I forgot to change Gotify’s IP address in DIUN and in the TrueNAS adapter in the last refactoring, I’ve now solved it, but I don’t see the problem with Dozzle… :roll_eyes:

PS - Thanks for the feedback! :wink:

Best regards,
PapaGigas

Those changes must’ve happened yesterday. I was having issues walking through it on Monday but I see that it should work now. Thanks for the guide. It is helpful but also allows for some learning along the way. I’m currently troubleshooting my net-admin stack. I can’t access Kali or Wireshark via IP but Netalertx works just fine.

1 Like

Strange… what browser are you using? :roll_eyes:

Try using another browser… or maybe stop your security solution for a second…

I really don’t see what could it be… :roll_eyes:

EDIT: Can you check the logs of those containers inside Portainer?

Best regards,
PapaGigas

Here is Kali Linux:

GID/UID

───────────────────────────────────────

User UID: 568

User GID: 568

───────────────────────────────────────

**** adding /dev/dri/renderD128 to video group mysql with id 107 ****

**** adding /dev/dri/card0 to video group video with id 44 ****

[custom-init] No custom files found, skipping…

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Xvnc KasmVNC 1.3.3 - built Mar 22 2025 19:04:29

Underlying X server release 12101014

[ls.io-init] done.

[mi] mieq: warning: overriding existing handler (nil) with 0x556355dacc20 for event 2

[mi] mieq: warning: overriding existing handler (nil) with 0x556355dacc20 for event 3

xvnc_get_formats

xvnc_get_formats

xvnc_get_formats

xvnc_get_formats

xvnc_get_formats

xvnc_get_formats

1 Like

Wireshark:

GID/UID

───────────────────────────────────────

User UID: 568

User GID: 568

───────────────────────────────────────

[custom-init] No custom files found, skipping…

[ls.io-init] done.

Openbox-Message: Failed to open the display from the DISPLAY environment variable.

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Underlying X server release 12101014

[mi] mieq: warning: overriding existing handler 0 with 0x55752952ba90 for event 2

[mi] mieq: warning: overriding existing handler 0 with 0x55752952ba90 for event 3

Obt-Message: Xinerama extension is not present on the server

nl80211 not found.

1 Like

What IP address are you using to access wireshark?

https://192.168.1.52

or

https://192.168.1.51:3001

Did you try using another browser? or stopping your security solution? :roll_eyes:

Best regards,
PapaGigas

My internal lan is 192.168.0.X. When I try https://192.168.0.52 I get a 502 Bad Gateway error.

1 Like

Try deleting your browser’s data, then close and reopen your browser and try again… :roll_eyes:

EDIT: Also, try rebooting your router to clear its cache! :wink:

Best regards,
PapaGigas

Did you solved that issue?

Best regards,
PapaGigas

I’ve added this steps to the Step 16: Configure Users instructions: :wink:

24. Navigate to "System > General Settings > Email" in the TrueNAS interface.
25. Click on the "Settings" button.
26. Select "GMail OAuth" from the "Send Mail Method" options. # Or use your preferred method and ignore steps 27-28
27. Click "Log in to Gmail".
28. Proceed to set up your Oauth credentials.
29. Click "Send Test Mail" to test the connection. # It will generate a test message on your inbox
30. Click "Save".

Best regards,
PapaGigas

Aloha,

I think I’m about to cry :wink:
I just can’t get the reverse proxy to work.
Cloudflared tunnel is active and the public hostname is registered.
I entered the DNS entries like in your manual:

CNAME of @ is 7xxxxxxx6.cfargotunnel
But if I am trying to go to whoami.xxxx. I will get nothing.
I think there is a problem with the traefik.
Can you give me tipps? :slight_smile:
Greetings
Skinn0r

1 Like

Here are pics:

1 Like

next problem.
if I change the dnsmasq.conf (like in the manual), safe the file and restart pihole / traefik, the chages were withdrawn. Before restart i can update the filebrowser website und see the changes.

1 Like