At least 32 characters. Encrypts the CA key and device secrets at rest and signs console sessions. Back it up: without it the stored CA cannot be decrypted and every device must re-enroll. Generate with openssl rand -hex 32.
External base URL devices use. Must be HTTPS in production.
VS_LISTEN_ADDR
:8080
Listen address.
VS_ORG_NAME
VaanarSena
Shown in profiles, certificates and the console.
VS_TLS_CERT_FILE / VS_TLS_KEY_FILE
Serve TLS in-process. The server then requests (but does not require) client certificates issued by its CA.
VS_CLIENT_CERT_HEADER
Behind a TLS-terminating proxy, the header carrying the URL-encoded PEM client certificate (for example ssl-client-cert with ingress-nginx). Only set this if the proxy overwrites the header on every request.
VS_TRUST_PROXY
false
Honour X-Forwarded-For for audit IPs and login rate limiting.
VS_SESSION_TTL
12h
Console session lifetime.
VS_LOG_LEVEL
info
debug, info, warn or error. Logs are JSON on stdout.
Comma-separated groups that grant each role. When any is set, groups decide the role at every sign-in and accounts are created on first sign-in.
VS_OIDC_ALLOWED_DOMAINS
Comma-separated email domains allowed to use SSO.
VS_PASSWORD_LOGIN
true
false turns off console sign-in with a password, except for the accounts in VS_PASSWORD_LOGIN_ALLOW. API tokens keep working. The server refuses to start if this would leave no way to sign in.
VS_PASSWORD_LOGIN_ALLOW
Comma-separated break-glass emails that may still sign in with a password when VS_PASSWORD_LOGIN=false, for when the identity provider is unavailable.
VS_OIDC_TRUST_UNVERIFIED_EMAIL
false
Link and create accounts from emails the provider does not mark email_verified: true. Only for providers that never send the claim and do not let users choose their address. See sso.md.
The redirect URI to register with the provider is
<VS_PUBLIC_URL>/api/v1/auth/oidc/callback.
vaanarsena serve run the server (applies migrations first)
vaanarsena migrate apply migrations and exit
vaanarsena create-admin -email E create an admin (password from VS_ADMIN_PASSWORD or stdin)
vaanarsena version