Skip to content

Environment Variables

Ditto uses the following environment variables to configure its behavior:

  • DITTO_NSEC - Ditto secret key for internal use. Site configuration, NIP-05 grants, moderation events, and more are signed with this key.

  • PORT - Port for the HTTP server to listen on. Defaults to 4036.

  • LOCAL_DOMAIN - Domain name for the Ditto server, ex https://example.com. Defaults to http://localhost:4036.

  • DATABASE_URL - URL for the Postgres or SQLite database. Defaults to sqlite://ditto.db.

PG_POOL_SIZE- Number of connections to the Postgres database. Defaults to10`.

  • FIREHOSE_ENABLED - Whether to connect to continuously stream data from other relays. Defaults to true.

  • DITTO_POLICY - Policy plugin import. See Policies for more information.