Configuration settings
Settings come in two types:
- Core settings are set on the server and require Karrot to be rebooted to take effect
- App settings can be on the server, but also edited using the Instance Settings UI, no reboot required
TIP
All environment variables can also be set from file contents by adding _FILE
on the end.
E.g.
# Set the password to 1234
DATABASE_PASSWORD=1234
# Reads the file contents of /path/to/database_password and then sets DATABASE_PASSWORD
DATABASE_PASSWORD_FILE=/path/to/database_password
Core settings
This documentation is generated by the server, and available in markdown or html format.
mode (optional)
Field | ENV | Default |
---|---|---|
mode | MODE | dev |
base_url (optional)
Field | ENV | Default |
---|---|---|
base_url | BASE_URL SITE_URL | http://localhost:8000 |
secret_key
Field | ENV |
---|---|
secret_key | SECRET_KEY |
Admin Emails (optional)
Email Address of Instance Admins
Field | ENV | Examples |
---|---|---|
admin_emails | ADMIN_EMAILS | admin1@example.com,admin2@example.com |
Instance admins can access the admin interface, e.g. to configure App Settings
Frontend directory (optional)
Directory to serve frontend files from, if you are not using something else to serve them
Field | ENV |
---|---|
frontend_dir | FRONTEND_DIR |
Allowed hosts (optional)
Field | ENV | Default |
---|---|---|
allowed_hosts | ALLOWED_HOSTS | * |
CSRF Trusted Origins (optional)
Field | ENV | Default |
---|---|---|
csrf_trusted_origins | CSRF_TRUSTED_ORIGINS | http://127.0.0.1:8000 |
GeoIP Path (optional)
Field | ENV |
---|---|
geoip_path | GEOIP_PATH |
Listen options
File descriptor (optional)
Field | ENV |
---|---|
listen.fd | LISTEN_FD |
Host (optional)
Field | ENV |
---|---|
listen.host | LISTEN_HOST |
Port (optional)
Field | ENV |
---|---|
listen.port | LISTEN_PORT |
Unix socket (optional)
Field | ENV |
---|---|
listen.socket | LISTEN_SOCKET |
Concurrency (optional)
How many web workers
Field | ENV | Default |
---|---|---|
listen.concurrency | LISTEN_CONCURRENCY WORKER_COUNT | 1 |
request timeout seconds (optional)
Field | ENV | Default |
---|---|---|
listen.request_timeout_seconds | REQUEST_TIMEOUT_SECONDS | 60 |
Database options
Database name
Field | ENV |
---|---|
database.name | DATABASE_NAME |
User
Field | ENV |
---|---|
database.user | DATABASE_USER |
Password
Field | ENV |
---|---|
database.password | DATABASE_PASSWORD |
Host (optional)
Field | ENV | Default |
---|---|---|
database.host | DATABASE_HOST | localhost |
Port (optional)
Field | ENV | Default |
---|---|---|
database.port | DATABASE_PORT | 5432 |
Connection max age (optional)
Field | ENV | Default |
---|---|---|
database.connection_max_age | DATABASE_CONN_MAX_AGE | 0 |
database statement query timeout during requests (optional)
Field | ENV | Default |
---|---|---|
database.request_timeout_seconds | REQUEST_DATABASE_TIMEOUT_SECONDS | 60 |
Redis options
Host (optional)
Field | ENV | Default |
---|---|---|
redis.host | REDIS_HOST | localhost |
Port (optional)
Field | ENV | Default |
---|---|---|
redis.port | REDIS_PORT | 6379 |
Unix socket (optional)
Field | ENV |
---|---|
redis.socket | REDIS_SOCKET |
Database (optional)
Field | ENV | Default |
---|---|---|
redis.db | REDIS_DB | 0 |
Worker options
immediate (optional)
Field | Default |
---|---|
worker.immediate | False |
count (optional)
Field | Default |
---|---|
worker.count | 1 |
Upload options
dir (optional)
Field | ENV | Default |
---|---|---|
uploads.dir | FILE_UPLOAD_DIR | ./uploads/ |
temp_dir (optional)
Field | ENV |
---|---|
uploads.temp_dir | FILE_UPLOAD_TEMP_DIR |
permissions (optional)
Field | ENV |
---|---|
uploads.permissions | FILE_UPLOAD_PERMISSIONS |
directory_permissions (optional)
Field | ENV |
---|---|
uploads.directory_permissions | FILE_UPLOAD_DIRECTORY_PERMISSIONS |
Plugin options
dir (optional)
Field | ENV | Default |
---|---|---|
plugins.dir | PLUGIN_DIR | ./plugins/ |
Sentry options
dsn (optional)
Field | ENV |
---|---|
sentry.dsn | SENTRY_DSN |
environment (optional)
Field | ENV | Default |
---|---|---|
sentry.environment | SENTRY_ENVIRONMENT | production |
client_dsn (optional)
Field | ENV |
---|---|
sentry.client_dsn | SENTRY_CLIENT_DSN |
release (optional)
Field | ENV |
---|---|
sentry.release | SENTRY_RELEASE |
release_use_git_rev (optional)
Field | ENV | Default |
---|---|---|
sentry.release_use_git_rev | SENTRY_RELEASE_USE_GIT_REV | True |
Influxdb options
host
Field | ENV |
---|---|
influx_db.host | INFLUXDB_HOST |
port
Field | ENV |
---|---|
influx_db.port | INFLUXDB_PORT |
user
Field | ENV |
---|---|
influx_db.user | INFLUXDB_USER |
password
Field | ENV |
---|---|
influx_db.password | INFLUXDB_PASSWORD |
database name
Field | ENV |
---|---|
influx_db.database | INFLUXDB_NAME |
timeout (optional)
Field | ENV | Default |
---|---|---|
influx_db.timeout | INFLUXDB_TIMEOUT | 5 |
App settings
This documentation is generated by the server, and available in markdown or html format.
Admin Chat Webhook (optional)
Field | ENV |
---|---|
admin_chat_webhook | ADMIN_CHAT_WEBHOOK |
General
Site Name (optional)
The name of the site, it will show up in the site title, and other places.
Field | ENV | Default |
---|---|---|
general.name | SITE_NAME | Karrot |
Site Logo URL (optional)
URL to an image that will be used as the logo, a PNG with transparent background is recommended
Field | ENV |
---|---|
general.logo | SITE_LOGO |
PNG with transparent background is recommended because there is not good enough support in email clients for other formats, e.g. SVG.
For now, you have to find a way to host the file yourself and provide the URL here. In the future you will be able to upload it here.
Account
Email Verification Time (hours) (optional)
Time until a verification code expires
Field | ENV | Default |
---|---|---|
account.email_verification_time_limit_hours | EMAIL_VERIFICATION_TIME_LIMIT_HOURS | 168 |
Password Reset Time (minutes) (optional)
Time until a password reset link expires
Field | ENV | Default |
---|---|---|
account.password_reset_time_limit_minutes | PASSWORD_RESET_TIME_LIMIT_MINUTES | 180 |
Account Delete Time (minutes) (optional)
Time until an account delete email link expires
Field | ENV | Default |
---|---|---|
account.account_delete_time_limit_minutes | ACCOUNT_DELETE_TIME_LIMIT_MINUTES | 180 |
Email
Configure email settings
Email Backend (optional)
Choose how sending email is handled
Field | ENV | Default |
---|---|---|
email.backend | EMAIL_BACKEND | console |
From Address (optional)
Field | ENV | Default | Examples |
---|---|---|---|
email.from_email | EMAIL_FROM | karrot@example.com | karrot@example.com |
Email Reply Domain (optional)
Domain to which email replies go to
Field | ENV | Examples |
---|---|---|
email.reply_domain | EMAIL_REPLY_DOMAIN | replies.example.com |
Email Reply Trimmer URL (optional)
Service to handle email reply trimming
Field | ENV | Examples |
---|---|---|
email.reply_trimmer_url | EMAIL_REPLY_TRIMMER_URL | http://localhost:4567/trim |
A service to trim the reply section from emails when receiving incoming emails.
See https://github.com/karrot-dev/email_reply_trimmer_service
SMTP
Host
The host to use for sending email
Field | ENV |
---|---|
email.smtp.host | SMTP_HOST |
Port (optional)
Port to use for the SMTP server
Field | ENV | Default |
---|---|---|
email.smtp.port | SMTP_PORT | 25 |
User (optional)
Username to use for the SMTP server
Field | ENV |
---|---|
email.smtp.user | SMTP_USER |
Password (optional)
Password to use for the SMTP server
Field | ENV |
---|---|
email.smtp.password | SMTP_PASSWORD |
Use TLS (optional)
Use explicit TLS connection, generally on port 587
Field | ENV | Default |
---|---|---|
email.smtp.use_tls | SMTP_USE_TLS | False |
Use SSL (optional)
Use implicit TLS, generally on port 465
Field | ENV | Default |
---|---|---|
email.smtp.use_ssl | SMTP_USE_SSL | False |
SSL Keyfile (optional)
Path to a PEM-formatted private key file
Field | ENV |
---|---|
email.smtp.ssl_keyfile | SMTP_SSL_KEYFILE |
SSL Certfile (optional)
Path to a PEM-formatted certificate chain file
Field | ENV |
---|---|
email.smtp.ssl_certfile | SMTP_SSL_CERTFILE |
Postal
Configure settings to send email via a postal server
Postal is a self hostable email server.
You can find out more at https://postalserver.io/
Postal API URL (optional)
Field | ENV |
---|---|
email.postal.api_url | POSTAL_API_URL |
Postal API Key (optional)
Field | ENV |
---|---|
email.postal.api_key | POSTAL_API_KEY |
Postal Webhook Key (optional)
Used for Postal to call back to Karrot
Field | ENV |
---|---|
email.postal.webhook_key | POSTAL_WEBHOOK_KEY |
Webhooks allow Postal to make requests to Karrot. The webhook key is what ensures that happens securely.
The webhooks have two purposes:
- receiving tracking events
- receiving incoming email
You might configure this even if you are not using Postal for sending email as you can still use Postal for handling incoming email in that scenario.
Meet
Options for video calling
Video calling is powered by LiveKit.
This can be self-hosted, or you can use their hosted option.
LiveKit Endpoint (optional)
Field | ENV |
---|---|
meet.livekit_endpoint | MEET_LIVEKIT_ENDPOINT |
LiveKit API Key (optional)
Field | ENV |
---|---|
meet.livekit_api_key | MEET_LIVEKIT_API_KEY |
LiveKit API Secret (optional)
Field | ENV |
---|---|
meet.livekit_api_secret | MEET_LIVEKIT_API_SECRET |
Use LiveKit room prefix (optional)
If enabled prefixes room names with the base URL,allowing multiple deployments to use the same instance
Field | ENV | Default |
---|---|---|
meet.use_livekit_room_prefix | MEET_USE_LIVEKIT_ROOM_PREFIX | False |
Web Push
Settings for web push notifications
VAPID Public Key
Field | ENV |
---|---|
web_push.vapid_public_key | VAPID_PUBLIC_KEY |
VAPID Private Key
Field | ENV |
---|---|
web_push.vapid_private_key | VAPID_PRIVATE_KEY |
VAPID Admin Email
Field | ENV | Examples |
---|---|---|
web_push.vapid_admin_email | VAPID_ADMIN_EMAIL | admin@example.com |
Discourse
URL
Field | ENV | Examples |
---|---|---|
discourse.url | PROXY_DISCOURSE_URL | https://community.karrot.world https://forum.example.com |
Banner Topic ID (optional)
Topic to use for the banner inside Karrot
Field | ENV | Examples |
---|---|---|
discourse.banner_topic_id | FORUM_BANNER_TOPIC_ID | 930 |
Discussions Feed (optional)
Feed to use for the discussions section
Field | ENV | Examples |
---|---|---|
discourse.discussions_feed | FORUM_DISCUSSIONS_FEED | latest.json |
Upload
Max Upload Size (optional)
Maximum size allowed for image or attachment uploads
Field | ENV | Default | Examples |
---|---|---|---|
uploads.max_size | FILE_UPLOAD_MAX_SIZE | 10m | 500k 20m 1g |
Use Accel Redirect (optional)
Allows nginx to serve files that were uploaded by users, you must also configure this in nginx
Field | ENV | Default |
---|---|---|
uploads.use_accel_redirect | FILE_UPLOAD_USE_ACCEL_REDIRECT | False |
Issues
voting_duration_days (optional)
Field | ENV | Default |
---|---|---|
issues.voting_duration_days | VOTING_DURATION_DAYS | 7 |
voting_due_soon_hours (optional)
Field | ENV | Default |
---|---|---|
issues.voting_due_soon_hours | VOTING_DUE_SOON_HOURS | 12 |
max_sanction_days (optional)
Field | ENV | Default |
---|---|---|
issues.max_sanction_days | MAX_SANCTION_DAYS | 365 |
Conversations
message_edit_days (optional)
Field | ENV | Default |
---|---|---|
conversations.message_edit_days | MESSAGE_EDIT_DAYS | 2 |
conversation_closed_days (optional)
Field | ENV | Default |
---|---|---|
conversations.conversation_closed_days | CONVERSATION_CLOSED_DAYS | 7 |
Groups
Trust
group_editor_trust_max_threshold (optional)
Maximum trust needed to get editor role
Field | ENV | Default |
---|---|---|
groups.trust.group_editor_trust_max_threshold | GROUP_EDITOR_TRUST_MAX_THRESHOLD | 3 |
The amount of trust needed to get editor role changes depending on how many people are in the group, as the group gets bigger, more trust is needed. This is the maximum amount of trust that will ever be needed.
Group Inactivity
For managing inactive groups
days_until_group_inactive (optional)
Field | ENV | Default |
---|---|---|
groups.inactivity.days_until_group_inactive | NUMBER_OF_DAYS_UNTIL_GROUP_INACTIVE | 14 |
Membership Inactivity
For managing inactive users in groups
days_until_inactive_in_group (optional)
For marking users inactive
Field | ENV | Default |
---|---|---|
groups.membership_inactivity.days_until_inactive_in_group | NUMBER_OF_DAYS_UNTIL_INACTIVE_IN_GROUP | 30 |
inactive_months_until_removal_notification (optional)
For sending users an email telling them they will be removed from a group
Field | ENV | Default |
---|---|---|
groups.membership_inactivity.inactive_months_until_removal_notification | NUMBER_OF_INACTIVE_MONTHS_UNTIL_REMOVAL_FROM_GROUP_NOTIFICATION | 6 |
days_after_removal_notification_we_actually_remove_them (optional)
For actually removing them, after they have been notified
Field | ENV | Default |
---|---|---|
groups.membership_inactivity.days_after_removal_notification_we_actually_remove_them | NUMBER_OF_DAYS_AFTER_REMOVAL_NOTIFICATION_WE_ACTUALLY_REMOVE_THEM | 7 |
Places
Max Weeks in Advance (optional)
Max allowable value for how many weeks in advance activities are created for a series
Field | ENV | Default |
---|---|---|
places.store_max_weeks_in_advance | PLACE_MAX_WEEKS_IN_ADVANCE STORE_MAX_WEEKS_IN_ADVANCE | 52 |
This is still dependent on setting it for a specific place, which can use a lower value, but not higher
Activities
Feedback Period (days) (optional)
Time period after an activity that feedback can be submitted
Field | ENV | Default |
---|---|---|
activities.feedback_possible_days | FEEDBACK_POSSIBLE_DAYS | 30 |
Activity Due Soon Notification (hours) (optional)
Time before activity is due that an upcoming activities notification will be issued
Field | ENV | Default |
---|---|---|
activities.activity_due_soon_hours | ACTIVITY_DUE_SOON_HOURS | 6 |
Activity Reminder (hours) (optional)
Time before activity is due that a push notification will be sent
Field | ENV | Default |
---|---|---|
activities.activity_reminder_hours | ACTIVITY_REMINDER_HOURS | 3 |
Activity Left Late (hours) (optional)
Time before activity is due to start that it is considered too late
Field | ENV | Default |
---|---|---|
activities.activity_leave_late_hours | ACTIVITY_LEAVE_LATE_HOURS | 24 |
This will be considered when viewing the activity statistics