Skip to content

Improve Docker run documentation with persistent volumes and .env clarification#18

Merged
BillJr99 merged 3 commits into
mainfrom
claude/vibrant-mendel-YeVB4
May 31, 2026
Merged

Improve Docker run documentation with persistent volumes and .env clarification#18
BillJr99 merged 3 commits into
mainfrom
claude/vibrant-mendel-YeVB4

Conversation

@BillJr99

Copy link
Copy Markdown
Owner

Summary

This PR significantly expands and clarifies the Docker deployment documentation, particularly around persistent storage volumes and the dual-purpose .env file configuration. The changes provide users with a more complete, production-ready command and better explain the reasoning behind each flag.

Key Changes

  • Updated recommended Docker run command to include named cache volumes (mcpproxy-files, mcpproxy-repos, mcpproxy-cache, mcpproxy-npm, mcpproxy-uv-tools, mcpproxy-mcp-auth) for better persistence across container restarts
  • Removed -e MCP_ENV_FILE=/app/.env from the command since the image already defaults to this value
  • Added --rm flag to automatically clean up stopped containers
  • Created detailed .env configuration table explaining the two different ways the .env file is referenced and why each is necessary:
    • --env-file for Docker to inject environment variables at startup
    • -v mount for the proxy and web UI to read/write the file live
  • Added comprehensive notes section covering:
    • How host vs. container paths work in both flags
    • Why the file must exist beforehand
    • Why $HOME is used instead of ~
    • When to explicitly set MCP_ENV_FILE
  • Added explanation of the mcpproxy-mcp-auth volume for OAuth token persistence and callback port mapping guidance

Notable Details

  • The documentation now clearly distinguishes between the two roles of .env: environment variable injection vs. live file access
  • Provides practical guidance on which volumes are optional and how they fall back to ephemeral storage
  • Emphasizes this is the "recommended day-to-day command" combining persistent home directory with named cache volumes

https://claude.ai/code/session_01BgJ5hooXNfxc2SKQVir2nf

claude added 3 commits May 31, 2026 11:57
Combine the persistent home-directory example with the named cache volumes
to match common usage, and add a table explaining why .env is referenced
twice (--env-file injects vars; -v mounts the file for MCP_ENV_FILE and the
Secrets UI). Note both flags take the local host path, that the file must
exist, and that MCP_ENV_FILE already defaults to /app/.env in the image.
Keep the container around across stops/reboots; the named volumes already
handle persistence. MCP_ENV_FILE need not be passed explicitly since the
image defaults it to /app/.env.
Include -e MCP_ENV_FILE=/app/.env in the recommended run command so users
know the setting exists, and note that it's optional since the image
already defaults it.
@BillJr99 BillJr99 merged commit ef0a44f into main May 31, 2026
2 checks passed
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.

2 participants