Перейти к содержимому

TrueNAS

TrueNAS Community Edition 25.04 or later, or TrueNAS SCALE 24.10, with Docker apps, an SSD pool for app data, and a reverse proxy or a tunnel. Install a custom app from the YAML below, which takes about 20 minutes.

  • One custom app called fluxer, with one container and one Docker volume called fluxer-data in the apps pool. A ZFS snapshot of the apps dataset taken while Squad runs may not restore cleanly, and Squad’s own backups don’t have that problem.
  • Port 8080 for your proxy, and ports 7881 on TCP and 7882 on UDP for voice, forwarded from your router to the TrueNAS machine.
  • Check the requirements.
  • TrueNAS 24.04 and older run apps on Kubernetes, and these steps don’t work there.
  • The TrueNAS web UI uses ports 80 and 443. Either run Squad in proxy mode behind a proxy, as below, or move the UI to other ports under System, General, GUI.
  • Choose a pool for apps under Apps, Configuration, if you haven’t already.
  1. Under Apps, choose “Discover Apps”, open the menu next to “Custom App” and choose “Install via YAML” to paste a compose file.

  2. Call the app fluxer, then paste this with your own domain in it.

    Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.

    To keep the data in a dataset in place of the fluxer-data volume, make user ID 65532 its owner, because Squad runs as that user.

  3. Save the app.

    The first start pulls the image and takes a few minutes. The app should then show as running under Apps, Installed. To upgrade later, edit the app, change the tag on the image line and save. The FLUXER_UPGRADE_COMMAND line makes the admin panel show this step with the new version when one is out.

  4. Point your proxy at http://<truenas address>:8080 for your domain, with WebSockets turned on and an upload limit of at least 512 MiB.

    Squad trusts the visitor address that any private address passes on, so keep port 8080 closed to the other devices on your home or office network.

    The Squad setup wizard opens at https://chat.example.com.

  5. Print the setup token in the TrueNAS shell.

    Окно терминала
    sudo docker exec fluxer fluxerd setup-token

    Open your domain and paste the token to create the first admin account.

Squad can also run on the TrueNAS machine’s own address, such as 192.168.1.20, and sign its own certificate. Devices on your home network can then open it, and nobody outside can. The TrueNAS web UI keeps ports 80 and 443, so Squad uses 8080 and 8443.

In the compose file, set these lines, leave out FLUXER_EDGE_MODE and replace the ports.

compose.yaml
services:
fluxer:
environment:
FLUXER_DOMAIN: 192.168.1.20
FLUXER_PUBLIC_PORT: "8443"
ports:
- "8080:80"
- "8443:443"
- "7881:7881"
- "7882:7882/udp"

Open https://192.168.1.20:8443 with your own address. Browsers show a certificate warning until you install Squad’s root certificate on each device. Each device can download the certificate file from http://192.168.1.20:8080/fluxer-root.crt with any browser.

If you set up the older layout of Squad on TrueNAS, with each part of Squad in its own container, move it to compose files and let TrueNAS run them as a custom app.

  1. Install rexctl in a folder on one of your pools, with your own pool in place of tank. TrueNAS keeps /usr read-only, and the install script stops when it can’t write to /usr/local/bin.

    Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.

    sudo doesn’t look in that folder. Run rexctl by its full path, as in the steps below. rexctl updates itself in the same folder.

  2. In the folder of the older install, see what the move would do, then move.

    Окно терминала
    cd /mnt/tank/fluxer
    sudo /mnt/tank/rexctl/rexctl migrate --to compose --dry-run
    sudo /mnt/tank/rexctl/rexctl migrate --to compose

    rexctl writes compose.yaml and fluxer.env into a new folder next to the old one, such as /mnt/tank/fluxer-container, and starts Squad from them. Moving from the older install has the details.

  3. Sign in to your instance in the browser. When your messages and uploads are there, remove the old containers and volumes.

    Окно терминала
    sudo /mnt/tank/rexctl/rexctl migrate --clean-up
  4. Stop Squad in the new folder. docker compose down without -v keeps its volume.

    Окно терминала
    cd /mnt/tank/fluxer-container
    sudo docker compose down
  5. Under Apps, choose “Discover Apps”, open the menu next to “Custom App” and choose “Install via YAML”. Call the app fluxer and paste this, with the full path of the new folder.

    compose.yaml
    include:
    - /mnt/tank/fluxer-container/compose.yaml
    services: {}

    TrueNAS then runs Squad from compose.yaml and fluxer.env in that folder, on the same volume. TrueNAS 25.10.0 refuses a file without a services line, and services: {} adds nothing. To upgrade later, change the tag on the image: line in compose.yaml, then stop and start the app in TrueNAS.

Each TrueNAS update installs a new copy of the system and replaces /usr, /opt, /etc and /var/lib. Your pools, /root and /home stay. After an update, these are gone.

  • rexctl’s list of instances in /etc/rexctl/instances.json.
  • The systemd units in /etc/systemd/system that rexctl adds for automatic upgrades, scheduled backups and starting Squad with the machine.
  • A systemd install of Squad, which keeps its data in /var/lib/fluxer.

Don’t move to systemd on TrueNAS. A custom app, the other containers in the apps pool and their volumes stay after an update. If rexctl runs Squad in one container after --to docker, run rexctl in the instance folder after each TrueNAS update and turn automatic upgrades and scheduled backups on again.