Docs

Configuration

A complete reference for config.json settings, database connection parameters, and environment options.

Medusa separates its configuration into two tiers:

  1. Core Settings (config.json): Environment-level credentials, ports, and database credentials required to boot the application.
  2. 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:

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

KeyTypeDescription
AGREE_TO_LICENSE.MDbooleanMust be explicitly set to true to acknowledge and accept the software license.
LICENSE_KEYstringThe official Medusa product key received from Zero Development upon purchase.

AUTHENTICATION

KeyTypeDescription
DISCORD_CLIENT_IDstringThe Application Client ID from the Discord Developer Portal.
DISCORD_CLIENT_SECRETstringThe Application Client Secret used for OAuth2 user authentication.
SECRETstringA 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

KeyTypeDescription
SETUP_USERstringThe 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:

KeyTypeDescription
TYPEstringDatabase dialect. Set to "POSTGRES".
HOSTstringHostname or IP address of your PostgreSQL instance (e.g. localhost or remote server IP).
PORTstring | numberPort for your database instance (default 5432).
USERstringDatabase user account with read and write permissions.
PASSWORDstringPassword for the database user.
DATABASEstringTarget database name where Medusa creates its tables.

SERVER

Medusa hosts two HTTP services concurrently: the Web Dashboard and the Internal REST API.

DASHBOARD

KeyTypeDescription
PORTnumberPort on which the Next.js web dashboard listens (default 3000).
URLstring | nullThe public domain or subdomain (e.g. "dashboard.yourdomain.com"). If set to null, defaults to http://localhost:PORT.
DEVELOPERbooleanEnables developer diagnostics and unminified frontend source maps when set to true.

API

KeyTypeDescription
PORTnumberPort on which the internal Express REST API listens (default 3001).
URLstring | nullPublic domain for the API if exposed externally behind a reverse proxy.
LOGSbooleanLogs every incoming API request and method scope to the console.

Environment Variables

You can optionally control logging and behavior via environment variables:

VariableValuesDescription
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.

On this page