- Create dedicated datasets for docker and application data
- Configure ZFS Record Sizes
- Deploy and configure Dockge as a Truenas application
- Migrate truenas applications to Docker Compose stacks
- Install Pangolin Newt and Crafty 4 with a bridge network
- Login to your Truenas server via SSH. Run the following command
ls /mntshare the results. - Startup the Truenas CLI by running
cli - Copy and paste the following commands into the TrueNAS CLI: # Replace 'tank' with your Apps' pool name
- Create docker dataset
storage dataset create name=tank/docker share_type=APPS - Create dockge dataset
storage dataset create name=tank/docker/dockge share_type=APPS - Create dockge/stacks dataset
storage dataset create name=tank/docker/dockge/stacks share_type=APPS - Create dockge/data dataset
storage dataset create name=tank/docker/dockge/data share_type=APPS - Create crafty datasets:
storage dataset create name=tank/docker/crafty/backups share_type=APPS storage dataset create name=tank/docker/crafty/logs share_type=APPS storage dataset create name=tank/docker/crafty/config share_type=APPS storage dataset create name=tank/docker/crafty/import share_type=APPS storage dataset create name=tank/docker/crafty/servers share_type=APPS - Exit CLI
exit
Ensure that the record sizes are optimized for each dataset based on its specific workload: # Adjusting the 'recordsize' helps improve performance
-
Navigate to "System > Shell" in the TrueNAS interface.
-
Copy and paste the following commands into the TrueNAS shell: # Replace 'tank' with your Apps' pool name
sudo zfs set recordsize=16K tank/dockersudo zfs set recordsize=16K tank/incus
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":
31014 -
Navigate to "Storage Configuration" in the installation interface.
-
Choose the following type in "Dockge Stacks Storage":
Host Path (Path that already exists on the system) -
Insert the following path in "Host Path": # Replace 'tank' with your Apps' pool name
/mnt/tank/docker/dockge/stacks -
Choose the following type in "Dockge Data Storage":
Host Path (Path that already exists on the system) -
Insert the following path in "Host Path": # Replace 'tank' with your Apps' pool name
/mnt/tank/docker/dockge/data -
Click "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
-
Set your "Username" and "Password". # Confirm password
-
Click "Create".
services:
crafty:
container_name: crafty_container
image: registry.gitlab.com/crafty-controller/crafty-4:latest
restart: always
environment:
- TZ=Etc/UTC
networks:
- crafty_net
- newt_proxy
ports:
- "8000:8000" # HTTP
- "8443:8443" # HTTPS
- "8123:8123" # DYNMAP
- "19132:19132/udp" # BEDROCK
- "25500-25600:25500-25600" # MC SERV PORT RANGE
volumes:
- /mnt/${APPS_POOL:-tank}/docker/crafty/backups:/crafty/backups
- /mnt/${APPS_POOL:-tank}/docker/crafty/logs:/crafty/logs
- /mnt/${APPS_POOL:-tank}/docker/crafty/servers:/crafty/servers
- /mnt/${APPS_POOL:-tank}/docker/crafty/config:/crafty/app/config
- /mnt/${APPS_POOL:-tank}/docker/crafty/import:/crafty/import
networks:
crafty_net:
driver: bridge
newt_proxy:
external: true
.env
# GLOBAL:
APPS_POOL=tank #Replace with your apps pool
TZ='America/Vancouver'
PUID=568 # Default: 568 (Apps)
PGID=568 # Default: 568 (Apps)
####################################################################################################
services:
newt:
image: fosrl/newt
container_name: newt
restart: unless-stopped
environment:
- PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT}
- NEWT_ID=${NEWT_ID}
- NEWT_SECRET=${NEWT_SECRET}
- HEALTH_FILE=/tmp/healthy
networks:
- newt_proxy
networks:
newt_proxy:
driver: bridge
.env
# GLOBAL:
APPS_POOL=tank #Replace with your apps pool
TZ='America/Vancouver'
PUID=568 # Default: 568 (Apps)
PGID=568 # Default: 568 (Apps)
####################################################################################################
PANGOLIN_ENDPOINT=https://example.com
NEWT_ID=2ix2t8xk22ubpfy
NEWT_SECRET=nnisrfsdfc7prqsp9ewo1dvtvci50j5uiqotez00dgap0ii2