Degoog Environment variables
Configure your port, paths, and optional settings.
How to set environment variables
Degoog reads configuration from the process environment when it
starts. The usual way to supply it is a .env file: one
KEY=value per line, no export prefix,
comments allowed with #. Every method below ends up
loading that same file (or an equivalent path) into the process
before launch.
Some settings can only be configured this way. In particular,
DEGOOG_SETTINGS_PASSWORDS is read exclusively from the
environment - there is no settings UI or on-disk file for it. If you
expose your instance on the internet, set a password in your
.env before the first start. An unlocked instance lets
anyone install extensions, which runs code on your server.
# .env — example shared by every method below
DEGOOG_PORT=4444
# Optional: listen on a Unix domain socket instead of DEGOOG_PORT.
# DEGOOG_UNIX_SOCKET=/run/degoog/degoog.sock
DEGOOG_SETTINGS_PASSWORDS=your-secure-password
LOG_LEVEL=info
Release tarball
Prebuilt archives are attached to each
GitHub release. Extract the tarball, cd into the
degoog folder it contains, and save your
.env next to package.json. Bun loads it
automatically when you start the server from that folder. You also
need bun,
git,
and curl
on the host.
tar -xzf degoog_*_prebuild.tar.gz
cd degoog
# create .env here (see example above)
mkdir -p data
bun run src/server/index.ts
Always start Degoog from the extract root. Paths such as
data/plugins are relative to that directory. For a
persistent background process, use systemd (below), supervisord, or
a screen / tmux session pointed at the
same folder.
Docker and Podman
Create a .env file in the same folder as your compose
file or run command, then point Docker at it. With Compose, add
env_file: .env to the service (you can still list
individual keys under environment: if you prefer).
With docker run or podman run, pass
--env-file .env. See the
Running Degoog section on
the overview page for more compose examples. Container images use
PUID and PGID (documented below under
Docker) so file ownership on mounted volumes matches your host user.
# docker-compose.yml
services:
degoog:
image: ghcr.io/degoog-org/degoog:latest
env_file: .env
volumes:
- ./data:/app/data
ports:
- "4444:4444"
# or inline
docker run -d --env-file .env -p 4444:4444 -v ./data:/app/data ghcr.io/degoog-org/degoog:latest
systemd
Keep your variables in .env and reference that file
from the unit with
EnvironmentFile=/opt/degoog/.env. You can also set
individual Environment=NAME=value lines in the unit
file, but a single .env is easier to maintain. Set
WorkingDirectory to your Degoog directory so relative
paths resolve correctly.
[Service]
WorkingDirectory=/opt/degoog
EnvironmentFile=/opt/degoog/.env
ExecStart=/usr/local/bin/bun run src/server/index.ts
Restart=on-failure
Native install (git clone)
Same as the release tarball: save .env in the
repository root and run bun run start from there after
bun install and bun run build. Bun loads
the file automatically. See
Running Degoog on the
overview page.
Viewing server logs
Set LOG_LEVEL to control how much the server prints
(see the General table). Where you read that output depends on how
you run Degoog:
-
Docker Compose:
docker compose logs -f -
Podman:
podman logs -f degoog -
systemd:
journalctl -u degoog -f(replacedegoogwith your unit name) - Tarball or native: the terminal where you started the process; redirect stdout and stderr to a log file if you run detached
General
| Variable | Description | Default |
|---|---|---|
DEGOOG_PORT |
The port your server listens on. | 4444 |
DEGOOG_UNIX_SOCKET |
Optional Unix domain socket path for the server to listen on,
for example /run/degoog/degoog.sock. When set,
Degoog listens on this socket instead of
DEGOOG_PORT. Leave it unset to keep the default
TCP listener behavior.
|
|
DEGOOG_BASE_URL |
Base path for serving Degoog behind a reverse proxy at a
sub-path. The expected value is a path like
/degoog. A full URL is also accepted -
https://example.com/degoog behaves the same as
/degoog since only the path portion is used.
A bare domain with no sub-path (e.g.
https://degoog.org) has no effect since there
is no path to prepend. When unset, Degoog is served at the
root / as usual.
Note: the OpenSearch XML descriptor always uses only the path portion of this value so that its URLs remain valid regardless of how the variable was set. |
|
DEGOOG_SETTINGS_PASSWORDS |
A comma separated list of passwords for your Settings page. If you set this, users must enter one of these passwords to access your settings (unless you are using a middleware plugin as a gate). | |
DEGOOG_SETTINGS_PATH |
Custom path for the admin settings panel. On public instances
the admin panel defaults to /admin; on private
instances it defaults to /settings. Set this to
a hard-to-guess string to make the admin panel undiscoverable
(e.g. my-secret-panel-abc123). Leading slashes
are stripped automatically. Works on all instance types
regardless of password configuration.
Note: on public instances the admin panel at this path is only reachable if at least one password is also configured via DEGOOG_SETTINGS_PASSWORDS.
Without a password it returns 404 with no hint that it exists.
|
|
DEGOOG_PUBLIC_INSTANCE |
Set this to a truthy value (like true or
1) to run your instance in read-only mode.
/settings will only show theme and engine toggles
without any tabs, and all server-side mutation APIs will
return Unauthorized.
If you also set DEGOOG_SETTINGS_PASSWORDS, a
password-protected admin panel becomes available at
/admin (or your DEGOOG_SETTINGS_PATH
value).
|
|
DEGOOG_DISTRUST_PROXY |
Controls whether Degoog trusts X-Forwarded-For,
X-Real-IP and X-Forwarded-Proto
headers for client IP, rate limiting, IP banning and HTTPS
detection. Defaults to 1 (distrust), which is the
safe choice when Degoog is exposed directly to the internet,
since trusting these headers lets any client spoof their
source IP and protocol. Set to 0 only when
Degoog sits behind a reverse proxy (nginx, caddy, traefik,
etc.) that you control and that strips or rewrites these
headers on incoming requests.
|
1 |
DEGOOG_OUTGOING_ALLOWED_HOSTS |
Comma-separated allowlist of hostnames degoog is permitted to
reach for outgoing requests (search engines, autocomplete
providers, plugin fetches, image proxy). Wildcards like
*.example.com are accepted. When unset, no
hostname restriction is applied. Use this to harden an
internet-exposed instance against SSRF or to keep traffic
inside an internal network.
|
|
DEGOOG_VALKEY_URL |
Connection URL for an optional Valkey (or any RESP-compatible
server: Redis, KeyDB, Dragonfly). When set, degoog uses it as
a shared cache and cross-process invalidation bus so multiple
replicas share search and autocomplete results and react to
settings changes instantly. When unset, all caching stays
per-process in memory. Example:
redis://valkey:6379.
|
|
DEGOOG_CACHE_MAX_ENTRIES |
Maximum number of entries per in-memory cache namespace
(search, autocomplete, and each extension cache). When the cap
is reached, the least-recently-used entry is evicted on
insert. This only bounds the in-process L1 cache; the shared
Valkey cache (if configured) is governed by Valkey's own
maxmemory policy.
|
1000 |
DEGOOG_CACHE_TTL_MS |
Default TTL (in milliseconds) for cached search responses and autocomplete suggestions. Applied when no shorter or type-specific TTL overrides it. | 43200000 (12 hours) |
DEGOOG_CACHE_SHORT_TTL_MS |
Short TTL (in milliseconds) used when a search returned with failed engines (so the user re-fetches sooner) and by short-lived extension caches such as AI summary and spell check. | 120000 (2 minutes) |
DEGOOG_CACHE_NEWS_TTL_MS |
TTL (in milliseconds) applied to news-type search responses. Shorter than the default since news goes stale fast. | 1800000 (30 minutes) |
DEGOOG_BETA_STORE |
Set to 1 to prefer the develop
branch of all store repositories over main /
master when cloning or pulling. Falls back
silently to the default branch if develop does
not exist on the remote. Intended for extension developers
and nightly testers who want to track pre-release extensions
without affecting other users.
|
|
DEGOOG_WIZARD |
Set to false to disable the first-run setup
wizard regardless of the persisted state. Useful when
provisioning instances via configuration management where the
wizard would otherwise gate startup.
|
|
DEGOOG_DEFAULT_SEARCH_LANGUAGE |
Default ISO 639-1 language code applied to all searches when
searches when no language is selected by the user (e.g.
en, de, it).
|
en-US |
DEGOOG_I18N |
Forces the UI locale for all requests, overriding the
Accept-Language header (e.g. en-US,
fr-FR). When set, the same locale pipeline runs
as normal - only the source changes. Unset or empty:
Accept-Language is used as today.
|
|
LOG_LEVEL |
Controls the verbosity of server-side console output.
Supported levels from most to least severe:
fatal, error, warn,
info, log, debug. Each
level includes all levels of higher severity. Set to
debug to print all messages, including plugin
execution times. See
Viewing server logs for
how to read output on your platform.
|
info |
LOG_TRANSLATION |
Set to true to enable translation-specific log
output. This is a separate toggle from LOG_LEVEL
and is off by default. Enable it when debugging missing keys,
locale resolution misses, or broken locale files without
polluting your regular debug output.
|
false |
Docker
| Variable | Description | Default |
|---|---|---|
PUID |
The user ID your container process runs as. You should set this to match your host user ID. | 1000 |
PGID |
The group ID your container process runs as. You should set this to match your host group ID. | 1000 |
Plugins, themes, engines
| Variable | Description | Default |
|---|---|---|
DEGOOG_DATA_DIR |
The root directory degoog uses for all on-disk state (plugins, themes, engines, transports, autocomplete providers, and the settings files). Override this when you want everything in one custom location; each individual path can still be overridden via its own variable below. | data (relative to cwd) |
DEGOOG_PLUGINS_DIR |
The directory where you load custom command and slot plugins. | data/plugins |
DEGOOG_THEMES_DIR |
The directory where you load custom themes. | data/themes |
DEGOOG_ENGINES_DIR |
The directory where you load custom search engine plugins. | data/engines |
DEGOOG_AUTOCOMPLETE_DIR |
The directory where you load custom autocomplete providers. | data/autocomplete |
DEGOOG_TRANSPORTS_DIR |
The directory where you load custom transports. | data/transports |
DEGOOG_PLUGIN_SETTINGS_FILE |
The path to the JSON file that stores per-extension settings (plugins, themes, engines, autocomplete providers, transports). | data/plugin-settings.json |
DEGOOG_SERVER_SETTINGS_FILE |
The path to the JSON file that stores instance-level settings (honeypot, public-instance flag, API secret, wizard status, and the per-instance identifier used to namespace the optional shared cache). | data/server-settings.json |
DEGOOG_DEFAULT_ENGINES_FILE |
Path to the JSON file storing default enabled/disabled engines | data/default-engines.json |
DEGOOG_BLOCKLIST_FILE |
Path to the JSON file storing the ip addresses blocklist | data/blocklist.json |
DEGOOG_SETTINGS_TOKENS_FILE |
Path to the JSON file storing settings tokens | data/settings-tokens.json |
DEGOOG_ALIASES_FILE |
The path to the JSON file where your custom bang command aliases are defined. | data/aliases.json |