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

Usage

comentario [OPTIONS]

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_URLhttps://docs.comentario.app
--tos-url=VALUEURL of the Terms of Service page$TOS_URL<base docs URL>/en/legal/tos/
--privacy-policy-url=VALUEURL of the Privacy Policy page$PRIVACY_POLICY_URL<base docs URL>/en/legal/privacy/
--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
--disable-xsrfDisable XSRF protection (for development purposes only)
--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 full$LOG_FULL_IPS
--home-content-url=VALUEURL of a HTML page to display on homepage$HOME_CONTENT_URL
--gitlab-url=VALUECustom GitLab URL for authentication$GITLAB_URL
--no-live-updateDisable live updates via WebSockets$NO_LIVE_UPDATE
--ws-max-clients=VALUEMaximum number of WebSocket clients$WS_MAX_CLIENTS10000
--e2eStart server in end-to-end testing mode

Documentation

Comentario provides numerous links to various docpages in its frontend and the embedded part. The base URL of the documentation site points to Comentario production documentation by default.

Comentario provides users with links to the Terms of Service and the Privacy Policy pages; apart from being required by law in most cases, these pages are often mandatory when configuring federated authentication via an external service.

By default, these point to the Terms of Service and the Privacy Policy on the documentation website, respectively.

If you apply your own policies, you should reconfigure Comentario using the --tos-url and --privacy-policy-url parameters listed above. These pages have to be hosted elsewhere as Comentario provides no means for storing them at the moment.