IP changes when tailscaled container restarts [SOLVED]

Plus the machine name changes as well, adding a numeral at the end. I would like to make this a fixed IP and a fixed machine name. This doesn’t happen on the other machines in my tailnet. Most of those run tailnetd bare metal. One of them runs the Docker Desktop (Win) extension and it stays fixed.

This machine is an Ubuntu 20.04 instance on Linode. I share it with a friend, soI do not want to run tailscaled on bare metal on this machine. Also, I use Portainer to manage my containers, but that shouldn’t matter since I initially loaded it with a standard command line.

Is there an environment variable or something I can use on the docker run command when I spin up the container? I figure it’s something I missed reading the docs.

Thanks in advance.


Are you making sure the state directory is persisted? Otherwise each time the instance starts up (and runs tailscale) it will be added as a new device.
If you’re using Docker containers, then you can use the environment variable TS_STATE_DIR to set the state directory.

Are you making sure the state directory is persisted?

Ooops… I knew there was something I missed. I’ll give that a shot.