Configuration
Ding is configured through environment variables on the server side and data attributes on the widget side.
Server configuration
Set these in your .env file or in the environment where Ding runs.
Required
| Variable | Description |
|---|---|
DING_ADMIN_USERNAME |
Admin dashboard login username |
DING_ADMIN_PASSWORD_HASH |
Bcrypt hash of the admin password |
DING_JWT_SECRET |
Secret used to sign admin session cookies |
DING_IP_SALT |
Salt used before hashing IP addresses |
Optional
| Variable | Default | Description |
|---|---|---|
DING_DB_PATH |
./data/ding.db |
Path to the SQLite database file |
DING_TRUST_PROXY |
not set | Set to true when Ding is behind a reverse proxy |
PORT |
3000 |
HTTP server port |
NODE_ENV |
not set | Use production in production |
Production notes
- Run
npm run setup; it asks for the public HTTPS URL and generates the required production values - Ding refuses weak development secrets for
DING_JWT_SECRETandDING_IP_SALTin production - Keep
DING_TRUST_PROXY=falseunless Ding’s immediate proxy hop is trusted; use the narrowest supported setting when enabling it - Use
NODE_ENV=productionto enable secure cookie flags and production behaviour - Production configuration belongs in the generated
.env; do not invent or copy production secrets by hand - SQLite is embedded in Ding. With Docker Compose, its data is persisted in the named
ding-datavolume and there is no database container to configure
Widget configuration
The widget is configured through HTML data- attributes on the script tag.
| Attribute | Default | Description |
|---|---|---|
data-position |
bottom-right |
Widget position on screen |
data-color |
#6366f1 |
Accent colour for the widget UI |
data-trigger |
bell |
One of bell, banner, or both |
data-position
Controls where the widget appears on the page:
bottom-rightbottom-lefttop-righttop-left
data-color
Any valid 6-digit hex colour, for example:
#6366f1 (indigo)
#155eef (blue)
#dc2626 (red)
#059669 (green)
data-trigger
bell— A bell icon in the corner that opens a panelbanner— A top banner showing the latest announcementboth— Both bell and banner
Production checklist
- HTTPS is configured at the reverse proxy level
NODE_ENV=productionis set- Secrets were generated with
npm run setup, not copied from.env.example - The database is backed up regularly
- The widget embed URL points to the production server, not localhost
- The persistent
ding-datavolume is included in a tested backup routine