AAMTG

Install

Pick the way that suits you. All three give the same app.

Windows

  1. Download magic-db.exe from the latest release and put it in a folder of its own, for example C:\magic-db.
  2. Double-click it. Windows may show a blue “Windows protected your PC” box, because the program is not signed: choose More info, then Run anyway.
  3. Your browser opens on http://127.0.0.1:8080. The first start downloads the card catalog (about 80 MB) and builds it: a few minutes, with progress shown on the page.

Everything AMTG writes goes in a data folder next to the program. To stop it, close its window.

Updating: open Administration. When a newer version is out it says so, and one button downloads it, checks it, swaps it in and restarts. Your data folder is kept.

Reaching it from your phone: start it listening on your network, for example from a start.bat file:

set MAGICDB_HOST=0.0.0.0
magic-db.exe

Then open http://<the PC's address>:8080 on the phone.

Docker

curl -O https://raw.githubusercontent.com/ac-me-git/magic-db/main/compose.yaml
docker compose up -d

Open http://localhost:8080. Data lives in the magic-db-data volume. Set TZ in compose.yaml to your time zone, so the nightly jobs run at night for you.

Updating: docker compose pull, then docker compose up -d.

Trying what is not released yet: in compose.yaml write magic-db:edge instead of magic-db:latest, then pull and up as above. edge is rebuilt at every change to the program: newer and less tried than a release; the Administration page says that it is the development version. Make a backup first (Administration). To go back, write latest again, pull and up.

From source

You need uv (or Python 3.12+ with pip).

git clone https://github.com/ac-me-git/magic-db.git
cd magic-db
uv sync
uv run magicdb

Configuration

Everything is optional and set with environment variables.

VariableDefaultMeaning
MAGICDB_DATA_DIR./data (Docker: /data)Where the catalog, collection, cached images and backups are kept
MAGICDB_BACKUP_DIR<data>/backupsWhere backups are written. Point it at a folder that is itself backed up or synced
MAGICDB_HOST127.0.0.1 (Docker: 0.0.0.0)Address to listen on. 0.0.0.0 makes it reachable from other devices
MAGICDB_PORT8080Port to listen on
MAGICDB_PASSWORDnoneIf set, every page asks for it (HTTP Basic: any user name, this password)
MAGICDB_UPDATE_HOUR3Hour of the nightly catalog update, 0–23, local time
MAGICDB_BACKUP_HOUR4Hour of the nightly backup, 0–23, local time
MAGICDB_LANGenDefault interface language (en or it)
MAGICDB_CURRENCYeureur or usd, for prices and values
MAGICDB_SCHEDULERonoff stops the automatic nightly update and backup
MAGICDB_UPDATE_CHECKonoff stops the Administration page from asking GitHub for a newer version

Reaching it from outside your home

AMTG is meant for one household. Do not put it on the open internet as it is. Put something in front of it that decides who gets in: a VPN such as Tailscale or WireGuard, or an access gateway such as Cloudflare Access. At the very least, set MAGICDB_PASSWORD and serve it over HTTPS through a reverse proxy.

Behind a reverse proxy, pass the public host name to the app (Host or X-Forwarded-Host): AMTG refuses changes that do not come from its own pages, and recognises its own pages by that name. The safety lock is not access control; it stops accidents, not people.

Limits