Configuration
A complete reference for config.json settings, database connection parameters, and environment options.
Medusa separates its configuration into two tiers:
- Core Settings (
config.json): Environment-level credentials, ports, and database credentials required to boot the application. - Dynamic Settings (Database): Module parameters, permissions, embeds, and server options managed dynamically through the web dashboard without restarts.
config.json Reference
Below is the complete schema for config.json:
{
"LICENSING": {
"AGREE_TO_LICENSE.MD": true,
"LICENSE_KEY": "0O8OT-R2WRQ-MYHO8-69MZC"
},
"AUTHENTICATION": {
"DISCORD_CLIENT_ID": "1530443442247958639",
"DISCORD_CLIENT_SECRET": "your_discord_client_secret",
"SECRET": "066fc7bd45364581b78eaaee22c71cc16936d8db3f1d7bddd134d09223f93830"
},
"SETUP_USER": "764868946523324457",
"DATABASE": {
"TYPE": "POSTGRES",
"HOST": "localhost",
"PORT": "5432",
"USER": "admin",
"PASSWORD": "your_database_password",
"DATABASE": "Medusa"
},
"SERVER": {
"DASHBOARD": {
"PORT": 3000,
"URL": null,
"DEVELOPER": false
},
"API": {
"PORT": 3001,
"URL": null,
"LOGS": true
}
}
}LICENSING
| Key | Type | Description |
|---|---|---|
AGREE_TO_LICENSE.MD | boolean | Must be explicitly set to true to acknowledge and accept the software license. |
LICENSE_KEY | string | The official Medusa product key received from Zero Development upon purchase. |
AUTHENTICATION
| Key | Type | Description |
|---|---|---|
DISCORD_CLIENT_ID | string | The Application Client ID from the Discord Developer Portal. |
DISCORD_CLIENT_SECRET | string | The Application Client Secret used for OAuth2 user authentication. |
SECRET | string | A unique 32-byte hexadecimal string used for encrypting dashboard session cookies and signing internal API requests. |
To generate a secure 32-byte secret in your terminal, run:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"SETUP_USER
| Key | Type | Description |
|---|---|---|
SETUP_USER | string | The numeric Discord User ID of the primary owner. When this user logs into the dashboard, they are automatically recognized as the root administrator. |
DATABASE
Medusa uses PostgreSQL managed through Sequelize:
| Key | Type | Description |
|---|---|---|
TYPE | string | Database dialect. Set to "POSTGRES". |
HOST | string | Hostname or IP address of your PostgreSQL instance (e.g. localhost or remote server IP). |
PORT | string | number | Port for your database instance (default 5432). |
USER | string | Database user account with read and write permissions. |
PASSWORD | string | Password for the database user. |
DATABASE | string | Target database name where Medusa creates its tables. |
SERVER
Medusa hosts two HTTP services concurrently: the Web Dashboard and the Internal REST API.
DASHBOARD
| Key | Type | Description |
|---|---|---|
PORT | number | Port on which the Next.js web dashboard listens (default 3000). |
URL | string | null | The public domain or subdomain (e.g. "dashboard.yourdomain.com"). If set to null, defaults to http://localhost:PORT. |
DEVELOPER | boolean | Enables developer diagnostics and unminified frontend source maps when set to true. |
API
| Key | Type | Description |
|---|---|---|
PORT | number | Port on which the internal Express REST API listens (default 3001). |
URL | string | null | Public domain for the API if exposed externally behind a reverse proxy. |
LOGS | boolean | Logs every incoming API request and method scope to the console. |
Environment Variables
You can optionally control logging and behavior via environment variables:
| Variable | Values | Description |
|---|---|---|
DISABLE_API_LOGS | "true" | "false" | Completely silences API request logs in the console. |
API_LOGS | "true" | "false" | Controls whether HTTP requests to the internal API print to stdout. |

