Skip to Content

Docker

Run Tiltas in a container with docker run or Compose, share your LAN, update and remove it.

The Tiltas image adds the computer it runs on to your Network as a Server. It runs on 64-bit Linux (amd64 and arm64), keeps its sign-in in a volume, and can share your home LAN with your other Devices.

1. Get a Join key

  1. In the console, open Join keys and choose Create Join key.
  2. Name it after the machine, such as “home-server”. Leave Reusable off: the key then adds one Server and is spent.
  3. Create it and copy the key, which starts with qlj_. It is shown once and works for 7 days unless you chose otherwise.

2. Start the container

Terminal
docker run -d --name tiltas --restart unless-stopped \
  --network host --cap-add NET_ADMIN --device /dev/net/tun \
  -v tiltas-state:/var/lib/tiltas \
  -e TILTAS_JOIN_KEY=qlj_your_join_key \
  -e TILTAS_HOSTNAME=home-server \
  tiltas-registry.openpanel.sh/tiltas/tiltas:latest
  • --network host puts the host itself in your Network: other Devices reach the machine, not just the container. Without it the container is a Device of its own.
  • --cap-add NET_ADMIN --device /dev/net/tun give kernel networking. Without them the image uses userspace networking by itself.
  • tiltas-state holds the Device's sign-in. Keep it: a restarted or updated container is then the same Device and never joins again.
  • The Join key is read on the first start only. A single-use key is spent then, so it does no harm that docker inspect shows it.

Or with Docker Compose

This keeps the Join key in a file, passed in as a Docker secret.

compose.yaml
services:
  tiltas:
    image: tiltas-registry.openpanel.sh/tiltas/tiltas:latest
    container_name: tiltas
    restart: unless-stopped
    network_mode: host
    cap_add: [NET_ADMIN]
    devices: ["/dev/net/tun:/dev/net/tun"]
    environment:
      TILTAS_HOSTNAME: home-server
      # TILTAS_ROUTES: 192.168.1.0/24
    secrets:
      - source: join_key
        target: tiltas_join_key
    volumes:
      - ./state:/var/lib/tiltas

secrets:
  join_key:
    file: ./join_key
Terminal
echo qlj_your_join_key > join_key && chmod 600 join_key
docker compose up -d

3. Check that it is online

Terminal
docker logs tiltas

The first lines say how it started:

Output
tiltas: kernel networking (interface tiltas0)
tiltas: signing in
Terminal
docker exec tiltas tiltas device
Output
Device ID  dev_738arbrsr2
Address    100.64.0.1
Name       home-server
Panel      https://tiltas.openpanel.sh

docker ps shows the container as (healthy) once it is connected. In the console, Devices lists home-server as Online. It is a Server: other Devices reach it only where an Access rule or a Service allows.

Without a Join key, the log prints a link and a code instead. Approving the code adds the container as the Personal device of whoever approves it, so use a Join key for anything that should belong to the Account.

4. Share your home LAN

One Device can give your other Devices the whole LAN behind it: the router, a printer, a camera, things that cannot run Tiltas. Your LAN is the network your router hands out, written as a subnet: a NAS at 192.168.1.20 with the mask 255.255.255.0 is on 192.168.1.0/24.

Add -e TILTAS_ROUTES=192.168.1.0/24 to the command (in Compose, uncomment the line) and start the container again from the same volume; the Join key is not used again. Then:

  1. In the console, open Devices, then home-server. Under Subnet routes the LAN shows as Offered: switch it on to approve it.
  2. Open Access rules and choose Add a rule: under Who, who may use the LAN; under May reach, a Subnet, 192.168.1.0/24, with ports if you want to narrow it.

Nothing reaches the LAN until both are done: approving shares the route, the rule says who may use it. Tiltas's apps and tiltas up use approved routes by themselves, so your laptop can then open http://192.168.1.1 (your router, say) from anywhere. More in Subnet routers.

With --network host, Docker has already turned on IP forwarding on the host. Without it, add --sysctl net.ipv4.ip_forward=1 in kernel networking; the log warns when forwarding is off.

Kernel or userspace networking

KernelUserspace
NeedsNET_ADMIN and /dev/net/tunNothing
Other Devices reach the hostYes, on the ports rules allowYes: connections go to the same port on the host (with host networking)
Shares your LANYesYes
Programs on the host reach other DevicesYes, by addressOnly through a SOCKS5 proxy (TILTAS_DAEMON_FLAGS=--socks5-server=localhost:1055), and not LANs that other Devices share

The image picks kernel networking when it has both, and says which one it uses in its first log line. If Tailscale also runs on the same host in kernel mode, both use addresses in 100.64.0.0/10 and get in each other's way: run Tiltas in userspace networking there. See Tiltas and Tailscale on one machine.

Settings

VariableWhat it does
TILTAS_JOIN_KEYThe Join key. Used on the first start only.
TILTAS_JOIN_KEY_FILEA file holding the Join key instead. /run/secrets/tiltas_join_key (a Docker secret) is read by itself when present.
TILTAS_HOSTNAMEThe Device's name, given on the first start. Rename it later in the console.
TILTAS_ROUTESSubnets to share, comma-separated, such as 192.168.1.0/24. Applied on every start; set but empty stops sharing.
TILTAS_USERSPACEauto (default): kernel networking when the container has NET_ADMIN and /dev/net/tun, else userspace. true or false to choose.
TILTAS_UP_FLAGSMore tiltas up flags in --flag=value form, such as --accept-dns=false. Later starts apply the ones that are settings.
TILTAS_DAEMON_FLAGSMore tiltasd flags, such as --socks5-server=localhost:1055.
TILTAS_PANELA Panel other than https://tiltas.openpanel.sh.
TILTAS_STATE_DIRWhere the state is kept, /var/lib/tiltas by default.

Any tiltas command runs in the container, such as docker exec tiltas tiltas status.

Update

Terminal
docker pull tiltas-registry.openpanel.sh/tiltas/tiltas:latest
docker rm -f tiltas
# then the same docker run command as above

With Compose: docker compose pull && docker compose up -d. The new container finds the sign-in in the volume and reconnects as the same Device:

Output
tiltas: signed in before: reconnecting with the stored Device token

Stopping or restarting the container never removes the Device. To run a known version instead of latest, use its tag: docker exec tiltas tiltas version prints the version you run, and its long version is the image's tag.

Remove

Terminal
docker exec tiltas tiltas logout
docker rm -f tiltas
docker volume rm tiltas-state

tiltas logout removes the Device from your Network, as removing it in the console does. If you only delete the container, the Device stays listed as offline: remove it under Devices.

On this page

Ask AI about this page