librechat/librechat serves the chat interface and its API from the web process, MongoDB keeps users, conversations and file records, and Meilisearch, which you add for conversation search, indexes messages. MongoDB isn’t a Sevalla managed database, so it runs as a private application with a disk, like Meilisearch: neither has HTTP traffic, and LibreChat reaches both over internal connections. Claude answers through your Anthropic API key, files that people attach are stored on LibreChat’s disk, and only the accounts you create can sign in.
At a glance
Environment variables
These are the variables of thelibrechat application:
librechat-mongodb application needs MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD, and librechat-meilisearch needs MEILI_MASTER_KEY, MEILI_ENV and MEILI_NO_ANALYTICS: see Run MongoDB as a private application and Add conversation search. An application from a Docker image has no build, so every variable is a runtime variable.
Before you begin
- A Sevalla company with a payment method: LibreChat needs the S2 size.
- OpenSSL on your computer, to generate the passwords and keys (
openssl versionprints its version). - An API key from Anthropic. Set a spending limit in Anthropic’s console: every account you create in LibreChat spends from this key.
How LibreChat runs on Sevalla
503 for about 15 seconds during a deployment, and MongoDB was back about 25 seconds after its deployment started.
Run MongoDB as a private application
Generate the database password first. A hexadecimal password keeps characters that would break LibreChat’s connection URL out of it:Create the application
mongo:8.0.34. Keep None (public image) as the Registry credential. Enter librechat-mongodb as the Name, choose a Data center and the S1 size, then click Create application.Add the variables
MONGO_INITDB_ROOT_USERNAME with the value librechat, and MONGO_INITDB_ROOT_PASSWORD with the password you generated, then click Add environment variables.Set the port and turn HTTP traffic off
27017 and click Update port. Then click Disable, and Disable HTTP in the dialog.Add the disk
/data/db as the Path, choose 10 GB and click Create disk.Deploy
Waiting for connections when it accepts connections. To check the user, open the application’s Web terminal tab and run:
8.0.34. The Networking tab lists the web process’s internal hostname, for example librechat-mongodb-k3j4h-web.librechat-mongodb-k3j4h.svc.cluster.local: LibreChat’s MONGO_URI needs it.
Deploy LibreChat
Generate the keys on your computer, and store them in your password manager:Create the application
librechat/librechat:v0.8.8. Keep None (public image) as the Registry credential. Enter librechat as the Name, choose MongoDB’s Data center and the S2 size, then click Create application. Don’t deploy yet. Note the domain under the name, for example librechat-x7k2m.sevalla.app.Add the disk
/app/uploads as the Path, choose 10 GB and click Create disk.Connect MongoDB
librechat-mongodb as the Service, and click Add internal connection.Add the environment variables
Set the start command and the readiness probe
/readyz, the Initial delay 10 and the Timeout 5, keep the Port at 8080, then click Update process.Deploy
Create the admin account
WithALLOW_REGISTRATION=false, LibreChat has no sign-up page, so you create accounts with its create-user script. The first account becomes the admin.
Open the web terminal
librechat application, click the Web terminal tab.Create the account
y when it asks whether the email is verified. It prints User created successfully!.Verify the deployment
-
On the Deployments tab, the deployment’s status is Deployed. With the API, Get deployment (
getDeploymentV3) returns"status": "success". -
The runtime logs show
Connected to MongoDBandServer listening on all interfaces at port 8080. Use http://localhost:8080 to access it. -
The readiness endpoint answers:
-
Sign-up is off:
-
Open the domain. LibreChat shows Welcome back with no sign-up link. Sign in with the admin account: the model menu at the top shows
claude-haiku-5-5.
Config file YAML format is invalid: ENOENT: no such file or directory, open '/app/librechat.yaml' at every start. LibreChat runs on its defaults without that file; Deploy with a Dockerfile adds one.
Chat with Claude
Turn off thinking
Send a message
claude-haiku-5-5 in the format older models use, which this model rejects. With Thinking on, the answer is an error that contains "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior. To reuse the setting in later chats, click Save As Preset. To make Thinking off the default for everyone, use the librechat.yaml in Deploy with a Dockerfile. claude-sonnet-5-5 and claude-opus-5-5 work with Thinking on, and cost more per message.
Answers stream to the browser as Server-Sent Events: LibreChat’s stream endpoint answers with Content-Type: text/event-stream and Cache-Control: no-cache, no-transform, and Cloudflare and Sevalla’s proxy pass the events through without buffering. In the test, a five-sentence answer arrived in 78 pieces, the first 1.3 s after the message was sent and the last after 2.6 s.
Upload files
Click Attach Files (the paperclip) in the message box, choose Upload to Provider, and pick a PDF or an image. LibreChat sends the file to Claude with your message, and Claude answers from it. In the test, Claude answered a question about a one-page PDF with the right figures and a citation of the line it used. LibreChat stores each file on the disk: documents in/app/uploads/<user ID>/ and images in /app/uploads/images/<user ID>/, through the start command’s link. It also keeps them for the rest of the conversation: after redeploying both LibreChat and MongoDB, a follow-up question in the same conversation got an answer from the PDF again. Without the disk, files uploaded before a deployment are gone.
Let other people sign in
KeepALLOW_REGISTRATION=false and create an account for each person in the Web terminal, the same way as the admin’s:
ALLOW_REGISTRATION to true and deploy: Sign up appears on the sign-in page, and anyone who can open the domain can create an account. Turn it off again when everyone has one.
As the admin, you choose what the User role can do: in the left sidebar, open Prompts or Memories, click Admin Settings, choose the Role User, change the switches, and click Save.
Keep the data
Users, conversations and file records are in MongoDB on its disk; uploaded files are on LibreChat’s disk. In the tests, both survived a redeployment of each application, and LibreChat reconnected to MongoDB on its own. Sevalla backs up disks every day. For a copy you can restore elsewhere, export the database in thelibrechat-mongodb application’s Web terminal:
/data/db/librechat.archive.
Add conversation search
Search in the conversation list needs Meilisearch. It runs as one more private application with a disk. Generate its master key:Create the application
getmeili/meilisearch:v1.35.1. Enter librechat-meilisearch as the Name, choose the same Data center and the S1 size, and click Create application.Add the variables
MEILI_MASTER_KEY with the key you generated, MEILI_ENV with production, and MEILI_NO_ANALYTICS with true.Set the port and turn HTTP traffic off
7700 and click Update port. Then click Disable, and Disable HTTP.Add the disk and the probe
/meili_data. On the Processes tab, update the web process: turn on Readiness probe with the Path /health and the Port 7700.Deploy
Connect LibreChat
librechat application’s Networking tab, add an internal connection to librechat-meilisearch. On its Environment variables tab, add SEARCH with true, MEILI_HOST with http:// plus Meilisearch’s internal hostname plus :7700, for example http://librechat-meilisearch-r8t2n-web.librechat-meilisearch-r8t2n.svc.cluster.local:7700, and MEILI_MASTER_KEY with the same key. Then deploy librechat.Environment: "production" and A master key has been set. Requests to Meilisearch won't be authorized unless you provide an authentication key. when it starts. After LibreChat’s next start, its runtime logs show [syncWithMeili] Completed sync for conversations.: LibreChat indexes the conversations that existed before search was on, then each new message. The search box appears above the conversation list.
Deploy with a Dockerfile
LibreChat needs no build: the official image runs as it is. A Dockerfile is for settings that only LibreChat’s configuration file,librechat.yaml, can change, such as a default model with Thinking off for everyone, and it moves the images link into the image, so the web process needs no custom start command. Add these files to the root of a repository:
librechat application at the repository:
Change the source
Choose the Dockerfile build strategy
Dockerfile and the Docker context ., then click Update build strategy.Remove the custom start command
CMD runs, and click Update process.Deploy
Building and pushing docker image using Dockerfile..., and the deployment’s Dockerfile tab shows the file. In the tests, a deployment from the Dockerfile took 2 to 4 minutes, most of it pulling the 980 MB base image; after a change to librechat.yaml, the RUN layer came from the cache. The runtime logs no longer show the ENOENT line for librechat.yaml, and the model menu shows Claude Haiku 5.5. The checks in Verify the deployment answer the same way.
Upgrade LibreChat
- Read the release notes of every version between yours and the new one on LibreChat’s GitHub releases, including the
librechat.yamlversion changes. - Back up the database with
mongodump, as in Keep the data. - On the
librechatapplication’s Settings tab, in the Source section, click Update source, change the tag in Docker image (or theFROMline of yourDockerfile), and save. - Deploy.
Add a custom domain
To serve LibreChat from your own domain, such aschat.example.com, add it on the librechat application’s Domains tab and create the DNS records Sevalla shows; the web process must be larger than H1, which S2 is. Then change DOMAIN_CLIENT and DOMAIN_SERVER to https://chat.example.com and deploy. See Custom domains.
Troubleshoot
Deploy with the API
These calls create the same deployment without the dashboard: MongoDB, LibreChat with its disk, variables, start command and readiness probe, the first deployment and the admin account. They need:- An API key that can create applications, in
SEVALLA_API_KEY, and your Anthropic key inANTHROPIC_API_KEY. curl,jqandopenssl.
Choose the location and sizes
listClustersV3), List process resource types (listProcessResourceTypesV3) and List disk resource types (listDiskResourceTypesV3). Pick the location by its region ID, here Frankfurt:sevalla resources clusters, sevalla resources process-types and sevalla resources disk-types. MCP: get_platform_options, and sevalla_api_read with listDiskResourceTypesV3.Create the MongoDB application
createApplicationV3) with the Docker image source, then List processes (listProcessesV3) for its web process and internal hostname. The API creates the web process at S1:sevalla apps create --name librechat-mongodb --cluster $CLUSTER_ID --source dockerImage --docker-image mongo:8.0.34. MCP: create_application with deploy: false, then get_application.Set the port, turn HTTP off and add the disk
updateProcessV3); is_ingress_enabled: false is the dashboard’s Disable HTTP. Then Attach or update process disk (updateProcessDiskV3):sevalla apps processes disk update $MONGO_WEB_ID --app-id $MONGO_APP_ID --resource-type $DISK_10GB --mount-path /data/db; the CLI can’t set the port or turn HTTP off. MCP: sevalla_api_update with updateProcessV3 and updateProcessDiskV3.Add MongoDB's variables
createEnvironmentVariableV3), once per variable. Keep MONGO_PASSWORD: LibreChat’s connection URL needs it:sevalla apps env-vars create $MONGO_APP_ID --key MONGO_INITDB_ROOT_USERNAME --value librechat. MCP: set_environment_variables.Deploy MongoDB
triggerDeploymentV3), then Get deployment (getDeploymentV3) until status is final (success, failed, cancelled or skipped), for up to 30 minutes. The deploy function deploys LibreChat later too:getApplicationDeploymentLogsV3) with ?limit=5000 returns the whole log. CLI: sevalla apps deployments trigger $MONGO_APP_ID, then sevalla apps deployments get $DEPLOYMENT_ID --app-id $MONGO_APP_ID. MCP: trigger_deployment, then get_deployment.Check MongoDB
execProcessCommandV3) runs mongosh in the container with the image’s variables. MongoDB has no readiness probe, so the deployment can finish a few seconds before it accepts connections: on the first start, the image restarts MongoDB once after it creates the user. The loop tries for up to 1 minute:sevalla apps processes exec $MONGO_WEB_ID --app-id $MONGO_APP_ID -- sh -c '...'. MCP: sevalla_api_create with execProcessCommandV3.Create the LibreChat application
createApplicationV3), then List application domains (listApplicationDomainsV3) and List processes (listProcessesV3):sevalla apps create --name librechat --cluster $CLUSTER_ID --source dockerImage --docker-image librechat/librechat:v0.8.8. MCP: create_application with deploy: false, then get_application.Set the size, start command and readiness probe
updateProcessV3). The API creates the web process at S1, which is too small. Always send timeoutSeconds: without it, the probe gets 120 seconds instead of the dashboard’s 1:sevalla apps processes update $WEB_ID --app-id $APP_ID --resource-type $S2 --command "<the start command>" (the CLI can’t set a probe). MCP: sevalla_api_update with updateProcessV3 and the same body.Add the disk and connect MongoDB
updateProcessDiskV3) and Create internal connection (createApplicationInternalConnectionV3), with target_type app for an application:sevalla apps processes disk update $WEB_ID --app-id $APP_ID --resource-type $DISK_10GB --mount-path /app/uploads and sevalla apps internal-connections create $APP_ID --target-id $MONGO_APP_ID --target-type app. MCP: sevalla_api_update with updateProcessDiskV3, and sevalla_api_create with createApplicationInternalConnectionV3.Add LibreChat's variables
createEnvironmentVariableV3), with the add_var function from before. Store the four generated keys somewhere safe if you need them again; they stay readable on the Environment variables tab:TRUST_PROXY is 2 in OCI locations such as Frankfurt; use 3 in Google Cloud locations. CLI: sevalla apps env-vars create $APP_ID --key ENDPOINTS --value anthropic, once per variable; the CLI makes each variable available during runtime and build, which makes no difference for an image. MCP: set_environment_variables.Deploy LibreChat
deploy function, with Trigger deployment (triggerDeploymentV3) and Get deployment (getDeploymentV3):sevalla apps deployments trigger $APP_ID. MCP: trigger_deployment, then get_deployment.Create the admin account
execProcessCommandV3) runs LibreChat’s create-user script. The password is part of the command, and the script warns password passed in as argument, this is not secure!; keep ADMIN_PASSWORD:sevalla apps processes exec $WEB_ID --app-id $APP_ID -- npm run create-user -- admin@example.com Admin admin "$ADMIN_PASSWORD" --email-verified=true. MCP: sevalla_api_create with execProcessCommandV3.Check LibreChat
sevalla apps logs runtime $APP_ID --search "Connected to MongoDB". MCP: search_runtime_logs.https://$APP_HOST, sign in as admin@example.com with ADMIN_PASSWORD, and chat with Claude.
Add search with the API
Create Meilisearch
createApplicationV3), then List processes (listProcessesV3):sevalla apps create --name librechat-meilisearch --cluster $CLUSTER_ID --source dockerImage --docker-image getmeili/meilisearch:v1.35.1. MCP: create_application with deploy: false.Configure and deploy it
updateProcessV3), Attach or update process disk (updateProcessDiskV3), Create environment variable (createEnvironmentVariableV3), then the deploy function:sevalla apps env-vars create once per variable, then sevalla apps deployments trigger $MEILI_APP_ID. MCP: sevalla_api_update, set_environment_variables and trigger_deployment.Connect LibreChat and deploy it
createApplicationInternalConnectionV3), the three search variables, and a deployment of LibreChat. Get application runtime logs (getApplicationRuntimeLogsV3) shows the first sync, and LibreChat’s API reports search as on:sevalla apps internal-connections create $APP_ID --target-id $MEILI_APP_ID --target-type app. MCP: sevalla_api_create with createApplicationInternalConnectionV3.Build from the Dockerfile with the API
With theDockerfile, librechat.yaml and .dockerignore from Deploy with a Dockerfile pushed to a repository on a connected Git provider, Update application (updateApplicationV3) switches the source and the build strategy, and Update process (updateProcessV3) clears the custom start command so the image’s CMD runs:
default_branch in its own call: in the tests, it was ignored in the same call that changed the source. Without access to the repository, the first call answers 400 with Cannot access repository. CLI: sevalla apps update $APP_ID --data '{"build_type":"dockerfile","dockerfile_path":"Dockerfile","docker_context":"."}'. MCP: sevalla_api_update with updateApplicationV3.