Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unraid 7 / Add Container / ERROR: Couldn't detect persistent Docker directory for .tailscale_state!

Featured Replies

I recently upgraded to Unraid & and have been trying to get the "Use Tailscale" option to work with containers.

For every one that I've tried, the log reports

 

Download from Tailscale version 1.78.1 successful!
Installation Done!
ERROR: Couldn't detect persistent Docker directory for .tailscale_state!
       Please enable Tailscale Advanced Settings in the Docker template and set the Tailscale State Directory manually!

 

Any ideas? Thanks.

Solved by ich777

  • Solution
7 minutes ago, ronschaeffer said:

For every one that I've tried, the log reports

What containers are you using/trying?

 

You can always specify the state directory manually here by opening the Advanced Settings in the Tailscale settings:grafik.png.4eb2eb3f034846f828fd8340d3416b7a.png

 

This state directory should always reflect the persistent directory inside the container like here "/data":

grafik.png.af68a5fee79ba8613a2123efd2b742e8.png

 

So to speak in this example the state directory should be "/data/.tailscale_state":
grafik.png.e22a0db269d63f5221b4f6e40d91e34e.png

  • Author
10 minutes ago, ich777 said:

What containers are you using?

I've just tired another which worked. This is the docker run command as generated by Unraid:

 

docker run
  -d
  --name='FileBrowser'
  --entrypoint='/opt/unraid/tailscale'
  --net='bridge'
  --pids-limit 2048
  -e TZ="Europe/London"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="SERVER"
  -e HOST_CONTAINERNAME="FileBrowser"
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -e TAILSCALE_HOSTNAME='fliebrowser'
  -e TAILSCALE_ALLOW_LAN_ACCESS='false'
  -e TAILSCALE_USE_SSH='false'
  -e TAILSCALE_USERSPACE_NETWORKING='false'
  -e TAILSCALE_SERVE_PORT='80'
  -e ORG_ENTRYPOINT="/init"
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:80]/files/'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/UnRAIDES/templates-UnRAID/main/icons/filebrowser-icon.png'
  -l net.unraid.docker.tailscale.webui='https://[hostname][magicdns]/files/'
  -l net.unraid.docker.tailscale.hostname='fliebrowser'
  -p '30000:80/tcp'
  -v '/mnt/user':'/srv':'rw'
  -v '/mnt/user/appdata/filebrowser/':'/database/':'rw'
  -v '/usr/local/share/docker/tailscale_container_hook':'/opt/unraid/tailscale'
  --cap-add=NET_ADMIN
  --device='/dev/net/tun' 'unraides/filebrowser'

 

This is one of several that failed with that same error:
 

docker run
  -d
  --name='flame_cloudflare'
  --entrypoint='/opt/unraid/tailscale'
  --net='bridge'
  --pids-limit 2048
  -e TZ="Europe/London"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="SERVER"
  -e HOST_CONTAINERNAME="flame_cloudflare"
  -e 'PASSWORD'='011020Flame'
  -e TAILSCALE_HOSTNAME='flame'
  -e TAILSCALE_ALLOW_LAN_ACCESS='false'
  -e TAILSCALE_USE_SSH='false'
  -e TAILSCALE_USERSPACE_NETWORKING='false'
  -e TAILSCALE_SERVE_PORT='5005'
  -e ORG_ENTRYPOINT="docker-entrypoint.sh"
  -e ORG_CMD="sh
  -c chown
  -R node /app/data && node server.js"
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:5005]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/pawelmalak/unraid-templates/master/templates/icons/flame.png'
  -l net.unraid.docker.tailscale.webui='https://[hostname][magicdns]'
  -l net.unraid.docker.tailscale.hostname='flame'
  -p '5031:5005/tcp'
  -v '/mnt/user/appdata/flame_cloudflare':'/app/data':'rw'
  -v '/usr/local/share/docker/tailscale_container_hook':'/opt/unraid/tailscale'
  --cap-add=NET_ADMIN
  --device='/dev/net/tun'
  --init 'pawelmalak/flame'

 

I tried Flame again after FileBrowser succeeded. Same error.

 

Thanks for the reply.

 



 

5 minutes ago, ronschaeffer said:

I tried Flame again after FileBrowser succeeded. Same error.

I updated my post above, however for FileBrowser the state directory should be:

/database/.tailscale_state

and for flame_cloudfare the state directory should be:

/app/data/.tailscale_state

 

Sadly enough it is not always possible to auto detect the state directory that's why you have to specify it manually.

Linuxserver.io, Binhex and of course my containers should be fully compatible and detect the path always automatically.

 

Hope that helps.

  • Author

Yes, thanks very much. So if not automatically detected, the appropriate directory is (or is likely to be?) whatever the root directory for the container is?

23 minutes ago, ronschaeffer said:

Yes, thanks very much. So if not automatically detected, the appropriate directory is (or is likely to be?) whatever the root directory for the container is?

Exactly, as pointed out above, if the directory in the container is "/data" as in this example:

grafik.png.03abe7612617f1d4a87f11a916de79b3.png

 

Then the Tailscale state directory should be "/data/.tailscale_state":

grafik.png.5a0f12da48cccb5acabf543c3daffcdb.png

  • Author

Thanks! Apologies, I somehow missed your first reply with the screenshots!

 

Much appreciated.

 

  • 8 months later...

I couldnt figure out this solution at all, probably because I am 74 and past my prime! I was setting up Agent DVR to be accessable via Tailscale and I got the same error in my logs. I looked everywhere and I could not find the elusive "Tailscaled.state". Turns out I have Tailscale installed as a Plugin as recommended for Unraid 7.0. And apparently Tailscale is installed on the boot device and that where I found it Boot/config/plugins/Tailscale/state/Tailscaled.state

Now everything is working!

  • 3 weeks later...
On 10/7/2025 at 9:19 AM, Panapat said:

I couldnt figure out this solution at all, probably because I am 74 and past my prime! I was setting up Agent DVR to be accessable via Tailscale and I got the same error in my logs. I looked everywhere and I could not find the elusive "Tailscaled.state". Turns out I have Tailscale installed as a Plugin as recommended for Unraid 7.0. And apparently Tailscale is installed on the boot device and that where I found it Boot/config/plugins/Tailscale/state/Tailscaled.state

Now everything is working!

Hey @Panapat! 74 is not past any sort of prime!

Having just run into this issue myself (paperless-ngx), I saw the thread and @ich777 's answer worked beautifully.

From your answer, I wanted to ensure that you mapped this file correctly, as it implies you mounted to /boot/config/plugins/Tailscale/state/Tailscaled.state

If that's the case, you're telling the docker container to mount its `.tailscaled.state` file to your unRAID's boot drive - this is bad.

You need to mount this state file inside the container it's running in. IE: unlike a traditional volume mount where you point the location back at the host, you need to set the Tailscale State Directory for a location in your container.

See this for further clarification, and no more (self-imposed!?) ageism!

On 1/14/2025 at 3:07 AM, ich777 said:

Exactly, as pointed out above, if the directory in the container is "/data" as in this example:

grafik.png.03abe7612617f1d4a87f11a916de79b3.png

 

Then the Tailscale state directory should be "/data/.tailscale_state":

grafik.png.5a0f12da48cccb5acabf543c3daffcdb.png

  • 2 months later...
On 10/26/2025 at 1:59 AM, omninewb said:

you need to set the Tailscale State Directory for a location in your container.

I installed this docker (docker-obsidian-livesync-couchdb)

ERROR: Couldn't detect persistent Docker directory for .tailscale_state!

Please enable Tailscale Advanced Settings in the Docker template and set the Tailscale State Directory manually!

Not sure how to figure out my Livesync-CouchDB docker container's Tailscale State directory

Docker container data:

image.png

/opt/unraid/tailscale/ <-> /usr/local/share/docker/tailscale_container_hook

the default appdata storage location for my dockers is: /mnt/user/appdata/

but I dont see a obsidian-livesync-couchdb in there

I see: obsidian/ qbittorrent/ syncthing/ youtube-audio/ youtube-subscriptions/ youtube-video/ youtubedl-material/

I can't seem to find where my couchDB is.

I found the docker containers: /var/lib/docker/containers

image.png

I found the appropriate location via this:

image.png

I think the answer is easier:

image.png

in your list of docker containers:

http://192.168.1.xx/Docker

use the volume mapping I have circled in red.

Note: that was show in my first image in the post.

Edited by digitaldoctor

  • 3 months later...
On 1/13/2025 at 9:57 AM, ich777 said:

What containers are you using/trying?

 

You can always specify the state directory manually here by opening the Advanced Settings in the Tailscale settings:grafik.png.4eb2eb3f034846f828fd8340d3416b7a.png

 

This state directory should always reflect the persistent directory inside the container like here "/data":

grafik.png.af68a5fee79ba8613a2123efd2b742e8.png

 

So to speak in this example the state directory should be "/data/.tailscale_state":
grafik.png.e22a0db269d63f5221b4f6e40d91e34e.png

dropping in here to say THANK YOU. My tailscale hook was hanging....came looking to find if I can manually make directory. Thank you!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.