Skip to content

Complete Environment Variables Reference

Comprehensive reference for all BrickTracker environment variables with defaults, examples, and use cases.

Note

This is the complete reference for BrickTracker version 1.3.0. For quick setup guides, see the Core Settings page.

Core Settings

VariableDefaultTypePurpose
BK_REBRICKABLE_API_KEY(required)stringRebrickable API access key for retrieving set data
BK_HOST0.0.0.0IPServer bind address
BK_PORT3333numberServer port
BK_DEBUGfalsebooleanEnable debugging mode
BK_DATABASE_PATHdata/app.dbpathDatabase file location
BK_TIMEZONEEtc/UTCstringTimezone for displaying datetimes

Authentication

VariableDefaultTypePurpose
BK_AUTHENTICATION_PASSWORD(empty)stringAdmin password protection
BK_AUTHENTICATION_KEY(required if using auth)stringSecret key for signing authentication tokens

Images

VariableDefaultTypePurpose
BK_USE_REMOTE_IMAGESfalsebooleanUse CDN vs local images
BK_SETS_FOLDERdata/setspathFolder for storing set images
BK_PARTS_FOLDERdata/partspathFolder for storing part images
BK_MINIFIGURES_FOLDERdata/minifigurespathFolder for storing minifigure images

Sets Configuration

VariableDefaultTypePurpose
BK_SETS_CONSOLIDATIONfalsebooleanGroup duplicate sets together
BK_SETS_DEFAULT_ORDER"rebrickable_sets"."number" DESC, "rebrickable_sets"."version" ASCstringDefault sort order for sets
BK_SETS_SERVER_SIDE_PAGINATIONfalsebooleanEnable server-side pagination for sets page
BK_SETS_PAGINATION_SIZE_DESKTOP12numberSets per page on desktop
BK_SETS_PAGINATION_SIZE_MOBILE4numberSets per page on mobile
BK_SHOW_SETS_DUPLICATE_FILTERtruebooleanShow duplicate filter button on sets page
BK_SKIP_SPARE_PARTSfalsebooleanSkip importing spare parts from Rebrickable
BK_HIDE_SPARE_PARTSfalsebooleanHide spare parts from parts lists

Parts Configuration

VariableDefaultTypePurpose
BK_PARTS_DEFAULT_ORDER"rebrickable_parts"."name" ASC, "rebrickable_parts"."color_name" ASC, "bricktracker_parts"."spare" ASCstringDefault sort order for parts
BK_PARTS_SERVER_SIDE_PAGINATIONfalsebooleanEnable server-side pagination for parts page
BK_PARTS_PAGINATION_SIZE_DESKTOP10numberParts per page on desktop
BK_PARTS_PAGINATION_SIZE_MOBILE5numberParts per page on mobile

Minifigures Configuration

VariableDefaultTypePurpose
BK_MINIFIGURES_DEFAULT_ORDER"rebrickable_minifigures"."name" ASCstringDefault sort order for minifigures
BK_MINIFIGURES_SERVER_SIDE_PAGINATIONfalsebooleanEnable server-side pagination for minifigures page
BK_MINIFIGURES_PAGINATION_SIZE_DESKTOP10numberMinifigures per page on desktop
BK_MINIFIGURES_PAGINATION_SIZE_MOBILE5numberMinifigures per page on mobile

Problems/Missing Parts Configuration

VariableDefaultTypePurpose
BK_PROBLEMS_SERVER_SIDE_PAGINATIONfalsebooleanEnable server-side pagination for problems page
BK_PROBLEMS_PAGINATION_SIZE_DESKTOP10numberProblems per page on desktop
BK_PROBLEMS_PAGINATION_SIZE_MOBILE5numberProblems per page on mobile

Wishlist Configuration

VariableDefaultTypePurpose
BK_WISHES_DEFAULT_ORDER"bricktracker_wishes"."rowid" DESCstringDefault sort order for wishlist

Storage Configuration

VariableDefaultTypePurpose
BK_STORAGE_DEFAULT_ORDER"bricktracker_metadata_storages"."name" ASCstringDefault sort order for storages

Purchase Configuration

VariableDefaultTypePurpose
BK_PURCHASE_DATE_FORMAT%d/%m/%YstringFormat for purchase dates
BK_PURCHASE_CURRENCYstringCurrency symbol for purchase prices
BK_PURCHASE_LOCATION_DEFAULT_ORDER"bricktracker_metadata_purchase_locations"."name" ASCstringDefault sort order for purchase locations

Instructions

VariableDefaultTypePurpose
BK_INSTRUCTIONS_FOLDERdata/instructionspathFolder for storing instruction files
BK_INSTRUCTIONS_ALLOWED_EXTENSIONS.pdfstringComma-separated list of allowed file extensions

UI Visibility Settings

VariableDefaultTypePurpose
BK_HIDE_ADD_SETfalsebooleanHide 'Add' entry from menu
BK_HIDE_ADD_BULK_SETfalsebooleanHide 'Bulk add' entry from add page
BK_HIDE_ADMINfalsebooleanHide 'Admin' entry from menu
BK_HIDE_ALL_INSTRUCTIONSfalsebooleanHide 'Instructions' entry from menu
BK_HIDE_ALL_MINIFIGURESfalsebooleanHide 'Minifigures' entry from menu
BK_HIDE_ALL_PARTSfalsebooleanHide 'Parts' entry from menu
BK_HIDE_ALL_PROBLEMS_PARTSfalsebooleanHide 'Problems' entry from menu
BK_HIDE_ALL_SETSfalsebooleanHide 'Sets' entry from menu
BK_HIDE_ALL_STORAGESfalsebooleanHide 'Storages' entry from menu
BK_HIDE_STATISTICSfalsebooleanHide 'Statistics' entry from menu
BK_HIDE_WISHESfalsebooleanHide 'Wishlist' entry from menu
BK_HIDE_SET_INSTRUCTIONSfalsebooleanHide 'Instructions' entry in set cards
BK_HIDE_TABLE_DAMAGED_PARTSfalsebooleanHide 'Damaged' column from parts table
BK_HIDE_TABLE_MISSING_PARTSfalsebooleanHide 'Missing' column from parts table
BK_HIDE_TABLE_CHECKED_PARTSfalsebooleanHide 'Checked' column from parts table

UI Behavior Settings

VariableDefaultTypePurpose
BK_ADMIN_DEFAULT_EXPANDED_SECTIONSdatabasestringComma-separated list of admin sections to expand by default
BK_INDEPENDENT_ACCORDIONSfalsebooleanMake accordion items independent (multiple can be open)
BK_SHOW_GRID_FILTERSfalsebooleanDisplay grid filters by default instead of collapsed
BK_SHOW_GRID_SORTfalsebooleanDisplay grid sort by default instead of collapsed
BK_RANDOMfalsebooleanShuffle lists on the front page
BK_DEFAULT_TABLE_PER_PAGE25numberDefault items per page for big tables
BK_DARK_MODEfalsebooleanEnable dark mode by default

Statistics Configuration

VariableDefaultTypePurpose
BK_STATISTICS_SHOW_CHARTStruebooleanShow collection growth charts on statistics page
BK_STATISTICS_DEFAULT_EXPANDEDtruebooleanDefault state of statistics page sections (expanded/collapsed)

Rebrickable Integration

VariableDefaultTypePurpose
BK_REBRICKABLE_LINKSfalsebooleanDisplay Rebrickable links wherever applicable
BK_REBRICKABLE_LINK_MINIFIGURE_PATTERNhttps://rebrickable.com/minifigs/{figure}stringURL pattern for minifigure links
BK_REBRICKABLE_LINK_PART_PATTERNhttps://rebrickable.com/parts/{part}/_/{color}stringURL pattern for part links
BK_REBRICKABLE_LINK_INSTRUCTIONS_PATTERNhttps://rebrickable.com/instructions/{path}stringURL pattern for instruction links
BK_REBRICKABLE_IMAGE_NILhttps://rebrickable.com/static/img/nil.pngstringURL for missing part/set image placeholder
BK_REBRICKABLE_IMAGE_NIL_MINIFIGUREhttps://rebrickable.com/static/img/nil_mf.jpgstringURL for missing minifigure image placeholder
BK_REBRICKABLE_PAGE_SIZE100numberItems per API call when retrieving from Rebrickable
VariableDefaultTypePurpose
BK_BRICKLINK_LINKSfalsebooleanDisplay BrickLink links wherever applicable
BK_BRICKLINK_LINK_PART_PATTERNhttps://www.bricklink.com/v2/catalog/catalogitem.page?P={part}&C={color}stringURL pattern for BrickLink part links
BK_BRICKLINK_LINK_SET_PATTERNhttps://www.bricklink.com/v2/catalog/catalogitem.page?S={set_num}stringURL pattern for BrickLink set links

Peeron Integration

VariableDefaultTypePurpose
BK_PEERON_DOWNLOAD_DELAY1000numberDelay in milliseconds between Peeron page downloads
BK_PEERON_MIN_IMAGE_SIZE100numberMinimum image size (width/height) for valid Peeron instruction pages
BK_PEERON_INSTRUCTION_PATTERNhttp://peeron.com/scans/{set_number}-{version_number}stringURL pattern for Peeron instruction pages
BK_PEERON_THUMBNAIL_PATTERNhttp://belay.peeron.com/thumbs/{set_number}-{version_number}/stringURL pattern for Peeron thumbnails
BK_PEERON_SCAN_PATTERNhttp://belay.peeron.com/scans/{set_number}-{version_number}/stringURL pattern for Peeron scans

External Data Sources

VariableDefaultTypePurpose
BK_RETIRED_SETS_FILE_URLhttps://docs.google.com/spreadsheets/d/1rlYfEXtNKxUOZt2Mfv0H17DvK7bj6Pe0CuYwq6ay8WA/gviz/tq?tqx=out:csv&sheet=Sorted%20by%20Retirement%20DatestringURL to unofficial retired sets list
BK_RETIRED_SETS_PATHdata/retired_sets.csvpathPath to retired sets CSV file
BK_THEMES_FILE_URLhttps://cdn.rebrickable.com/media/downloads/themes.csv.gzstringURL to Rebrickable themes file
BK_THEMES_PATHdata/themes.csvpathPath to themes CSV file

Database & File Formats

VariableDefaultTypePurpose
BK_DATABASE_TIMESTAMP_FORMAT%Y-%m-%d-%H-%M-%SstringTimestamp format for database downloads
BK_FILE_DATETIME_FORMAT%d/%m/%Y, %H:%M:%SstringTimestamp format for files on disk

Network & Socket Configuration

VariableDefaultTypePurpose
BK_DOMAIN_NAME(empty)stringCORS allow origin restriction for socket
BK_SOCKET_NAMESPACEbricksocketstringSocket.IO socket namespace
BK_SOCKET_PATH/bricksocket/stringSocket.IO path
BK_NO_THREADED_SOCKETfalsebooleanDisable threading on socket tasks
BK_USER_AGENTMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36stringUser-Agent for external requests

Released under the MIT License.