At the moment there isn’t an official way to bootstrap the owner account via environment variables, API, or CLI. The first user (owner) is normally created through the initial setup screen in the UI. User management | n8n Docs
That said, a common workaround is to pre-seed the database with a user. The onboarding flow only appears when the user table is empty, so if a user already exists, n8n skips the setup screen. Two approaches I’ve seen used: Run n8n once, create the owner account, then reuse that postgres database snapshot for future deployments; or Some teams insert the user record directly in the database as part of their infrastructure provisioning step.
Hii @1000p Welcome!
You can try that using the n8n’s official public API, POST /users endpoint to create users or you can try using the command n8n user-management:reset , although currently there is no direct ENV variable i can think of which can fully pre configure the account.
I used that with a k8s job that spins an init container watching if the main n8n deployment is ready, then another container which makes the post request. This pretty much automated what I needed for now.