-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
The best way to start is with Docker Compose
docker pull ghcr.io/dredbaron/openmtg:latestFor ARM64 hosts (Raspberry Pi, Apple Silicon, ARM-based VPS), use the ARM64 image:
docker pull ghcr.io/dredbaron/openmtg-arm64:latestOpenMTG supports PostgreSQL (default) or SQLite. This is a permanent, per-instance
choice: it gets locked in the moment you create your admin account during first-time
setup, and the app refuses to start if it later sees DATABASE_URL pointing at a
different backend than what was used at setup. There is currently no tool to convert
an existing instance from one backend to the other, so pick before you start using
the app for real.
PostgreSQL is the better fit if you want a database you can back up/replicate with standard tooling, or if your Docker volumes live on a network filesystem (NFS/SMB) - SQLite's file locking is unreliable there. SQLite is the better fit if you'd rather not run a second container at all - useful for small, low-traffic instances (a NAS or single-board computer) where the operational simplicity of one container matters more than concurrent-write headroom.
Postgres is the default docker-compose.yml, no extra steps needed. To use SQLite
instead, use docker-compose.sqlite.yml in its place throughout this guide (i.e.
docker compose -f docker-compose.sqlite.yml up instead of docker compose up) -
don't run both files together.
# Only used with docker-compose.yml (PostgreSQL)
POSTGRES_DB=openmtg
POSTGRES_USER=openmtg
DB_PASSWORD=your_secure_password_here
DATA_PATH=./data
# Only used with docker-compose.sqlite.yml
SQLITE_PATH=./sqlite-data
JWT_SECRET=your_long_random_secret_here
CONFIG_PATH=./config
UPLOADS_PATH=./uploads
TRADES_PATH=./tradesservices:
db:
container_name: openmtg-db
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ${DATA_PATH}:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
retries: 5
app:
container_name: openmtg
build: .
image: ghcr.io/dredbaron/openmtg:latest
restart: unless-stopped
ports:
- "8080:80"
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${DB_PASSWORD}@db/${POSTGRES_DB}
JWT_SECRET: ${JWT_SECRET}
CONFIG_PATH: /config
UPLOADS_PATH: /data/uploads
NOTEL: ${NOTEL}
depends_on:
db:
condition: service_healthy
volumes:
- ${CONFIG_PATH}:/config
- ${UPLOADS_PATH}:/data/uploads
- ${TRADES_PATH}:/data/trades
Or, for SQLite, create docker-compose.sqlite.yml instead:
services:
app:
container_name: openmtg
build: .
image: ghcr.io/dredbaron/openmtg:latest
restart: unless-stopped
ports:
- "8080:80"
environment:
DATABASE_URL: sqlite:////data/db/openmtg.db
JWT_SECRET: ${JWT_SECRET}
CONFIG_PATH: /config
UPLOADS_PATH: /data/uploads
NOTEL: ${NOTEL}
volumes:
- ${CONFIG_PATH}:/config
- ${UPLOADS_PATH}:/data/uploads
- ${TRADES_PATH}:/data/trades
- ${SQLITE_PATH}:/data/db
docker compose upOr, if you created docker-compose.sqlite.yml instead:
docker compose -f docker-compose.sqlite.yml upOf note is the ability for any Admin to change the preferred currency of a user. Within the User Management page, each user will have a drop-down which contains all available currencies. Changes are saved immediately, and should not require a page refresh.