Medusa/Configuration

Configuration

What lives in config.json and what lives on the dashboard.

Medusa keeps very little in files. config.json holds what it needs before it can reach the database. Everything else is saved in the database and changed on the dashboard.

config.json

Medusa creates config.json in its folder on the first start, and the setup wizard fills in the database for you.

config.json
{
    "AUTHENTICATION": {
        "SECRET": "generated-on-first-start"
    },
    "DATABASE": {
        "TYPE": "POSTGRES",
        "HOST": "localhost",
        "PORT": "5432",
        "USER": "medusa",
        "PASSWORD": "your-password",
        "DATABASE": "medusa"
    },
    "SERVER": {
        "DASHBOARD": { "PORT": 3000, "URL": null, "DEVELOPER": false },
        "API": { "PORT": 3001, "URL": null, "LOGS": true }
    }
}

AUTHENTICATION

KeyDefaultWhat it does
SECRETRandomSigns dashboard sessions and internal API requests. Generated on the first start. Changing it signs everyone out.

DATABASE

KeyDefaultWhat it does
TYPEPOSTGRESPOSTGRES, MYSQL or MARIADB.
HOSTEmptyDatabase server address.
PORT5432Database port. MySQL and MariaDB usually use 3306.
USEREmptyDatabase user.
PASSWORDEmptyDatabase password.
DATABASEEmptyDatabase name. Medusa creates its own tables.

Medusa installs the right database driver itself the first time it connects.

SERVER

KeyDefaultWhat it does
DASHBOARD.PORT3000Port the dashboard listens on.
DASHBOARD.URLnullPublic dashboard address, such as https://medusa.example.com. Leave null on your own computer.
DASHBOARD.DEVELOPERfalseServes the dashboard through Vite with hot reloading. For development only.
API.PORT3001Port the API listens on.
API.URLnullPublic API address, used for sign-in callbacks, webhooks and the appeal page.
API.LOGStrueKept for older installs. Currently unused.

URL takes a full address or a bare hostname, which is treated as HTTPS. Leave off any path or trailing slash. The URLs and ports can also be changed under Settings > Server URLs.

Older installs had LICENSING, SETUP_USER and Discord app keys in config.json. Medusa moves the license key and Discord app credentials into the database on start, and the dashboard owner now comes from the license. The old keys can be deleted.

Dashboard Settings

Everything else is on the dashboard and applies without a restart.

WhereWhat
SettingsLicense key, bot token, primary and authorized server IDs, Discord app credentials, language, console, updates, appearance, branding, login screen, placeholders, server URLs, API keys and allowed IPs.
BotPresence, profile and additional bots.
ModulesTurn modules on or off.
ConfigsEach module's settings.
CommandsRename, turn off or add text prefixes to commands.
LangChange any message or embed in any language.
LoggingLog channels for each module's events.
PermissionsRanks and what they can use. See Core.

Settings > Configuration Transfer exports all of this to a file and imports it into another Medusa install. Secrets are left out of the export, and channels and roles are matched by name on import.