jhuber
jhuber•2mo ago

Automated Instance Setup

Hi, is there a way to fully automate the setup of a windmill instance without any manual interaction? I got so far as to deploy a selfhosted docker stack with windmill, postgres and caddy. I can manually click through the initial setup wizard to enter the license key and it all works after that, so far so good. I would now like to skip/pre-seed the initial setup wizard or at least add the licence key and setup a secure admin account. I'm sorry if I overlooked something obvious in the docs but I'm kinda lost on this as this is all quite new for me, any input is appreciated!
5 Replies
fjørdlek
fjørdlek•2mo ago
👋 You can set those up using environment variables: https://github.com/windmill-labs/windmill?tab=readme-ov-file#environment-variables Specifically: - SUPERADMIN_SECRET - LICENSE_KEY
jhuber
jhuberOP•2mo ago
Oh well, I guess I overlooked something in the docs. Sorry. How do I use the SUPERADMIN_SECRET though? I added it to my docker setup, reset everything and started a clean instance with a new database. I would have assumed that the initial login is now admin@windmill.dev and the value of that variable or that the initial setup wizard is skipped. However I'm still getting the initial setup dialog and have to login using the default credentials?
fjørdlek
fjørdlek•2mo ago
A token that would let the caller act as a virtual superadmin superadmin@windmill.dev
You can use it as a bearer token to setup initial admin accounts programmatically via the rest apis: https://app.windmill.dev/openapi.html#tag/user/post/users/create
jhuber
jhuberOP•2mo ago
Amazing, thanks! I can now script the creation of a new user and removal of the admin@windmill.dev user. Thank you very much, I think my issue is resolved. Can I mark this as closed or answered or something?
fjørdlek
fjørdlek•2mo ago
All good! No need to mark anything here 🙂

Did you find this page helpful?