Every config parameter may either be provided from a config.toml file or from
an environment parameter. An example config file is provided
here. The full list of environment parameters is
listed below. Any field listed here that has a Default value is optional.
Toml path: cloudflare.dns.base.
When a node is created a dns entry is created in cloudflare that looks like
{node_name}.{base}. So if the base is yourdomain.xyz, and your node's name is
mynewnode, then the dns entry is an A record pointing mynewnode.yourdomain.xyz
to the IP of the node.
Toml path: cloudflare.dns.ttl
For the DNS record created in the circumstances described above, this is the
ttl.
Toml path: cloudflare.api.zone_id
The cloudflare id of the zone where the DNS record is created.
Toml path: cloudflare.api.token
The cloudflare API access token. This is passed to cloudflare in the
Authorization header with Bearer prefixed to it on each request.
Toml path: database.url
A URL to the postgres database that the backend can use.
Toml path: database.max_conns
Default value: 10
The max number of database connections that the connection pool is allowed to
grow to.
Toml path: database.min_conns
Default value: 2
The minimum number of database connections that the connection pool is allowed to
shrink to.
Toml path: database.max_lifetime
Default value: 1d
The maximum duration for which a database connection should be kept before it is
closed and a new one should be opened.
Toml path: database.idle_timeout
Default value: 2m
If a connection is idle for this duration, and the current number of connections
is greater than min_conns, it is closed.
Toml path: email.sendgrid_api_key
Optional
The API key used for interaction with sendgrid. If this value is omitted, emails
will not be sent and users' email addresses cannot be confirmed. The same
applies to EMAIL_TEMPLATE_DIR.
Toml path: email.template_dir
Optional
The directory containing the renderable templates of the emails that the backend
sends.
Toml path: email.ui_base_url
Default value: example.com
The url at which the frontend of the API is served. This is used for rendering
clickable links in the emails, such as https://{ui_base_url}/register.
Toml path: grpc.request_concurrency_limit
Default value: 32
The max number of concurrent requests we allow per incoming connection.
Toml path: log.environment
The current environment that we are in, either dev, staging or production.
The logging environment in included in every log line.
Toml path: log.filter
Default value: info
The logging filter string. For syntax:
see https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html
Toml path: log.opentelemetry.endpoint
The opentelemetry endpoint to post the logs to.
Toml path: log.opentelemetry.export_interval
Default value: 5s
Denotes how often the service should send its logs to the opentelemetry.
Toml path: mqtt.server_address
On startup the service will connect to an MQTT server, where it is expected to
be allowed to post messages on any topic. The address of the server is stored in
this variable.
Toml path: mqtt.server_port
The port of the aforementioned MQTT server.
Toml path: mqtt.username
The username that the service should use to authenticate itself at the MQTT
server.
Toml path: mqtt.password
The password that the service should use to authenticate itself at the MQTT
server.
Toml path: secret.cloudflare_cert_key
When blockvisor asks for a secret called cloudflare-cert-key, this is the
value that we return.
Toml path: secret.grafana_loki_key
When blockvisor asks for a secret called grafana-loki-key, this is the value
that we return.
Toml path: secret.grafana_prometheus_key
When blockvisor asks for a secret called grafana-prometheus-key, this is the
value that we return.
Toml path: server.ip
Currently unused.
Toml path: server.port
Default: 8080
Currently unused.
Toml path: store.aws_access_key_id
Used to authenticate requests to the S3-like service.
Toml path: store.aws_secret_access_key
Used to authenticate requests to the S3-like service.
Toml path: store.prefix
Currently unused.
Toml path: store.expiration
The amount of time that download and upload urls should be valid for. This is
denoted in a time formatted like 1s, or 2d.
Toml path: store.aws_region
The AWS region that the service is in.
Toml path: store.url
The url to the AWS endpoind that we should talk to. This can be used to swap AWS
for an S3-compatible service.
Toml path: store.bucket.archive
The bucket that we use to store our blockchain archives.
Toml path: store.bucket.bundle
The bucket where we store our blockvisor bundles.
Toml path: stripe.secret
Optional
The stripe private key. If this value is not provided, then the service will
make no attempt to contact stripe, and therefore it will not bill the users
that create apps.
Toml path: stripe.url
Default value: https://api.stripe.com/v1
The url to the stripe service api.
Toml path: token.secret.jwt
The secret used to sign our login JWT's.
Toml path: token.secret.refresh
The secret used to sign our refresh JWT's.
Toml path: token.secret.jwt_fallback
When validating a token with JWT_SECRET fails, then we use this value as a
secret and still accept the token if that makes the validation passes. This
allows us to gracefully migrate to a new JWT_SECRET without logging everybody
out. When everyone refreshes, all tokens will be signed with the new JWT_SECRET,
and this value can be unset.
Toml path: token.secret.refresh_fallback
This value works the same as described above, but for the refresh secret.
Toml path: token.expire.token
Default value: 10m
Toml path: token.expire.refresh_host
Default value: 30d
The expiration time of the refresh tokens that we issue to hosts. If this value
is not set, before it falls back to its default value, it will check whether an
environment parameter called REFRESH_EXPIRATION_HOST_MINS is set, and
interpret that as number of minutes.
Toml path: token.expire.refresh_user
Default value: 20h
The expiration time of the refresh tokens that we issue to users. If this value
is not set, before it falls back to its default value, it will check whether an
environment parameter called REFRESH_EXPIRATION_USER_MINS is set, and
interpret that as number of minutes.
Toml path: token.expire.password_reset
Default value: 5m
The expiration time of the refresh tokens that we put in password reset emails.
If this value is not set, before it falls back to its default value, it will
check whether an environment parameter called PWD_RESET_EXPIRATION_MINS is
set, and interpret that as number of minutes.
Toml path: token.expire.registration_confirmation
Default value: 30m
The expiration time of the refresh tokens that we put in registration / email
confirmation emails. If this value is not set, before it falls back to its
default value, it will check whether an environment parameter called
REGISTRATION_CONFIRMATION_MINS is set, and interpret that as number of
minutes.
Toml path: token.expire.invitation
Default value: 168m
The expiration time of the refresh tokens that we put in organisation invitation
emails. If this value is not set, before it falls back to its default value, it
will check whether an environment parameter called INVITATION_MINS is set, and
interpret that as number of minutes.