# Unraid

Source: https://tiltas.openpanel.sh/docs/devices/unraid

> Run Tiltas on Unraid from its Docker template, share your home LAN, update and remove it.

Tiltas runs on Unraid as a Docker container from its own template. The server joins your Network as a Server, and it
can share your home LAN with your other Devices. It is not in Community Applications yet, so the template is added by
hand once.

## 1. Get a Join key

1. In the [console](/app), open **Join keys** and choose **Create Join key**.
2. Name it after the machine, such as “unraid”. 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. Add the template

Open **Terminal** in the Unraid web interface (or connect over SSH) and download the template into your user
templates:

```bash
wget -O /boot/config/plugins/dockerMan/templates-user/my-tiltas.xml https://tiltas.openpanel.sh/unraid/tiltas.xml
```

## 3. Create the container

1. Open **Docker** → **Add Container** and choose **tiltas** under the user templates.
2. Paste the **Join key**. Change the **Device name** if you like; leave **Subnet routes** empty for now.
3. Choose **Apply**. Unraid downloads the image and starts the container.

The template uses host networking, so the Unraid server itself is in your Network, and kernel networking with
`/dev/net/tun` and `NET_ADMIN`. The sign-in is kept in `/mnt/user/appdata/tiltas`: keep it, and the container stays the
same Device through restarts and updates. The Join key is read on the first start only.

**Tailscale on the same server**

If the Tailscale plugin also runs on this server, both use addresses in `100.64.0.0/10` and get in each other's way: set
**Userspace networking** to `true` under the advanced settings. See
[Tiltas and Tailscale on one machine](/docs/troubleshooting/tailscale).

## 4. Check that it is online

In the console, **Devices** lists `unraid` as **Online** with its address, such as `100.64.0.7`. It is a Server: other
Devices reach it only where an [Access rule](/docs/access) or a [Service](/docs/services) allows.

On the Docker page the container is started and healthy. Its **Console** runs Tiltas commands, such as
`tiltas status`.

## 5. Share your home LAN

Your LAN is the network your router hands out, written as a subnet: a server at `192.168.1.20` with the mask
`255.255.255.0` is on `192.168.1.0/24`.

Edit the container, put your LAN in **Subnet routes**, such as `192.168.1.0/24`, and choose **Apply**. Docker on Unraid
has IP forwarding on already. Then:

1. In the console, open **Devices**, then `unraid`. 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. More in [Subnet routers](/docs/access/subnet-routers).

## Update

Edit the container and choose **Apply** without changes: Unraid downloads the latest image and recreates the container
from the same appdata, so it reconnects as the same Device.

## Remove

1. In the container's **Console**, run `tiltas logout`. It removes the Device from your Network. Or remove it in the
   console under **Devices**.
2. On the Docker page, stop the container and choose **Remove**, with its image.
3. Delete `/mnt/user/appdata/tiltas`, and `my-tiltas.xml` from the user templates if you will not use it again.

A server set up from the template's earlier name keeps working; see [the migration note](/docs/moving-from-quietlane).
