Skip to main content
LibreChat runs on Sevalla as three applications from official Docker images: 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 the librechat application: The 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 version prints 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

Every image is pinned to a release, so a redeployment never pulls a newer version. A process with a disk runs 1 instance, and Sevalla stops it before it starts the new one on each deployment: in the tests, LibreChat answered 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:
1

Create the application

In the sidebar, click Applications, then click Create > Application. Under Source, click Docker image and enter 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.
2

Add the variables

Click the Environment variables tab, then Add environment variables. Add MONGO_INITDB_ROOT_USERNAME with the value librechat, and MONGO_INITDB_ROOT_PASSWORD with the password you generated, then click Add environment variables.
3

Set the port and turn HTTP traffic off

Click the Networking tab. In Expose HTTP traffic, click Update port, enter 27017 and click Update port. Then click Disable, and Disable HTTP in the dialog.
4

Add the disk

Click the Disks tab, then Create disk. Keep the web process, enter /data/db as the Path, choose 10 GB and click Create disk.
5

Deploy

Click the Overview tab, then click Deploy now under Recent deployments, and Deploy.
MongoDB has no HTTP endpoint for a readiness probe, so the deployment finishes when the container starts. The runtime logs show Waiting for connections when it accepts connections. To check the user, open the application’s Web terminal tab and run:
It prints 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:
1

Create the application

Click Applications, then click Create > Application. Under Source, click Docker image and enter 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.
2

Add the disk

Click the Disks tab, then Create disk. Keep the web process, enter /app/uploads as the Path, choose 10 GB and click Create disk.
3

Connect MongoDB

Click the Networking tab. Under Connected services, click Add internal connection, choose librechat-mongodb as the Service, and click Add internal connection.
4

Add the environment variables

Click the Environment variables tab, then click Add environment variables. Paste the lines that follow these steps into the first key field, replace the values with yours, and click Add environment variables.
5

Set the start command and the readiness probe

Click the Processes tab, click ⋯ on the web process, then click Update process. Enter the Custom start command that follows these steps. Under Health checks, turn on Readiness probe, enter the Path /readyz, the Initial delay 10 and the Timeout 5, keep the Port at 8080, then click Update process.
6

Deploy

Click the Overview tab, click Deploy now, then click Deploy.
.env
Custom start command
In the tests, LibreChat used about 1 GB of memory right after it started (987 MB on S1, 1,031 MB on S2) and about 650 MB once idle. S1 has 1 GB, so use S2 (1 vCPU, 2 GB). MongoDB used up to 362 MB and Meilisearch up to 147 MB on S1.

Create the admin account

With ALLOW_REGISTRATION=false, LibreChat has no sign-up page, so you create accounts with its create-user script. The first account becomes the admin.
1

Open the web terminal

On the librechat application, click the Web terminal tab.
2

Create the account

Run the script with an email address, a display name and a username:
Enter a password when the script asks for it, and y when it asks whether the email is verified. It prints User created successfully!.

Verify the deployment

  1. On the Deployments tab, the deployment’s status is Deployed. With the API, Get deployment (getDeploymentV3) returns "status": "success".
  2. The runtime logs show Connected to MongoDB and Server listening on all interfaces at port 8080. Use http://localhost:8080 to access it.
  3. The readiness endpoint answers:
  4. Sign-up is off:
  5. 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.
The runtime logs also show 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

1

Turn off thinking

In the left sidebar, click Parameters and turn off Thinking.
2

Send a message

Type a question in Message Claude and press Enter. The answer appears word by word as Claude writes it.
LibreChat 0.8.8 turns Thinking on by default and sends it to 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

Keep ALLOW_REGISTRATION=false and create an account for each person in the Web terminal, the same way as the admin’s:
Accounts after the first have the User role. To let people create their own accounts instead, set 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 the librechat-mongodb application’s Web terminal:
The archive is on the disk at /data/db/librechat.archive. Search in the conversation list needs Meilisearch. It runs as one more private application with a disk. Generate its master key:
1

Create the application

Click Applications, then Create > Application. Under Source, click Docker image and enter getmeili/meilisearch:v1.35.1. Enter librechat-meilisearch as the Name, choose the same Data center and the S1 size, and click Create application.
2

Add the variables

On the Environment variables tab, add MEILI_MASTER_KEY with the key you generated, MEILI_ENV with production, and MEILI_NO_ANALYTICS with true.
3

Set the port and turn HTTP traffic off

On the Networking tab, in Expose HTTP traffic, click Update port, enter 7700 and click Update port. Then click Disable, and Disable HTTP.
4

Add the disk and the probe

On the Disks tab, create a 10 GB disk with the Path /meili_data. On the Processes tab, update the web process: turn on Readiness probe with the Path /health and the Port 7700.
5

Deploy

Click the Overview tab, click Deploy now, then click Deploy.
6

Connect LibreChat

On the 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.
Meilisearch logs 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:
Dockerfile
librechat.yaml
.dockerignore
Commit and push the three files. Then point the librechat application at the repository:
1

Change the source

On the application’s Settings tab, in the Source section, click Update source. Click Private repository, choose the Git provider and the repository, and click Update source.
2

Choose the Dockerfile build strategy

In the Build strategy section, click Update build strategy. Click Dockerfile, keep the Dockerfile path Dockerfile and the Docker context ., then click Update build strategy.
3

Remove the custom start command

On the Processes tab, click ⋯ on the web process, then Update process. Clear the Custom start command, so the image’s CMD runs, and click Update process.
4

Deploy

Click the Overview tab, click Deploy now, pick the branch, then click Deploy.
The build log shows 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

  1. Read the release notes of every version between yours and the new one on LibreChat’s GitHub releases, including the librechat.yaml version changes.
  2. Back up the database with mongodump, as in Keep the data.
  3. On the librechat application’s Settings tab, in the Source section, click Update source, change the tag in Docker image (or the FROM line of your Dockerfile), and save.
  4. Deploy.
Upgrade MongoDB and Meilisearch only to versions that LibreChat’s Docker Compose files use, and back up MongoDB first. Meilisearch holds only an index: if you replace its disk, LibreChat indexes the conversations again at its next start.

Add a custom domain

To serve LibreChat from your own domain, such as chat.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 in ANTHROPIC_API_KEY.
  • curl, jq and openssl.
The images are public, so no Git provider needs to be connected. The steps create 2 applications, 3 with search; the API allows 20 service creations per hour per company.
1

Choose the location and sizes

List clusters (listClustersV3), List process resource types (listProcessResourceTypesV3) and List disk resource types (listDiskResourceTypesV3). Pick the location by its region ID, here Frankfurt:
CLI: sevalla resources clusters, sevalla resources process-types and sevalla resources disk-types. MCP: get_platform_options, and sevalla_api_read with listDiskResourceTypesV3.
2

Create the MongoDB application

Create 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:
CLI: 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.
3

Set the port, turn HTTP off and add the disk

Update process (updateProcessV3); is_ingress_enabled: false is the dashboard’s Disable HTTP. Then Attach or update process disk (updateProcessDiskV3):
CLI: 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.
4

Add MongoDB's variables

Create environment variable (createEnvironmentVariableV3), once per variable. Keep MONGO_PASSWORD: LibreChat’s connection URL needs it:
Each call prints the key it added. CLI: sevalla apps env-vars create $MONGO_APP_ID --key MONGO_INITDB_ROOT_USERNAME --value librechat. MCP: set_environment_variables.
5

Deploy MongoDB

Trigger deployment (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:
If it fails, Get application deployment logs (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.
6

Check MongoDB

Run a command in a process (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:
CLI: sevalla apps processes exec $MONGO_WEB_ID --app-id $MONGO_APP_ID -- sh -c '...'. MCP: sevalla_api_create with execProcessCommandV3.
7

Create the LibreChat application

Create application (createApplicationV3), then List application domains (listApplicationDomainsV3) and List processes (listProcessesV3):
CLI: 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.
8

Set the size, start command and readiness probe

Update process (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:
CLI: 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.
9

Add the disk and connect MongoDB

Attach or update process disk (updateProcessDiskV3) and Create internal connection (createApplicationInternalConnectionV3), with target_type app for an application:
CLI: 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.
10

Add LibreChat's variables

Create environment variable (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.
11

Deploy LibreChat

The same deploy function, with Trigger deployment (triggerDeploymentV3) and Get deployment (getDeploymentV3):
CLI: sevalla apps deployments trigger $APP_ID. MCP: trigger_deployment, then get_deployment.
12

Create the admin account

Run a command in a process (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:
CLI: 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.
13

Check LibreChat

The readiness endpoint answers, the admin can sign in through LibreChat’s API, the model list holds the three Claude models, and sign-up is off:
CLI: sevalla apps logs runtime $APP_ID --search "Connected to MongoDB". MCP: search_runtime_logs.
Then open https://$APP_HOST, sign in as admin@example.com with ADMIN_PASSWORD, and chat with Claude.

Add search with the API

1

Create Meilisearch

Create application (createApplicationV3), then List processes (listProcessesV3):
CLI: sevalla apps create --name librechat-meilisearch --cluster $CLUSTER_ID --source dockerImage --docker-image getmeili/meilisearch:v1.35.1. MCP: create_application with deploy: false.
2

Configure and deploy it

Update process (updateProcessV3), Attach or update process disk (updateProcessDiskV3), Create environment variable (createEnvironmentVariableV3), then the deploy function:
CLI: 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.
3

Connect LibreChat and deploy it

Create internal connection (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:
CLI: 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 the Dockerfile, 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:
Send 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.