Container Base Image Plan 2
Scope: Deploy the Debian-slim build to Railway as a completely separate, parallel project with its own services, volumes, and environment. Validate all MCP servers and functionality end-to-end on the new infrastructure. Prior plan: Container Base Image Plan 1
Task 1 — Create a new Railway project for the Debian-slim build
Requirement R6: both builds must run simultaneously during migration. The new build gets its own Railway project — completely separated from the existing
uvilo-libre-chatproject. This ensures clean isolation: no shared services, no cross-contamination, no risk to the existing deployment.
The existing Railway project is uvilo-libre-chat (ID: c1dc2ebe-2cd0-4bd2-a327-c0d1be1a8616). Do NOT modify this project in any way.
- Create a new Railway project (e.g.,
uvilo-libre-chat-v2or similar) - Create a new LibreChat service in the new project:
- Use the custom image:
ghcr.io/erikdakoda/librechat-git:debian-slim(the image built in Plan 1) - Set the custom start command:
/bin/bash /workspace/startup.sh
- Use the custom image:
- Provision a NEW persistent volume (5GB) for the new LibreChat service, mounted at
/workspace- Do NOT reuse or share the existing Alpine deployment’s volume
- Set all environment variables for the new service (duplicate from the existing Alpine service):
- LLM API keys: OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_KEY, OPENROUTER_KEY
- Service tokens: SUPRSEND_SERVICE_TOKEN, RAILWAY_API_TOKEN, etc.
- Infrastructure: MONGO_URI, MEILI_HOST, MEILI_MASTER_KEY
- Git credentials: GITHUB_TOKEN, GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL
- Auth: CREDS_KEY, CREDS_IV, JWT_SECRET, JWT_REFRESH_SECRET
- Email: EMAIL_HOST, EMAIL_USERNAME, EMAIL_PASSWORD
- Analytics: POSTHOG_API_KEY, etc.
- Create a new MongoDB service in the new project with its own volume
- Seed it with a dump from the existing MongoDB instance (use
mongodump/mongorestore) - Point the new LibreChat service’s
MONGO_URIto this new MongoDB instance
- Seed it with a dump from the existing MongoDB instance (use
- Create a new Meilisearch service in the new project with its own volume
- Point the new LibreChat service’s
MEILI_HOSTandMEILI_MASTER_KEYto this new instance
- Point the new LibreChat service’s
- If applicable, create new services for Rag API and VectoDB in the new project, each with their own volumes
- Assign a separate public URL (e.g.,
librechat-new.uvilo.aior Railway-generated URL) for testing - Deploy the new service and verify it starts without errors
Why a separate project?
- Clean separation: no shared state, no risk of one deployment affecting the other
- Independent lifecycle: can redeploy, restart, or tear down either project without affecting the other
- Dedicated volumes: no risk of volume conflicts or data corruption
- True parallel operation: both environments function concurrently and independently
Task 2 — Install Typesense on the new build
Requirement R6: the Typesense index must be transferred or rebuilt on the new build. Without Typesense, the uvilo-typesense MCP server cannot function, and all knowledge search capabilities are offline.
- Provision a new Typesense service in the Railway project (or install Typesense as a sidecar/container)
- Configure the Typesense API key and host in the new LibreChat service’s environment variables
- Transfer the existing Typesense index data (snapshot/export from the current Alpine deployment) or rebuild the index from scratch
- Verify the uvilo-typesense MCP server can connect and return search results
- Record the service details (host, port, API key) in the State document
Task 3 — Validate all MCP servers on the new build
Requirement R1: all MCP servers must work without musl-specific workarounds. This is the core validation. Test each MCP server configured in
librechat.yamlon the new Debian-slim build.
-
Access the new build via its test URL
-
For each MCP server in
Forge/Configs/LibreChat_Service/librechat.yaml, verify it starts and responds to a basic tool call:MCP Server Command Validation uvilo-filesystem npx -y @modelcontextprotocol/server-filesystem /workspace/erik/uvilo-osList a file uvilo-git uvx mcp-server-git --repository /workspace/erik/uvilo-osRun git status uvilo-git-remote uvx --with mcp python3 /workspace/uvilo-git-push.pyList branches vercel npx vercel-mcpList deployments uvilo-shell uvx --with mcp python3 .../uvilo-shell.pyRun echo hellouvilo-typesense uvx --with mcp python3 .../typesense-mcp.pySearch knowledge uvilo-trash (uvilo-trash.py) List trash suprsend-dev/staging/prod python3 .../suprsend-mcp-proxy.pyList templates Playwright mcr.microsoft.com/playwright/mcpNavigate to a URL context7 npx -y @upstash/context7-mcp@latestResolve a library notion npx -y @notionhq/notion-mcp-serverSearch pages linear npx -y @touchlab/linear-mcp-integrationList issues railway npx -y @jasontanswe/railway-mcpList services posthog npx -y mcp-remote@latest ...List insights neon npx -y mcp-remote@latest ...List databases -
If any server fails, debug and fix (likely causes: missing system deps, path differences between Alpine and Debian)
-
Record results in the State document
Task 4 — Validate Forge scripts and full functionality
Requirement R5: no regression in existing LibreChat functionality or Forge scripts.
- Verify Forge startup script completes successfully on the new build (check container logs)
- Verify git operations work: clone, pull, push (test with the uvilo-git-remote MCP)
- Verify Python scripts run:
uvx --with mcp python3works for all custom MCP servers - Verify the Typesense search index is accessible and returns results
- Verify chat functionality: send a message, receive a response, test artifact generation
- Verify file operations via uvilo-filesystem: read, write, search files
- Verify Playwright MCP: navigate to a URL and take a snapshot
- Compare behavior with the existing Alpine build — there should be no functional differences
Task 5 — Ask Erik to validate the new configuration
Before proceeding to DNS cutover, Erik must validate that the new Debian-slim deployment works correctly end-to-end. This is a hard gate — Plan 3 (DNS cutover) must not begin until Erik explicitly approves.
- Present Erik with a summary of the validation results from Tasks 3 and 4
- Provide the test URL for the new build so Erik can test it himself
- List any known issues or differences from the Alpine build
- Wait for Erik’s explicit approval before proceeding to Plan 3
- If Erik finds issues, create a fix task list and resolve them before re-requesting approval