Skip to main content

Config

You can configure the server either through environment variables or a Vulpo.toml file.

Environment Variables

VariableTypeDefault ValueRequired
VULPO_SECRETS_PASSPHRASEstring-Yes
VULPO_DB_PORTu165432No
VULPO_DB_USERNAMEstringpostgresNo
VULPO_DB_PASSWORDstringpostgresNo
VULPO_DB_LOG_LEVELOff | Error | Warn | Info | Debug | Trace-Yes
VULPO_DB_HOSTstringlocalhostNo
VULPO_DB_DATABASE_NAMEstringauthNo
VULPO_RUN_MIGRATIONS1booleanfalseNo
VULPO_MAIL_LOCALHOST2booleanfalseNo

Additionaly Vulpo Auth is using Rocket for the web framework and thus environment variables with the VULPO_SERVER_ prefix will use the same configuration options as Rocket. You have to replace the ROCKET_ prefix with the VULPO_SERVER_ prefix. https://rocket.rs/v0.5-rc/guide/configuration/#environment-variables

Vulpo.toml

By default, the server will look for a Vulpo.toml file in the current directory. Alternatively you can also pass a --config flag pointing to a toml file.

vulpo_auth server --config "vulpo/config/path/Vulpo.toml"

Example Vulpo.toml

[server]
address = "127.0.0.1"
port = 8000
workers = 16
keep_alive = 5
ident = "Rocket"
log_level = "normal"
cli_colors = true

[secrets]
## NOTE: Generate your own secure key!
passphrase = "password"

[database]
host = "localhost"
database_name = "auth"
username = "postgres"
password = "postgres"
port = 5432
log_level = "Off"

Footnotes

1 Will run migrations on start up when the variable is present
2 When Email host is equal to localhost, an insecure SMTP connection will be used, you can use this variable to overwrite the local email host