Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
RUST_LOGNoLogging level filter (e.g., RUST_LOG=docdexd=debug).
DOCDEX_CHROOTNo(Unix) Chroot into path before serving; repo/state paths must exist inside that jail.
DOCDEX_TLS_KEYNoServe HTTPS with the provided key file path.
DOCDEX_TLS_CERTNoServe HTTPS with the provided cert file path.
DOCDEX_ALLOW_IPSNoOptional comma-separated IPs/CIDRs allowed to reach the HTTP API (default: loopback-only in secure mode; allow all when secure mode is disabled).
DOCDEX_MAX_LIMITNoClamp HTTP limit to at most n (default: 8).
DOCDEX_STATE_DIRNoOverride index storage path (relative paths are resolved under repo).
DOCDEX_ACCESS_LOGNoEmit minimal structured access logs with query values redacted (default: true).
DOCDEX_AUTH_TOKENNoBearer token required in secure mode (default); omit only when starting with --secure-mode=false.
DOCDEX_RUN_AS_GIDNo(Unix) Drop privileges to the provided GID after startup prep.
DOCDEX_RUN_AS_UIDNo(Unix) Drop privileges to the provided UID after startup prep.
DOCDEX_REQUIRE_TLSNoDefault true. Enforce TLS for non-loopback binds; set to false when TLS is already terminated by a trusted proxy.
DOCDEX_SECURE_MODENoDefault true; when enabled, requires an auth token, loopback allowlist by default, and default rate limiting (60 req/min).
DOCDEX_UNSHARE_NETNo(Linux only) Unshare the network namespace before serving (requires CAP_SYS_ADMIN/root); no-op on other platforms.
DOCDEX_EXCLUDE_DIRSNoExtra directory names to skip anywhere in the tree (comma-separated).
DOCDEX_AUDIT_DISABLENoDisable audit logging entirely.
DOCDEX_DOWNLOAD_REPONoIf you publish from a fork, set DOCDEX_DOWNLOAD_REPO=<owner/repo> before installing so the downloader fetches your release assets.
DOCDEX_INSECURE_HTTPNoAllow plain HTTP on non-loopback binds even when TLS is enforced (only use behind a trusted proxy).
DOCDEX_AUDIT_LOG_PATHNoWrite audit log JSONL to this path (default: <state-dir>/audit.log).
DOCDEX_CERTBOT_DOMAINNoPoint TLS at /etc/letsencrypt/live/<domain>/{fullchain.pem,privkey.pem} (Certbot). Conflicts with manual --tls-*.
DOCDEX_AUDIT_MAX_BYTESNoRotate audit log after this many bytes (default: 5_000_000).
DOCDEX_AUDIT_MAX_FILESNoKeep at most this many rotated audit files (default: 5).
DOCDEX_MAX_QUERY_BYTESNoReject requests whose query string exceeds n bytes (default: 4096).
DOCDEX_MCP_MAX_RESULTSNoClamps docdex_search results (min 1).
DOCDEX_CERTBOT_LIVE_DIRNoUse a specific Certbot live dir containing fullchain.pem and privkey.pem.
DOCDEX_EXCLUDE_PREFIXESNoExtra relative prefixes to skip (comma-separated).
DOCDEX_RATE_LIMIT_BURSTNoOptional burst capacity for the rate limiter (defaults to per-minute limit when 0).
DOCDEX_MAX_REQUEST_BYTESNoReject requests whose Content-Length or size hint exceeds n bytes (default: 16384).
DOCDEX_RATE_LIMIT_PER_MINNoPer-IP request budget per minute (default 60 in secure mode when unset/0; 0 disables when secure mode is off).
DOCDEX_STRIP_SNIPPET_HTMLNoOmit snippet.html in responses to force text-only snippets (HTML is sanitized by default when present).
DOCDEX_DISABLE_SNIPPET_TEXTNoOmit snippet text/html in responses entirely (only doc metadata is returned).

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bekirdag/docdex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server