Skip to content

Configuration Reference

DredBaron edited this page Aug 4, 2026 · 7 revisions

Environment Variables

These are set before launch and will require a container restart to set changes.

Variable Required Default Description
POSTGRES_DB No openmtg Name of the PostgreSQL database.
POSTGRES_USER No openmtg PostgreSQL login username.
DB_PASSWORD Yes changeme Password for the database user. Change before use!
JWT_SECRET Yes changeme Secret key used to sign authentication tokens. Best to generate with openssl rand -hex 32. Changing this invalidates ALL active sessions.
DATA_PATH No ./data Host path where PostgreSQL stores its data volume. Use an absolute path if you want data outside the project directory.
CONFIG_PATH No ./config Host path where app config is persisted.
UPLOADS_PATH No ./uploads Host path where card photos are stored. Map this to a volume so photos persist across container restarts.
TRADES_PATH No ./trades Host path where the trades SQLite database (trades.db) is stored. Deleting this file removes trade history without affecting card data.

NOTE: DATA_PATH, CONFIG_PATH, UPLOADS_PATH, and TRADES_PATH should all be backed up. DATA_PATH is your entire card database. CONFIG_PATH holds admin panel settings. UPLOADS_PATH holds card photos. TRADES_PATH holds trade history.

Docker / Port configuration

The default port for OpenMTG is 8080, but this is easily changed. The default port looks like this:

ports:
  - "8080:80"

Here, the '8080' can be changed to any desired port, as long as it is not in use on that machine by another process.

Admin UI Settings

Only Admins have access to the Settings page within the application. This page allows for changing the Auto-refresh interval of the internal card database and the rate of API calls to Scryfall.

Price Refresh will automatically check the 'freshness' of the oldest cards and update them if they exceed the update interval. This interval can be set anywhere by-hour between 1 hour and 7 days. This update check occurs every 30 minutes.

Scryfall recommends no more than 2 request per second. The setting cannot adjusted as to avoid violating Scryfall's API terms.

Clone this wiki locally