> ## Documentation Index
> Fetch the complete documentation index at: https://docs.recasaos.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Tailscale (or another VPN app) restarts in a loop

> The Tailscale app from the store restarts every few seconds after it is stopped once: give its web client another port.

The Tailscale app from the store starts its web client on each start, and after the container has been stopped once, the Tailscale daemon still holds the port that client wants: the app fails and restarts every few seconds. Moving the web client to another port stops the loop.

## Fix the Tailscale app

1. Edit `/var/lib/casaos/apps/tailscale/docker-compose.yml`: change the `entrypoint` line to

   ```yaml theme={null}
   entrypoint: /bin/sh -c "tailscaled --state=/var/lib/tailscale/tailscaled.state & sleep 10; tailscale web --listen 0.0.0.0:5253"
   ```

   and set `port_map: "5253"`.
2. Start it again:

   ```bash theme={null}
   cd /var/lib/casaos/apps/tailscale && sudo docker compose up -d
   ```

The dashboard icon then opens the sign-in page on port 5253. Updating or reinstalling the app from the store puts the original line back: edit it again after.

## A VPN app fails to start after a backup

Before v0.5.123, a backup of an app that mounts `/lib/modules` (wg-easy, Tailscale) copied the whole folder and could break the app's restart. Since v0.5.123 that folder is left out of backups: [update ReCasaOS](https://docs.recasaos.org/get-started/update.md).

Issue: [ReCasaOS/CasaOS#131](https://github.com/ReCasaOS/CasaOS/issues/131).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.