Set it up
Menu

Configuration

Brick Bin is configured with environment variables. There are fourteen. Most installs set two and leave the rest alone.

On this page

Put them in the .env file beside your compose file, then run docker compose up -d again so the app restarts with them. The .env.example next to each compose file lists them. Every variable name below is a link you can share.

The Default column is the app's own default, and a variable you leave out keeps it. The note under a row says what the compose files do instead.

The ones you must set

With either compose file, these are all most installs need. You don't set DATABASE_URL: the compose files build it from POSTGRES_PASSWORD.

VariablePurposeDefault
POSTGRES_PASSWORDPassword for the app’s own Postgres. Both compose files refuse to start without it.Set it
TS_AUTHKEYTailscale auth key for the sidecar, in the Tailscale install.The try-out compose file doesn’t use it.Set it

Server

VariablePurposeDefault
DATABASE_URLPostgres connection string.Both compose files build it from POSTGRES_PASSWORD. Set it yourself only when running Brick Bin without them.Built for you
APP_PORTPort the app is published on.Only the try-out compose file reads it. The Tailscale install always publishes 3000.3000
DATA_DIRWhere covers, instruction PDFs and catalog files are kept.Both compose files keep it at /data, on the app-data volume../data
AUTO_MIGRATEfalse skips database migrations on start.true
APP_VERSIONRelease label, sent in the catalog import’s User-Agent.Both compose files pass it on only when it's set. Otherwise the Tailscale install uses the commit its image was built from, and the try-out compose file uses dev.0.1

Storage and limits

VariablePurposeDefault
TRASH_RETENTION_DAYSDays a deleted item waits in the trash before it's deleted for good. 0 keeps it until an admin deletes it.30
INSTRUCTIONS_MAX_MBLargest PDF the app will store, in megabytes.200

Catalog import

These control where the catalog import may download from. Catalog data comes from Rebrickable, and the defaults point there.

VariablePurposeDefault
REBRICKABLE_PAGE_FETCHtrue lets the import fetch the downloads page itself. Otherwise an admin pastes the page's source.false
REBRICKABLE_DOWNLOADS_PAGEAddress of the downloads page, https://rebrickable.com/downloads/.Rebrickable’s page
REBRICKABLE_ALLOWED_ORIGINSOrigins the import may download from, comma-separated. HTTPS only. By default https://rebrickable.com and https://cdn.rebrickable.com.Rebrickable and its CDN
CATALOG_IMAGE_ORIGINThe only origin set covers are downloaded from, https://cdn.rebrickable.com.Rebrickable’s CDN

Leave the page fetch off for now

Until Rebrickable confirms that automated page reads are fine, keep REBRICKABLE_PAGE_FETCH at false and paste the page. The tutorial shows how.

A typical .env

The recommended Tailscale install, with everything else left at its default.

.env
POSTGRES_PASSWORD=choose-something-long
TS_AUTHKEY=tskey-auth-…

Keep a copy of this file with your backups, and keep it out of any repository.

Variables used only by the project's tests aren't listed.

Questions?FAQ →Short answers, including the ones that are “not yet”.