Skip to content

Core Settings

Essential configuration settings that control BrickTracker's basic functionality and connectivity.

API Configuration

Optional/Mandatory

The API key used to retrieve sets from the Rebrickable API. It is not necessary to set it to display the site, but it will limit its capabilities as you will not be able to add new sets

bash
BK_REBRICKABLE_API_KEY=API-KEY

Getting Your API Key

  1. Visit Rebrickable.com
  2. Create a free account or log in
  3. Navigate to your account settings
  4. Generate an API key in the API section
  5. Copy the key to your .env file

Database Configuration

Database Path

Optional: Path to the database, relative to '/app/' folder Useful if you need it mounted in a Docker volume. Keep in mind that it will not do any check on the existence of the path, or if it is dangerous.

bash
BK_DATABASE_PATH=data/app.db

Database Timestamp

Optional: Format of the timestamp added to the database file when downloading it. Check https://docs.python.org/3/library/time.html#time.strftime for format details.

bash
BK_DATABASE_TIMESTAMP_FORMAT=%Y-%m-%d-%H-%M-%S

File Timestamp

Optional: Format of the timestamp for files on disk (instructions, themes). Check https://docs.python.org/3/library/time.html#time.strftime for format details.

bash
BK_FILE_DATETIME_FORMAT=%d/%m/%Y, %H:%M:%S

Network Configuration

Host

Optional: IP address the server will listen on.

bash
BK_HOST=0.0.0.0
bash
BK_HOST=127.0.0.1
bash
BK_HOST=0.0.0.0
bash
BK_HOST=192.168.1.100

Port

Optional: Port the server will listen on.

bash
BK_PORT=3333

Domain

Optional: if set up, will add a CORS allow origin restriction to the socket.

bash
BK_DOMAIN_NAME=
bash
BK_DOMAIN_NAME=https://bricktracker.yourdomain.name

Timezone Configuration

Optional: Timezone to use to display datetimes. Check your system for available timezone/TZ values

bash
BK_TIMEZONE=Etc/UTC

Finding Your Timezone

bash
# Linux/macOS: Check system timezone
timedatectl show --property=Timezone --value

# List available timezones
timedatectl list-timezones | grep your_region

Debug Mode

Optional: Enable debugging.

bash
BK_DEBUG=false

Debug mode features:

  • Detailed error pages: Full stack traces and error information
  • SQL query logging: See database queries in console
  • Template auto-reload: Changes to templates refresh automatically
  • Development server: Flask's development server with auto-reload
  • ⚠️ Security warning: Never use in production

External Data Sources

Optional: URL to the themes.csv.gz on Rebrickable

bash
BK_THEMES_FILE_URL=https://cdn.rebrickable.com/media/downloads/themes.csv.gz

Optional: Path to the themes file, relative to '/app/' folder. You can name it whatever you want, but content has to be a CSV.

bash
BK_THEMES_PATH=data/themes.csv

Optional: URL to the unofficial retired sets list on Google Sheets

bash
BK_RETIRED_SETS_FILE_URL=https://docs.google.com/spreadsheets/d/1rlYfEXtNKxUOZt2Mfv0H17DvK7bj6Pe0CuYwq6ay8WA/gviz/tq?tqx=out:csv&sheet=Sorted%20by%20Retirement%20Date

Optional: Path to the unofficial retired sets lists, relative to '/app/' folder. You can name it whatever you want, but content has to be a CSV

bash
BK_RETIRED_SETS_PATH=data/retired_sets.csv

Spare Parts

INFO

  • Hide spare parts: Use BK_HIDE_SPARE_PARTS=true to hide spare parts from your sets part list (they remain in the database)
  • Skip spare parts entirely: Use BK_SKIP_SPARE_PARTS=true to prevent spare parts from being imported into your database at all

Optional: Skip importing spare parts when downloading sets from Rebrickable

bash
BK_SKIP_SPARE_PARTS=true

Optional: Hide spare parts from parts lists (spare parts must still be in database)

bash
BK_HIDE_SPARE_PARTS=true

Released under the MIT License.