Configuration#
Searpa is configured entirely through environment variables (in production)
or a .env file (in development). The repository ships an .env.example
documenting every variable; this page is the reference.
Core#
| Variable | Purpose | Notes |
|---|---|---|
SECRET_KEY | Django secret key | Required in production. Long and random. |
DEBUG | Debug mode | Keep False (the default) in production. |
ALLOWED_HOSTS | Comma-separated hostnames the app will serve | e.g. search.example.com. |
DATABASE_URL | PostgreSQL connection URL | e.g. postgres://user:pass@host:5432/searpa. |
LOG_LEVEL | Logging verbosity | DEBUG / INFO / WARNING / ERROR (default INFO). |
Search providers#
These keys decide which engines, media tabs and knowledge cards are available. A provider with no key is simply hidden (not shown as broken). Full details on Search providers.
| Variable | Enables |
|---|---|
BRAVE_API_KEY | Web, Images, News and Videos via Brave (the baseline). |
BRAVE_SUGGEST_API_KEY | Autocomplete suggestions (a separate Brave subscription). |
MOJEEK_API_KEY | The Mojeek web engine. |
MARGINALIA_API_KEY | The Marginalia web engine (public works out of the box). |
TMDB_API_KEY | The film / TV knowledge card. |
TRIPADVISOR_API_KEY | The places knowledge card. |
STACKEXCHANGE_API_KEY | A higher Stack Exchange quota for the Q&A card (optional). |
PIXABAY_API_KEY | Pixabay images blended into the Images tab. |
WORLDNEWS_API_KEY | World News API articles blended into the News tab. |
Translation#
| Variable | Purpose |
|---|---|
LIBRETRANSLATE_URL | URL of your LibreTranslate instance. Unset disables the Translate tab entirely. |
LIBRETRANSLATE_API_KEY | Only if your LibreTranslate requires a key (LT_API_KEYS=true). |
LIBRETRANSLATE_ORIGIN_COUNTRY | Two-letter country code for the flag shown next to “Translate” in Settings (default fr). |
See Translation.
Public API rate limits#
Applied per API key (Django REST Framework throttle rates, <number>/<period>,
where period is second / minute / hour / day). Both limits apply
together. See the API rate limits page.
| Variable | Purpose | Default |
|---|---|---|
API_THROTTLE_BURST | Short-term cap, shields upstream providers from a runaway client | 60/min |
API_THROTTLE_SUSTAINED | Daily volume cap | 5000/day |
Email (password reset)#
Used only to send password-reset messages, see Users & access.
| Variable | Purpose |
|---|---|
EMAIL_BACKEND | Django email backend (SMTP, console, …). |
EMAIL_HOST / EMAIL_PORT | SMTP server. |
EMAIL_USE_TLS | True / False. |
EMAIL_HOST_USER / EMAIL_HOST_PASSWORD | SMTP credentials. |
DEFAULT_FROM_EMAIL | The “From” address on outgoing mail. |
For a quick test without a real SMTP server, set
EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend to print emails to
the container log.
Footer links#
The footer ships no privacy policy, terms or legal notice by default, that
content is specific to whoever operates the instance and your jurisdiction. Add
your own as Label=URL pairs separated by commas:
FOOTER_LINKS=Privacy=https://example.com/privacy,Legal notice=https://example.com/legalLeave FOOTER_LINKS unset to show no extra footer links.