Skip to content

fix(docker): remove fallback credentials from the LiteLLM compose profile - #598

Open
carfeii wants to merge 1 commit into
AsyncFuncAI:mainfrom
carfeii:fix/litellm-compose-default-credentials
Open

carfeii wants to merge 1 commit into
AsyncFuncAI:mainfrom
carfeii:fix/litellm-compose-default-credentials

Conversation

@carfeii

@carfeii carfeii commented Oct 5, 2026

Copy link
Copy Markdown

docker-compose-litellm.yml fell back to the fixed, documented credentials litellm_password and sk-1234 for PostgreSQL and the LiteLLM master key whenever LITELLM_DB_PASSWORD/LITELLM_MASTER_KEY were not set, while also publishing both services' ports to the host. An operator who started this profile without an override exposed a database and an LLM-proxy admin API with publicly known credentials.

Requires both secrets (compose now fails startup with a clear message if either is missing) and binds both ports to loopback only, since they are for local inspection, not for the litellm/deepwiki containers (which reach each other over the compose network) or the public internet. litellm-config.yml now reads the database URL from the DATABASE_URL env var built from the same required secret, instead of repeating a hardcoded credential.

Test plan

  • docker compose -f docker-compose-litellm.yml config: fails with a clear error when the secrets are unset.
  • Same command with LITELLM_DB_PASSWORD/LITELLM_MASTER_KEY set: resolves correctly, including the loopback port bindings and the built DATABASE_URL.

…file

docker-compose-litellm.yml fell back to the fixed, documented
credentials litellm_password and sk-1234 for PostgreSQL and the
LiteLLM master key whenever LITELLM_DB_PASSWORD/LITELLM_MASTER_KEY were
not set, while also publishing both services' ports to the host. An
operator who started this profile without an override exposed a
database and an LLM-proxy admin API with publicly known credentials.

Require both secrets (compose now fails startup with a clear message
if either is missing) and bind both ports to loopback only, since they
are for local inspection, not for the litellm/deepwiki containers
(which reach each other over the compose network) or the public
internet. litellm-config.yml now reads the database URL from the
DATABASE_URL env var built from the same required secret, instead of
repeating a hardcoded credential.

Validated with : fails with a clear error when
the secrets are unset, and resolves correctly (including the loopback
port bindings) once they are provided.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant