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
BK_REBRICKABLE_API_KEY=API-KEYGetting Your API Key
- Visit Rebrickable.com
- Create a free account or log in
- Navigate to your account settings
- Generate an API key in the API section
- Copy the key to your
.envfile
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.
BK_DATABASE_PATH=data/app.dbDatabase 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.
BK_DATABASE_TIMESTAMP_FORMAT=%Y-%m-%d-%H-%M-%SFile 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.
BK_FILE_DATETIME_FORMAT=%d/%m/%Y, %H:%M:%SNetwork Configuration
Host
Optional: IP address the server will listen on.
BK_HOST=0.0.0.0BK_HOST=127.0.0.1BK_HOST=0.0.0.0BK_HOST=192.168.1.100Port
Optional: Port the server will listen on.
BK_PORT=3333Domain
Optional: if set up, will add a CORS allow origin restriction to the socket.
BK_DOMAIN_NAME=BK_DOMAIN_NAME=https://bricktracker.yourdomain.nameTimezone Configuration
Optional: Timezone to use to display datetimes. Check your system for available timezone/TZ values
BK_TIMEZONE=Etc/UTCFinding Your Timezone
# Linux/macOS: Check system timezone
timedatectl show --property=Timezone --value
# List available timezones
timedatectl list-timezones | grep your_regionDebug Mode
Optional: Enable debugging.
BK_DEBUG=falseDebug 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
BK_THEMES_FILE_URL=https://cdn.rebrickable.com/media/downloads/themes.csv.gzOptional: Path to the themes file, relative to '/app/' folder. You can name it whatever you want, but content has to be a CSV.
BK_THEMES_PATH=data/themes.csvOptional: URL to the unofficial retired sets list on Google Sheets
BK_RETIRED_SETS_FILE_URL=https://docs.google.com/spreadsheets/d/1rlYfEXtNKxUOZt2Mfv0H17DvK7bj6Pe0CuYwq6ay8WA/gviz/tq?tqx=out:csv&sheet=Sorted%20by%20Retirement%20DateOptional: 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
BK_RETIRED_SETS_PATH=data/retired_sets.csvSpare Parts
INFO
- Hide spare parts: Use
BK_HIDE_SPARE_PARTS=trueto hide spare parts from your sets part list (they remain in the database) - Skip spare parts entirely: Use
BK_SKIP_SPARE_PARTS=trueto prevent spare parts from being imported into your database at all
Optional: Skip importing spare parts when downloading sets from Rebrickable
BK_SKIP_SPARE_PARTS=trueOptional: Hide spare parts from parts lists (spare parts must still be in database)
BK_HIDE_SPARE_PARTS=true