Kora/Configuration

Configuration

What lives in config.json, the environment variables Kora reads and where everything else is set.

Kora keeps only what it needs to start in config.json. Everything else is stored in your database and changed from the dashboard.

WhereWhat
config.jsonSign-in secret, database connection, ports and public URLs.
Settings pageLanguage, appearance, sign-in, updates and the client dashboard.
Configs pageSettings for each module.

The setup wizard fills in config.json for you. You only need to edit it to move to a new database or change a port.

config.json

Kora creates this file on the first start.

config.json
{
    "AUTHENTICATION": {
        "SECRET": "generated-on-first-start"
    },
    "DATABASE": {
        "TYPE": "POSTGRES",
        "HOST": "localhost",
        "PORT": "5432",
        "USER": "admin",
        "PASSWORD": "password",
        "DATABASE": "Kora"
    },
    "SERVER": {
        "DASHBOARD": {
            "PORT": 3000,
            "URL": null,
            "DEVELOPER": false
        },
        "API": {
            "PORT": 3001,
            "URL": null,
            "LOGS": true
        }
    }
}
KeyWhat it does
AUTHENTICATION.SECRETSigns dashboard sessions and Kora's internal tokens. Generated for you. Leave it alone once Kora is running.
DATABASE.TYPEPOSTGRES, MYSQL or MARIADB.
DATABASE.HOST, PORT, USER, PASSWORDHow to reach the database.
DATABASE.DATABASEThe database name. It must already exist.
SERVER.DASHBOARD.PORTDashboard port.
SERVER.DASHBOARD.URLPublic dashboard address, such as https://kora.example.com. Used for Discord sign-in.
SERVER.DASHBOARD.DEVELOPERServes the dashboard with live reload. Only for working on Kora itself.
SERVER.API.PORTAPI port. Your products send validation requests here.
SERVER.API.URLPublic API address, such as https://api.kora.example.com. Shown in the code samples on the Integration page.
SERVER.API.LOGSPrints each API request to the console.

Leave both URLs as null while running on your own computer. Set them from Settings > Server URLs when you move to a domain.

Environment Variables

These override config.json when set, which suits Docker and panels that only let you set variables.

VariableOverrides
KORA_DATABASE_TYPEDATABASE.TYPE
KORA_DATABASE_HOSTDATABASE.HOST
KORA_DATABASE_PORTDATABASE.PORT
KORA_DATABASE_USERDATABASE.USER
KORA_DATABASE_PASSWORDDATABASE.PASSWORD
KORA_DATABASE_NAMEDATABASE.DATABASE
KORA_DASHBOARD_PORTSERVER.DASHBOARD.PORT
KORA_DASHBOARD_URLSERVER.DASHBOARD.URL
KORA_API_PORTSERVER.API.PORT
KORA_API_URLSERVER.API.URL

Settings Page

SectionWhat it holds
LanguageDashboard language and the fallback language.
ConsoleDebug output, API request logs, 12-hour clock and seconds in timestamps.
UpdatesYour version, update checks and automatic updates.
AppearanceLight, dark or system mode and the accent colour.
Dashboard CustomizationSidebar position, background, tint, blur, glass panels and custom CSS.
BrandingDashboard name and icon.
Login ScreenSign-in form side and background.
Server URLsPublic dashboard and API addresses. Changing them asks for a restart.
Client DashboardLets customers sign in. On by default.
Discord Sign InDiscord client ID and secret.
Response Signing KeyThe Ed25519 key that signs validation responses. See Signed Responses.

Module Settings

Each module has its own page under Configs:

  • Core: key format, statuses, validation rules and leak detection.
  • Stores: what refunds and disputes do to licenses, and each store's secrets.
  • Discord: bot token, validation logs and status.

Resetting

To start over, stop Kora and run:

npm run factory-reset

It asks you to type the database name, then drops every Kora table and clears the settings cache. The next start runs the setup wizard again with your database connection kept.

FlagEffect
--allAlso deletes config.json, so the wizard starts from scratch.
--yesSkips the confirmation.