Configuration

TraLa can be configured using a YAML configuration file and environment variables. Environment variables take precedence over settings in the configuration file.

Configuration File

A sample configuration file:

# TraLa Configuration File
version: 3.3

# Environment settings
environment:
  # Icon settings
  selfhst_icon_url: https://cdn.jsdelivr.net/gh/selfhst/icons/

  # Search engine URL
  search_engine_url: https://duckduckgo.com/?q=

  # Refresh interval in seconds
  refresh_interval_seconds: 30

  # Log level: info, debug
  log_level: info

  # Language: en, de, nl
  language: nl

  # Smart grouping configuration
  grouping:
    enabled: true
    columns: 3
    tag_frequency_threshold: 0.9
    min_services_per_group: 2

  # Traefik API configuration
  traefik:
    api_host: http://traefik:8080
    enable_basic_auth: false
    insecure_skip_verify: false
    basic_auth:
      username: username
      password: password
      password_file: /run/secrets/basic_auth_password

Mounting the Configuration File

To use a configuration file with Docker, mount it into the container:

# docker-compose.yml
services:
  trala:
    image: trala
    volumes:
      - ./configuration.yml:/config/configuration.yml:ro

Environment Variables

Environment variables override settings from the configuration file. Variable names are derived by converting the YAML key path to uppercase and replacing dots with underscores.

Docker Compose Example

Here’s how to configure TraLa using environment variables in Docker Compose:

# docker-compose.yml
services:
  trala:
    image: trala
    environment:
      - TRAEFIK_API_HOST=http://traefik:8080
      - REFRESH_INTERVAL_SECONDS=30
      - LOG_LEVEL=info
      - LANGUAGE=en
      - GROUPING_ENABLED=true
      - GROUPED_COLUMNS=3

Common Variables

Environment VariableDescriptionDefault
TRAEFIK_API_HOSTThe full base URL of your Traefik API(required)
REFRESH_INTERVAL_SECONDSAuto-refresh interval30
SEARCH_ENGINE_URLSearch engine URLhttps://www.google.com/search?q=
LOG_LEVELLog level: info or debuginfo
LANGUAGELanguage: en, de, or nlen
SELFHST_ICON_URLBase URL for icon endpointhttps://cdn.jsdelivr.net/gh/selfhst/icons/

Grouping Variables

Environment VariableDescriptionDefault
GROUPING_ENABLEDEnable smart groupingtrue
GROUPED_COLUMNSNumber of columns (1-6)3
GROUPING_TAG_FREQUENCY_THRESHOLDTag frequency threshold (0.0-1.0)0.9
GROUPING_MIN_SERVICES_PER_GROUPMin services per group2

Traefik API Variables

Environment VariableDescriptionDefault
TRAEFIK_ENABLE_BASIC_AUTHEnable basic authfalse
TRAEFIK_INSECURE_SKIP_VERIFYSkip SSL verificationfalse
TRAEFIK_BASIC_AUTH_USERNAMEBasic auth username-
TRAEFIK_BASIC_AUTH_PASSWORDBasic auth password-
TRAEFIK_BASIC_AUTH_PASSWORD_FILEPath to password file-

Language Settings

TraLa supports three languages:

  • en — English (default)
  • de — German
  • nl — Dutch

Set the language using the LANGUAGE environment variable or the language key in the configuration file.

Logging

Set the log level using the LOG_LEVEL environment variable:

  • info — Default, shows informational messages
  • debug — Verbose logging, useful for troubleshooting icon-finding issues

To view the effective configuration at startup, enable debug logging.