Skip to content

Configuration Reference

DredBaron edited this page Mar 28, 2026 · 6 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.

NOTE: DATA_PATH and CONFIG_PATH should both be backed up. DATA_PATH is your entire database, and CONFIG_PATH holds whatever the admin panel writes to disk.

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 10 request per second. The setting can be adjusted, but exceeding 10/s risks violating their API terms and may result in rate limiting or blocks. To respect this rule, the default is set to 1/s.

Clone this wiki locally