Setting Up TrueNAS Before Using Docker Stacks
Before you use this Docker stacks, make sure you have completed the following steps to properly configure TrueNAS:
[ Click to Expand ]- Step 1: Install TrueNAS Scale - Follow the official instructions from the TrueNAS website to install it on your hardware.
- Step 2: Configure Network Settings - Ensure your network settings are properly configured:
- Navigate to "Network > Interfaces" in the TrueNAS interface.
- Click on the "Edit" button of your interface to access the interface settings.
- Uncheck "DHCP".
- Uncheck "Autoconfigure IPv6".
- Set the "MTU" to:
- Set your TrueNAS IP address in the "Aliases" section, in most cases:
- Click "Save".
- Click on "Test Changes" and confirm.
- Access the IP address you set up for TrueNAS [ ie: https://192.168.1.1 ] and login again to confirm the changes.
- Navigate to "Network > Global Configuration > Settings" in the TrueNAS interface.
- Add the following nameservers to the "DNS Servers":
- Add your router's IP address to the "Default Gateway", in most cases:
- Click "Save".
- Navigate to "System > General Settings > GUI > Settings" in the TrueNAS interface.
- Choose your TrueNAS IP address in "Web Interface IPv4 Address", in most cases:
- Change your TrueNAS HTTP port in "Web Interface HTTP Port" from 80 to:
- Change your TrueNAS HTTPS port in "Web Interface HTTPS Port" from 443 to:
- Check "Web Interface HTTP -> HTTPS Redirect".
- Check "Show Console Messages".
- Uncheck "Usage collection".
- Click "Save".
- Navigate to "System > Advanced Settings > Sysctl" in the TrueNAS interface.
- Add the following "Variable=Value" pairs: # Don't copy the '=' sign in beetwen the Variables and their Values
- Click "Save".
1500
192.168.1.1/24
1.1.1.2
1.0.0.2
9.9.9.9
192.168.1.254
192.168.1.1
81
444
net.ipv6.conf.all.disable_ipv6=1
net.ipv4.ip_forward=1
- Step 3: Configure Apps' Pool - Follow the official instructions from the TrueNAS website to set up your pools and then: # TIP: Name your System/Apps pool 'tank'
- Navigate to "Apps > Configuration > Choose Pool" in the TrueNAS interface.
- Select your TrueNAS Apps' pool name from the list, in most cases:
- Click "Choose" to save.
tank
- Step 4: Install NVIDIA Drivers (optional) - If you have a NVIDIA GPU make sure you install the NVIDIA drivers/runtime:
- Navigate to "Apps > Configuration > Settings" in the TrueNAS interface.
- Check "Install NVIDIA Drivers"
- Click "Save".
- Step 5: Configure Datasets - You will need to configure datasets to store Docker data:
- Navigate to "System > Shell" in the TrueNAS interface.
- Type "cli" and press Enter.
- Copy and paste the following commands into the TrueNAS CLI: # Replace 'tank' with your Apps' pool name
- Type "exit" and press Enter.
- Navigate to "Datasets" in the TrueNAS interface.
- Expande your Apps' pool tree and click on the "docker" dataset to select it.
- Navigate to "Permissions > Edit" to access the ACL Editor.
- Set the following "Access Control List": # This is the default ACL for Apps
- Check "Apply permissions recursively" and confirm.
- Check "Apply permissions to child datasets".
- Click "Save Access Control List".
storage dataset create name=tank/docker share_type=APPS
storage dataset create name=tank/docker/dockge share_type=APPS
storage dataset create name=tank/docker/dockge/stacks share_type=APPS
storage dataset create name=tank/docker/dockge/data share_type=APPS
owner@ - root Allow | Full Control
group@ - root Allow | Modify
Group - builtin_users Allow | Modify
Group - builtin_administrators Allow | Full Control
User - apps Allow | Modify
- Step 6: Create Docker Networks - You will need to create the "proxy" and "home" networks to easily access your Docker services:
- Navigate to "System > Shell" in the TrueNAS interface.
- Copy and paste the following commands into the TrueNAS shell:
- If needed, replace the "home" network's subnet/ip-range, gateway and interface (ie: parent=eth0) to match your TrueNAS network's settings
sudo docker network create --driver=bridge --subnet=172.17.0.0/24 --ip-range=172.17.0.0/24 --gateway=172.17.0.1 proxy
sudo docker network create --driver=macvlan --subnet=192.168.1.0/24 --ip-range=192.168.1.0/24 --gateway=192.168.1.254 -o parent=eno1 home
- Step 7: Install Dockge - Use Dockge to manage all your Docker stacks. To install it:
- Navigate to "Apps > Discover Apps" in the TrueNAS interface.
- Search for "dockge" and click to install.
- Navigate to "Network Configuration" in the installation interface.
- Keep the default "WebUI Port":
- Change the "Certificate" to:
- Navigate to "Storage Configuration" in the installation interface.
- Choose the following type in "Dockge Stacks Storage":
- Insert the following path in "Host Path": # Replace 'tank' with your Apps' pool name
- Choose the following type in "Dockge Data Storage":
- Insert the following path in "Host Path": # Replace 'tank' with your Apps' pool name
- Navigate to "Labels Configuration" in the installation interface.
- Add the following "Key=Value" pairs: # Don't copy the '=' sign in beetwen the Keys and their Values
- Make sure to set "dockge" in the "Containers" section of each label.
- Click "Save" to install and wait for the green "Running" status indicator.
- Click on the "Web UI" button in the "Application Info" section to open Dockge.
- Change the URL to "https://" and press Enter. # Add this page to your browser's bookmark bar
31014
'truenas_default' Certificate
Host Path (Path that already exists on the system)
/mnt/tank/docker/dockge/stacks
Host Path (Path that already exists on the system)
/mnt/tank/docker/dockge/data
tsdproxy.enable=true
tsdproxy.name=dockge
tsdproxy.scheme=https
tsdproxy.tlsvalidate=false
tsdproxy.container_port=31014
- Step 8: Reboot - If everything went well, reboot your TrueNAS system.
Once these steps are completed, you'll be ready to use this Docker stacks on your TrueNAS Scale.
Choose a Docker stack from the dropdown below to get the Docker Compose and .env file configurations, along with installation instructions for TrueNAS Scale.
Requires:
Docker Compose
.env File
Installation Instructions for TrueNAS Scale
If you need help (or want to help), feel free to reach out on this thread on the Level1Techs' forum: TrueNAS-Compose