Server configuration

Configure the runtime around the application.

Set database connectivity, network behavior, storage sites, certificates, caches, limits, and optional services for the environment where Daptin runs.

Set startup configuration

Startup flags establish the database, listeners, local asset path, runtime logging, and cluster discovery before Daptin can read application configuration from its database. Run ./daptin -help on the installed release before copying flags from another version.

FlagDefaultPurposeVerify
-port:6336HTTP listen address or port.curl --fail http://HOST:PORT/ping
-https_port:6443HTTPS listener used when enabled certificates are available.Inspect the certificate with openssl s_client.
-db_typesqlite3sqlite3, mysql, or postgres.Restart and inspect startup errors plus /statistics.
-db_connection_stringdaptin.dbDriver-specific file or server connection string.Create a disposable record and verify it survives restart.
-local_storage_path./storageLocal path for asset-column bytes; ; disables it.Upload and retrieve a disposable file.
-dashboarddaptinwebPath to the dashboard distribution.Load the dashboard root.
-runtimereleaseGin runtime mode: profile, debug, test, or release.Inspect startup logs.
-log_levelinfodebug, trace, info, warn, error, or fatal logging.Trigger a known request and inspect output.

-port_variable names the environment variable used to override the port and defaults to DAPTIN_PORT. -database_url_variable similarly names the database connection-string variable and defaults to DAPTIN_DB_CONNECTION_STRING. Treat command-line and environment values as deployment inputs; do not commit database passwords or provider secrets to this website or an image.

Choose and verify the database

# SQLite
./daptin -db_type=sqlite3 -db_connection_string=/var/lib/daptin/daptin.db

# MySQL
./daptin -db_type=mysql \
  -db_connection_string='user:password@tcp(db.example:3306)/daptin'

# PostgreSQL
./daptin -db_type=postgres \
  -db_connection_string='host=db.example port=5432 user=daptin password=secret dbname=daptin sslmode=require'

The database selection is not complete until Daptin starts without connection errors, a record can be written and read, and the same record remains after restart. See Database setup for persistence, TLS, pooling, and backup decisions.

Bound shared resources

Runtime configuration stored in Daptin includes connection and request-rate limits. Database code also sets maximum open and idle connections plus connection and idle lifetimes. A value is safe only when it fits the database capacity and the number of Daptin instances. Watch wait/saturation behavior under representative load instead of copying a universal pool size.

A live process is not a ready application. /ping shows that HTTP is alive. Use released health/statistics behavior, a database write/read check, and tests for every enabled protocol or provider before routing traffic.

Enable optional services

Sites, FTP/FTPS, SMTP/IMAP, cloud stores, integrations, AI providers, realtime delivery, and clustering each add credentials, ports, storage, or failure behavior. Configure only the services the application uses and verify them through their focused guides: Sites, Protocols, Mail, Cloud storage, Integrations, and Clustering.

Change configuration safely

  1. Record the current value and a rollback command.
  2. Apply the change to one disposable or non-production instance.
  3. Restart or reconfigure when the setting requires it.
  4. Verify liveness, database access, the changed service, and an expected denial/failure path.
  5. Roll out gradually and watch logs, statistics, pool pressure, and client errors.

Configuration areas

Database

Select the driver and connection details, then bound the connection pool.

Network

Set listening addresses, public URLs, request limits, timeouts, and traffic controls.

Storage

Configure local or rclone-backed sites for assets and published content.

Services

Enable only the protocols and integrations the application intends to expose.

Move from configuration to production.