This page is not just an environment-variable list. It answers three practical questions:
Tavily Hikari has two different access layers:
/admin and call admin endpoints such as /api/keys/mcp or /api/tavily/*Recommended defaults:
DEV_OPEN_ADMIN=trueNo matter which access model you choose, these settings are the main runtime contract:
| Flag / Env | Usually matters | Purpose |
|---|---|---|
--upstream / TAVILY_UPSTREAM |
yes | Tavily MCP upstream URL |
TAVILY_USAGE_BASE |
yes | Tavily HTTP / usage base URL |
--bind / PROXY_BIND |
yes | listen address |
--port / PROXY_PORT |
yes | listen port |
--db-path / PROXY_DB_PATH |
yes | SQLite database path |
LOW_QUOTA_DEPLETION_THRESHOLD |
optional | low-balance 432 key threshold |
--static-dir / WEB_STATIC_DIR |
depends | frontend static asset directory |
--keys / TAVILY_API_KEYS |
optional | one-time key bootstrap helper |
Notes:
TAVILY_UPSTREAM has a default and usually does not need to be overridden in local development,
but you should override it when using a mock, sandbox, or custom upstream.TAVILY_USAGE_BASE defaults to https://api.tavily.com and affects usage / quota sync flows.TAVILY_UPSTREAM is treated as the full MCP endpoint. If your reverse proxy preserves a path
prefix, include the final /mcp path in the configured URL.TAVILY_USAGE_BASE may also include a path prefix. Hikari appends /search, /extract,
/crawl, /map, /research, /research/{id}, and /usage under that prefix.LOW_QUOTA_DEPLETION_THRESHOLD defaults to 15. When an upstream key returns 432 and its
latest known remaining credits are at or below this value, Hikari keeps it out of normal key
pools for the current UTC month while still allowing it as a final fallback.WEB_STATIC_DIR is optional. If omitted, the app will try to use web/dist when that directory
exists.TAVILY_API_KEYS is convenient for bootstrapping, but long-term key lifecycle should be managed
through the admin UI or admin API.This is the shortest path:
That gives you:
/mcp and /api/tavily/* while validating the appUse this only for local development.
If there is no dedicated gateway, the simplest stable setup is the built-in admin login:
This is the minimum reliable self-hosted setup. The admin signs in through the browser, receives an
HttpOnly cookie session, and then uses /admin and the admin API from there.
If you already have a trusted reverse proxy or identity gateway, use ForwardAuth:
In that model, admin status is derived from the trusted identity header, not from a local cookie.
This is the recommended production model.
There are only three things that really matter:
FORWARD_AUTH_HEADERFORWARD_AUTH_ADMIN_VALUEThe most common misunderstanding is this:
ADMIN_AUTH_FORWARD_ENABLED=true is the defaultFORWARD_AUTH_HEADER is not configured, that does not magically create admin accessIn other words, “the switch is on” does not mean “ForwardAuth integration is complete”.
The built-in admin login is a good fit for:
Required rule:
ADMIN_AUTH_BUILTIN_ENABLED=trueADMIN_AUTH_BUILTIN_PASSWORD or ADMIN_AUTH_BUILTIN_PASSWORD_HASHRecommended rule:
ADMIN_AUTH_BUILTIN_PASSWORD_HASHADMIN_AUTH_BUILTIN_PASSWORD around long-termGenerate a hash like this:
DEV_OPEN_ADMINThis is the development shortcut:
It does two things:
/mcp and /api/tavily/* when you are still wiring up the
real auth pathDo not treat it as a production-grade access model.
Linux DO OAuth is only for end-user sign-in. It is not an admin-auth mechanism.
Enable it when you want end users to log in through the web UI and automatically reuse their bound Hikari token:
Those three values are required together:
LINUXDO_OAUTH_CLIENT_IDLINUXDO_OAUTH_CLIENT_SECRETLINUXDO_OAUTH_REDIRECT_URLOther OAuth settings already have defaults and only matter when you need to override provider endpoints:
LINUXDO_OAUTH_AUTHORIZE_URLLINUXDO_OAUTH_TOKEN_URLLINUXDO_OAUTH_USERINFO_URLLINUXDO_OAUTH_SCOPESession tuning is also available:
USER_SESSION_MAX_AGE_SECSOAUTH_LOGIN_STATE_TTL_SECSIf Linux DO OAuth stays disabled, admins can still issue tokens manually for downstream clients.
This distinction matters:
/api/tavily/* uses Hikari tokens/mcp also uses Hikari tokensThe Hikari token format is:
That is the token you should hand to:
Do not hand raw Tavily API keys to those downstream consumers.
Most deployments do not need these immediately, but they are part of the supported runtime contract:
| Flag / Env | Purpose |
|---|---|
XRAY_BINARY |
Xray binary path for share-link based forward proxies |
XRAY_RUNTIME_DIR |
Xray runtime directory |
API_KEY_IP_GEO_ORIGIN |
origin for API key registration IP geo lookup |
ADMIN_MODE_NAME |
override the displayed admin-mode name |
FORWARD_AUTH_NICKNAME_HEADER |
display nickname passed through the gateway |
ADMIN_AUTH_BUILTIN_PASSWORD |
legacy plaintext built-in admin password, still supported but not preferred |
If your goal is local development, straightforward self-hosting, or a standard gateway deployment, you usually do not need these first.
If you only want the shortest correct answer:
DEV_OPEN_ADMIN=trueADMIN_AUTH_BUILTIN_ENABLED=true + ADMIN_AUTH_BUILTIN_PASSWORD_HASHADMIN_AUTH_FORWARD_ENABLED=true + FORWARD_AUTH_HEADER + FORWARD_AUTH_ADMIN_VALUELINUXDO_OAUTH_ENABLED=trueth-<id>-<secret>, never raw Tavily API keys