Skip to content

Instantly share code, notes, and snippets.

@coltondick
Last active September 20, 2025 18:47
Show Gist options
  • Select an option

  • Save coltondick/b3f73e60fb1eaa7e7fa0808ce03297a7 to your computer and use it in GitHub Desktop.

Select an option

Save coltondick/b3f73e60fb1eaa7e7fa0808ce03297a7 to your computer and use it in GitHub Desktop.

Main tasks

  1. Create dedicated datasets for docker and application data
  2. Configure ZFS Record Sizes
  3. Deploy and configure Dockge as a Truenas application
  4. Migrate truenas applications to Docker Compose stacks
  5. Install Pangolin Newt and Crafty 4 with a bridge network

Create dedicated datasets

  1. Login to your Truenas server via SSH. Run the following command ls /mnt share the results.
  2. Startup the Truenas CLI by running cli
  3. Copy and paste the following commands into the TrueNAS CLI: # Replace 'tank' with your Apps' pool name
  4. Create docker dataset storage dataset create name=tank/docker share_type=APPS
  5. Create dockge dataset storage dataset create name=tank/docker/dockge share_type=APPS
  6. Create dockge/stacks dataset storage dataset create name=tank/docker/dockge/stacks share_type=APPS
  7. Create dockge/data dataset storage dataset create name=tank/docker/dockge/data share_type=APPS
  8. 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
    
  9. Exit CLI exit

Configure ZFS Record Sizes

Ensure that the record sizes are optimized for each dataset based on its specific workload: # Adjusting the 'recordsize' helps improve performance

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

  2. Copy and paste the following commands into the TrueNAS shell: # Replace 'tank' with your Apps' pool name

    sudo zfs set recordsize=16K tank/docker

    sudo zfs set recordsize=16K tank/incus

Deploy and configure Dockge as a Truenas application

Use Dockge to manage all your Docker stacks. To install it:

  1. Navigate to "Apps > Discover Apps" in the TrueNAS interface.

  2. Search for "dockge" and click to install.

  3. Navigate to "Network Configuration" in the installation interface.

  4. Keep the default "WebUI Port": 31014

  5. Navigate to "Storage Configuration" in the installation interface.

  6. Choose the following type in "Dockge Stacks Storage":

    Host Path (Path that already exists on the system)

  7. Insert the following path in "Host Path": # Replace 'tank' with your Apps' pool name

    /mnt/tank/docker/dockge/stacks

  8. Choose the following type in "Dockge Data Storage":

    Host Path (Path that already exists on the system)

  9. Insert the following path in "Host Path": # Replace 'tank' with your Apps' pool name

    /mnt/tank/docker/dockge/data

  10. Click "Install" and wait for the green "Running" status indicator.

  11. Click on the "Web UI" button in the "Application Info" section to open Dockge.

  12. Change the URL to "https://" and press Enter. # Add this page to your browser's bookmark bar

  13. Set your "Username" and "Password". # Confirm password

  14. Click "Create".

Docker compose stacks

Crafty 4

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)

####################################################################################################

Newt

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment