This documentation site is about the unstable (upcoming) Comentario version.

Switch to the stable version »

Static configuration

Comentario command-line and environment configuration

The static, or start-up, configuration of Comentario server can be set using command-line options or environment variables. Both methods are equivalent, with command-line options taking precedence.

Command-line help

Some command-line options have an equivalent setting in the form of an environment variable. You can get a complete list of supported options and variables by running:

./comentario -h


comentario [OPTIONS]


Below is a list of available command-line options, with their environment equivalents.

OptionDescriptionEnvironment variableDefault value
-h, --helpShow help message (option summary) and exit
--cleanup-timeout=VALUEGrace period for which to wait before killing idle connections10s
--graceful-timeout=VALUEGrace period for which to wait before shutting down the server15s
--max-header-size=VALUEMaximum number of bytes to read for request header (not request body)1MiB
--socket-path=VALUEThe unix socket to listen on/var/run/comentario.sock
--host=VALUEThe IP to listen on$HOSTlocalhost
--port=VALUEThe port to listen on$PORTRandom port number
--listen-limit=VALUELimits the number of outstanding requests
--keep-alive=VALUESets the TCP keep-alive timeouts on accepted connections3m
--read-timeout=VALUEMaximum duration before timing out read of the request30s
--write-timeout=VALUEMaximum duration before timing out write of the response60s
-v, --verboseVerbose logging (use -vv for debug logging)
--base-url=VALUEServer’s own base URL$BASE_URLhttp://localhost:8080
--base-docs-url=VALUEBase documentation URL$BASE_DOCS_URL
--cdn-url=VALUEStatic file CDN URL$CDN_URLThe base URL
--email-from=VALUE‘From’ address in sent emails$EMAIL_FROMnoreply@localhost
--db-idle-conns=VALUEMax. number of idle DB connections$DB_MAX_IDLE_CONNS50
--enable-swagger-uiEnable Swagger UI at /api/docs
--static-path=VALUEPath to static files$STATIC_PATH.
--db-migration-path=VALUEPath to DB migration files$DB_MIGRATION_PATH.
--db-debugEnable database debug logging
--template-path=VALUEPath to template files$TEMPLATE_PATH.
--secrets=VALUEPath to YAML file with secrets$SECRETS_FILEsecrets.yaml
--superuser=VALUEUUID or email of a user to become a superuser$SUPERUSER
--log-full-ipsLog IP addresses in fullLOG_FULL_IPS
--home-content-url=VALUEURL of a HTML page to display on homepageHOME_CONTENT_URL
--gitlab-url=VALUECustom GitLab URL for authentication$GITLAB_URL
--e2eStart server in end-to-end testing mode