Skip to main content

Configuration

Donetick uses a YAML-based configuration system managed through environment variables and a config.yaml file. Below is a breakdown of the available configuration options.

Configuration via Environment Variables:​

  • Environment variables can be used to override configuration values.
  • Environment variables should be prefixed with DT_ followed by the configuration key in uppercase.
  • For example, to override the server.port configuration, set the environment variable DT_SERVER_PORT. or oauth2.client_id to DT_OAUTH2_CLIENT_ID

General Configuration​

KeyTypeDescription
namestringThe name of the Donetick instance.
is_done_tick_dot_comboolSpecifies if this is the official Donetick instance.
is_user_creation_disabledboolIf true, disables new user registration.

Authentication​

JWT Configuration​

KeyTypeDescription
jwt.secretstringSecret key for JWT authentication.
jwt.session_timedurationDuration of a session before expiration.
jwt.max_refreshdurationMaximum duration a session can be refreshed.

Database Configuration​

KeyTypeDescription
database.typestringDatabase type (sqlite, postgres, etc.).
database.hoststringDatabase host address.
database.portintDatabase port.
database.userstringDatabase username.
database.passwordstringDatabase password.
database.namestringDatabase name.
database.migrationboolIf true, enables automatic migrations.
database.loggerintLog level for the database.

Server Configuration​

KeyTypeDescription
server.portintServer port.
server.rate_perioddurationTime window for rate limiting.
server.rate_limitintMaximum number of requests per rate period.
server.read_timeoutdurationRead timeout duration.
server.write_timeoutdurationWrite timeout duration.
server.cors_allow_originsarrayList of allowed CORS origins.
server.serve_frontendboolIf true, serves frontend assets.

Notification Configuration​

Telegram​

KeyTypeDescription
telegram.tokenstringTelegram bot token.

Pushover​

KeyTypeDescription
pushover.tokenstringPushover API token.

Scheduler Jobs​

KeyTypeDescription
scheduler_jobs.due_jobdurationFrequency for running due task jobs.
scheduler_jobs.overdue_jobdurationFrequency for running overdue task jobs.
scheduler_jobs.pre_due_jobdurationFrequency for running pre-due task jobs.

Stripe Configuration​

KeyTypeDescription
stripe.api_keystringStripe API key.
stripe.whitelisted_ipsarrayList of allowed IPs for Stripe.
stripe.pricesarrayStripe price configurations.
stripe.success_urlstringURL to redirect after a successful payment.
stripe.cancel_urlstringURL to redirect after a canceled payment.

Email Configuration​

KeyTypeDescription
email.emailstringEmail sender address.
email.keystringAPI key for email sending.
email.hoststringSMTP host.
email.portintSMTP port.
email.appHoststringApplication host for email-related links.

OAuth2 Configuration​

KeyTypeDescription
oauth2.client_idstringOAuth2 client ID.
oauth2.client_secretstringOAuth2 client secret.
oauth2.redirect_urlstringOAuth2 redirect URL.
oauth2.scopesarrayList of OAuth2 scopes.
oauth2.auth_urlstringAuthorization URL.
oauth2.token_urlstringToken endpoint URL.
oauth2.user_info_urlstringUser info endpoint URL.
oauth2.namestringOAuth2 provider name.

Webhook Configuration​

KeyTypeDescription
webhook.timeoutdurationTimeout for webhook requests.
webhook.queue_sizeintSize of the webhook processing queue.

Environment Variables​

In addition to the configuration file, Donetick can be configured using environment variables:

Environment VariableDescription
DONETICK_TELEGRAM_TOKENOverrides the Telegram bot token.
DONETICK_PUSHOVER_TOKENOverrides the Pushover token.
DONETICK_DISABLE_SIGNUPIf true, disables user signups.
DT_ENVDefines the configuration environment (local, prod, selfhosted).

Loading Configuration​

Donetick loads its configuration based on the DT_ENV environment variable:

  • local: Uses local.yaml mainly for local development
  • selfhosted: Uses selfhosted.yaml for self-hosted instances and homeassistant addons as well
  • Default: Falls back to local.yaml

The configuration is then processed by viper, with environment variable overrides applied.


This document provides a high-level overview of Donetick's configuration. For specific setup instructions, refer to the installation guide.