Self-hosting

RustDesk Server on TrueNAS

Reviewed November 30, 2026Independent reference, not the official RustDesk siteReport a correction

RustDesk on TrueNAS has no official catalog app that could be verified in the RustDesk documentation reviewed for this guide. The practical path is the same Docker Compose stack you would run on Linux, placed in a virtual machine, or a custom app that can run Docker on the TrueNAS host. Host networking, which the official Compose file relies on, needs extra care on SCALE. This page does not name a catalog tile, a button, or a version-specific click path, because inventing one would send you through a UI this guide did not confirm.

rasdesc.com is not affiliated with RustDesk or with iXsystems. Follow the TrueNAS documentation for your exact release and the RustDesk Docker documentation for the processes. The two projects ship on different schedules.

Why this is a Docker problem wearing a storage-appliance hat

TrueNAS is built for datasets, snapshots, and virtual machines. RustDesk Server is two small services—hbbs and hbbr—that need a stable address and, on Linux, host networking so they see real client IPs. A Linux VM on the NAS fits that model better than expecting a one-click catalog app. The open-source server is AGPL-licensed with no license fee. Server Pro is commercial software you still host yourself. The RustDesk docs reviewed for this guide did not verify a maintained TrueNAS application for either edition.

Treat forum posts that name an app tile as untrusted until they match your TrueNAS version and the current RustDesk image. App catalogs change names, and a tile that existed in one community catalog is not a RustDesk release. If you cannot find the install in the current TrueNAS docs and the current RustDesk Docker page, you do not have an official app. You have a custom deployment.

Two practical placements

PlacementWhat you runHost networking
Virtual machineA Linux guest with Docker Engine and the official Compose file.Works as documented, because the guest kernel is ordinary Linux. Forward ports to the guest, or give the guest a LAN address of its own.
Custom app on the TrueNAS hostThe same image, rustdesk/rustdesk-server:latest, if your SCALE or CORE workflow can run a container you define.SCALE app networking often does not give you Linux --net=host. Confirm the current TrueNAS behavior before you depend on it.

The virtual machine is the path this guide recommends when you want the official file to mean what it says. You install a Linux distribution you already know how to patch, install Docker, and follow the setup guide inside the guest. TrueNAS then supplies the disk, the snapshot of that disk, and the hypervisor. RustDesk never has to understand ZFS.

A custom app is reasonable when you already operate custom images on SCALE and you accept the networking caveat. You still use the image, the commands hbbs and hbbr, and a persistent volume mounted at /root in the container. You do not gain a vendor-supported upgrade channel. When SCALE’s app layer puts the container on a bridge, hbbs may see a container address instead of the client address. NAT classification and hole punching suffer, which the architecture page explains. The official Docker page says --net=host is how the processes see the real incoming IP, and it says to remove host networking when that mode causes trouble. On SCALE, “causes trouble” includes “the platform will not apply it.” If you cannot get real client addresses, prefer the VM.

Prerequisites

You need a TrueNAS system you administer, with spare CPU and RAM for a small Linux guest if you take the VM path. You need a dataset for the guest disk or for the container’s data directory, with snapshots or replication you already trust. The directory that holds id_ed25519.pub is the one you must be able to restore. You need a network address for the server that clients can resolve, and control of the firewall in front of it.

Native clients need TCP 21115–21117 and UDP 21116 to reach the guest or the app. Pro adds TCP 21114 for the console unless HTTPS 443 fronts it, and Pro needs outbound HTTPS for the license check. OSS has no license check. TCP 21118 and 21119 stay closed unless a reverse proxy is the only client of those ports. The ports page is the checklist. Write the forwards to the guest’s address, not to the TrueNAS management IP, unless the processes are actually listening on the management IP.

You need the official clients on the computers you will connect. Download them from the links on the download page. You do not need a TrueNAS account on rustdesk.com. There is no such account.

Supported environment

This guide does not certify a TrueNAS CORE or SCALE version. CORE’s VM facility and SCALE’s VM facility both change between releases. SCALE’s app framework has changed naming and implementation more than once. Read the TrueNAS documentation that matches the release you are booting. Inside the guest, the supported RustDesk layout is Linux plus Docker, with host networking. Docker Desktop does not belong in this story. The warning about Docker Desktop on Windows and macOS is for people running the engine on those desktops. A Linux VM on TrueNAS is a Linux host.

ARM TrueNAS hardware is unusual. If you have it, the image or the binaries still have to match the CPU. The Raspberry Pi page is about that class of ARM host. An Intel or AMD TrueNAS system pulls the ordinary image. Client platforms are unchanged: Windows, macOS, Linux, Android, iOS as a controller only, and the Pro web client when the plan qualifies.

Steps that stay inside documented tools

  1. Create a Linux virtual machine using the TrueNAS UI and guide for your release. Give it a LAN address, a current OS, and enough disk for Docker plus the data directory. Snapshot the guest before you install anything you might want to undo.
  2. Inside the guest, install Docker Engine and the Compose plugin from Docker’s instructions for that distribution.
  3. Create a directory such as the one you will back up with the guest. Put the official Compose file there.
  4. Start Compose. Confirm id_ed25519.pub appears. Back up the data directory using the guest’s tools or a snapshot of the whole disk.
  5. On the router or firewall, forward the native ports to the guest. Do not forward them to an address where nothing is listening.
  6. Configure authorized clients with the ID server and the public key. Use the relay field only if hbbr is not on that same guest. Use the API server field only for Pro.

The Compose file you put in the guest is the official one:

services:
  hbbs:
    container_name: hbbs
    image: rustdesk/rustdesk-server:latest
    command: hbbs
    volumes:
      - ./data:/root
    network_mode: "host"

    depends_on:
      - hbbr
    restart: unless-stopped

  hbbr:
    container_name: hbbr
    image: rustdesk/rustdesk-server:latest
    command: hbbr
    volumes:
      - ./data:/root
    network_mode: "host"
    restart: unless-stopped
docker compose up -d

Alternatively, download the publisher’s file inside the guest and read it before starting:

wget rustdesk.com/oss.yml -O compose.yml
docker compose up -d

Pro is wget rustdesk.com/pro.yml -O compose.yml and the same docker compose up -d. The publisher’s homepage also offers a quick start that pipes a remote shell script. Read the script before you run it. A one-off manual start inside the guest uses the official lines:

sudo docker image pull rustdesk/rustdesk-server
sudo docker run --name hbbs -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server hbbs
sudo docker run --name hbbr -v ./data:/root -td --net=host --restart unless-stopped rustdesk/rustdesk-server hbbr

If a custom SCALE app cannot set network_mode: "host", do not pretend the file above still applies unchanged. Remove host networking only because the platform cannot honor it, then judge NAT behavior honestly. Moving the workload into a VM is the correction when punching or client addresses look wrong. Container operations that do work are collected on the Docker page.

ALWAYS_USE_RELAY=Y remains an optional environment value on hbbs if policy demands relay. On a storage server that also has a modest WAN link, forcing relay spends bandwidth the NAS was bought to spend on disks. Leave the variable unset unless you mean it.

What you should see

Inside the guest, docker logs hbbs should show a process that stays running, and ./data/id_ed25519.pub should exist after the first start. From a computer that is not the TrueNAS box, a client using that public key and the guest’s reachable name should show Ready. Ready from inside the guest and Not ready from the LAN means the guest network or the forward is wrong, not the image.

The TrueNAS management interface should look the same as before. RustDesk does not add a panel to it. If you expected a new icon labeled as an official RustDesk app, that expectation is the thing to drop. Snapshots of the guest disk are the recovery tool you already have. Take one after the key exists, and test a restore on a schedule you use for other VMs.

A Pro console, if you installed Pro, listens on TCP 21114 in the guest or on whatever HTTPS front you added. It is not a TrueNAS login. The Individual plan still does not create an extra admin user beyond the default admin.

Troubleshooting

The most common miss is forwarding ports to the TrueNAS management address while hbbs is listening on a VM address. Check the guest IP against the forward rule. The second miss is UDP. TCP 21116 can be open while UDP 21116 is not, and registration uses the UDP side. The third is host networking on SCALE. If logs and a shell inside the container show a bridge address as the only world the process can see, hole punching will be poor. Move to a VM instead of stacking more port publications.

“Not ready, please check your connection” is still the client sentence for an unreachable ID server. Confirm DNS, the key, the clock inside the guest, and that both containers are up. A guest that sleeps, or a VM autostart you forgot to enable, produces the same sentence after a NAS reboot. Set the VM to start with the host if this server is supposed to survive maintenance.

If Ready is solid and sessions fail, test TCP 21117 to the guest. Hairpin NAT applies if you test from the same LAN using the public name. Test from a network outside the house or office before you rebuild the app. There is no public status page in this guide for a server running in your VM.

Security notes

The data volume holds the private key. On TrueNAS, that means the dataset permissions and the people who can open a share or a snapshot. Do not put ./data on an SMB share that every user can read. Snapshot it, replicate it to a target with its own access control, and keep the private key off client machines. Clients get id_ed25519.pub only. That file is not the Pro license key. The API server field, if you use Pro, is the console address and is also not the license key.

Close 21118 and 21119 on the guest and on the router. Open them only for a reverse proxy that is the sole client, because X-Real-IP and X-Forwarded-For are not validated. Spoofed headers undermine IP limits and log addresses. Minimum native publishing remains TCP 21115–21117 and UDP 21116, aimed at the guest. Pro license validation needs outbound HTTPS from the guest. OSS does not call out.

TrueNAS administration and RustDesk administration are different privileges. A storage admin is not automatically authorized to open every desktop in the company, and a RustDesk permanent password does not belong in a TrueNAS share description. Use the server only for machines you are allowed to administer. The security guide covers encryption scope: NaCl end-to-end encryption is the documented property of the normal ID-based model, and Direct IP access is a separate unencrypted path you should leave disabled.

Frequently Asked Questions

Is there an official RustDesk app for TrueNAS?

No official TrueNAS app was verified in the RustDesk docs reviewed for this guide. Do not follow a catalog name from an old post. Run the Docker Compose stack in a Linux VM, or a custom app you define yourself, and check the TrueNAS docs for that release.

Why does SCALE host networking need a caveat?

The official RustDesk Compose file uses network_mode: "host" so hbbs sees real client addresses. SCALE’s app network does not always provide that Linux behavior. When it does not, NAT traversal suffers. A Linux VM on the same NAS gets ordinary host networking.

Where should I store the key directory?

On a dataset you snapshot and restore, mounted into the container at /root or held inside the guest disk. The public file is id_ed25519.pub. Keep the private key out of general file shares.

Which ports do I forward to the VM?

TCP 21115, TCP 21116, UDP 21116, and TCP 21117, to the guest address. Add TCP 21114 only for a Pro console you are not publishing through HTTPS. Leave 21118 and 21119 closed unless a reverse proxy is the only client.