headscale-ui icon indicating copy to clipboard operation
headscale-ui copied to clipboard

Persist API KEY in Settings after stop / start of Docker container

Open dacrudg opened this issue 1 year ago • 2 comments

Is there anyway to persist the APIKEY once I've added it to settings? Every time I stop and start the headscaleUI container I have to re-add it again.

It would even be great if we could add it in as an environment variable to the container.

Thanks

dacrudg avatar Dec 06 '24 18:12 dacrudg

There should not be any reason why stopping and starting the container would affect the api key persisting. It is saved to the browser, not the server.

If you are instead saying that moving between multiple browsers do not persist the key, that is a known limitation of using a client-side UI instead of a server-side one. It cannot be fixed without a far more complex and potentially less secure rearchitecture of the UI.

routerino avatar Dec 23 '24 05:12 routerino

Sorry, I wasn't that clear. What I'm trying to do is start headscale-ui up already pre-configured with the api key from headscale in an environment variable or configuration file some where.

Right now I have to start headscale-ui then go to the webui and enter it in manually.

Is there a way to do this?

dacrudg avatar Mar 05 '25 19:03 dacrudg