---
title: How to Deploy LibreChat – Open-Source AI Chat Platform
url: https://docs.vultr.com/how-to-deploy-librechat-open-source-ai-chat-platform
description: Deploy LibreChat with Docker Compose, HTTPS, Traefik reverse proxy, and multi-provider AI chat support.
publish_date: 2026-05-07T14:26:34.631854Z
last_updated: 2026-09-11T16:39:48.844780Z
author: Shivang Shandilya
header_image: https://assets.vultrdevrel.com/docs-main-doc-assets-1/2582/a7e39f8a-73ab-4f09-9a73-d3003650737c.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

[LibreChat](https://www.librechat.ai/) is an open-source chat interface that connects to language model APIs from providers such as OpenAI, Anthropic, Google, and Ollama. It stores conversation history, supports multiple user accounts, and provides a single interface for switching between models and providers.

This article explains how to deploy LibreChat on a Linux server using Docker Compose with a Traefik reverse proxy that provisions a Let's Encrypt TLS certificate and exposes the interface over HTTPS.

## Prerequisites

Before you begin, you need to:

* Have access to a [Linux-based server](https://docs.vultr.com/products/compute/cloud-compute/provisioning) as a [non-root user with sudo privileges](https://docs.vultr.com/how-to-create-a-sudo-user-in-linux).
* [Install Docker and Docker Compose](https://docs.vultr.com/how-to-install-docker-on-ubuntu-24-04).
* Create a [DNS A record](https://docs.vultr.com/products/network/dns/management/manage-records) pointing to your server's IP address (for example, `librechat.example.com`).

## Set Up the Directory Structure and Environment Variables

LibreChat's GitHub repository contains the Docker Compose configuration and default environment templates. The repository includes pre-configured services for MongoDB, Meilisearch, and vector database integration.

1. Clone the LibreChat repository.

    ```console
    $ git clone https://github.com/danny-avila/LibreChat.git
    ```

1. Navigate to the LibreChat directory.

    ```console
    $ cd LibreChat
    ```

1. Check out the latest stable release. Replace `v0.8.3` with the current version from the [LibreChat releases page](https://github.com/danny-avila/LibreChat/releases).

    ```console
    $ git checkout tags/v0.8.3
    ```

1. Find the Meilisearch data directory name used by this release.

    ```console
    $ grep -o 'meili_data_v[0-9.]*' docker-compose.yml | head -1
    ```

    The output is the directory name tied to the Meilisearch version pinned in this release. For this example, assume the output is `meili_data_v1.35.1`. Use the value returned by the command in the next two steps.

1. Create the required data directories for LibreChat services. Replace `meili_data_v1.35.1` with the value from the previous step if it differs.

    ```console
    $ mkdir -p data-node images logs meili_data_v1.35.1 uploads
    ```

    These directories store application data, search indexes, and uploaded files.

1. Assign ownership of the Meilisearch data directory to UID and GID `1000`. Meilisearch runs as a non-root user inside its container and requires write access to this directory. Replace `meili_data_v1.35.1` with the value from the earlier step if it differs.

    ```console
    $ sudo chown -R 1000:1000 meili_data_v1.35.1
    ```

1. Create a `.env` file from the included template.

    ```console
    $ cp .env.example .env
    ```

1. Open the `.env` file to set the user and group permissions. Without these values, Docker Compose logs ownership warnings on startup.

    ```console
    $ nano .env
    ```

1. Find and uncomment the following lines:

    ```ini
    UID=1000
    GID=1000
    ```

    Save and close the file.

## Deploy with Docker Compose

The Docker Compose override file extends the base LibreChat configuration with a Traefik service that handles TLS termination and routes HTTPS traffic to the LibreChat API container.

1. Create the Docker Compose override file.

    ```console
    $ nano docker-compose.override.yml
    ```

1. Replace `librechat.example.com` with your domain name and `admin@example.com` with your email address, then add the following configuration.

    ```yaml
    services:
      api:
        labels:
          - "traefik.enable=true"
          - "traefik.http.routers.librechat.rule=Host(`librechat.example.com`)"
          - "traefik.http.routers.librechat.entrypoints=websecure"
          - "traefik.http.routers.librechat.tls.certresolver=leresolver"
          - "traefik.http.services.librechat.loadbalancer.server.port=3080"
        volumes:
          - ./librechat.yaml:/app/librechat.yaml

      traefik:
        image: traefik:v3.6.10
        ports:
          - "80:80"
          - "443:443"
        volumes:
          - "/var/run/docker.sock:/var/run/docker.sock:ro"
          - "./letsencrypt:/letsencrypt"
        command:
          - "--providers.docker=true"
          - "--providers.docker.exposedbydefault=false"
          - "--entrypoints.web.address=:80"
          - "--entrypoints.websecure.address=:443"
          - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
          - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
          - "--entrypoints.web.http.redirections.entrypoint.permanent=true"
          - "--certificatesresolvers.leresolver.acme.httpchallenge=true"
          - "--certificatesresolvers.leresolver.acme.httpchallenge.entrypoint=web"
          - "--certificatesresolvers.leresolver.acme.email=admin@example.com"
          - "--certificatesresolvers.leresolver.acme.storage=/letsencrypt/acme.json"
    ```

    Save and close the file. The override file defines the following:

    * `api`: Extends the base LibreChat API service with Traefik routing labels and mounts `librechat.yaml` for additional configuration. The labels instruct Traefik to route HTTPS requests for the configured domain to the container on port 3080.
    * `traefik`: Runs the Traefik reverse proxy on ports 80 and 443. It reads the Docker socket to discover containers by their labels, redirects all HTTP traffic to HTTPS, and uses the ACME HTTP-01 challenge to request and renew TLS certificates from Let's Encrypt. Certificates are stored in `./letsencrypt/acme.json`.

1. Create an empty `librechat.yaml` configuration file. The override file mounts this path into the API container. If the file does not exist, Docker creates a directory instead, which causes a startup error.

    ```console
    $ touch librechat.yaml
    ```

1. Start all services in detached mode.

    ```console
    $ docker compose up -d
    ```

    Docker Compose starts the LibreChat API, MongoDB, Meilisearch, and Traefik containers. Traefik requests a TLS certificate from Let's Encrypt using the ACME HTTP-01 challenge and begins routing HTTPS traffic to the LibreChat container on port 3080.

1. Verify that all containers are running.

    ```console
    $ docker compose ps
    ```

    Verify that all containers show a `STATUS` of `Up`.

1. View the service logs to confirm the stack started without errors.

    ```console
    $ docker compose logs --tail=50
    ```

    The output shows MongoDB initialization, Meilisearch startup, Traefik registering routes for the configured domain, and the LibreChat API listening on port 3080.

    For more information on managing a Docker Compose stack, see the [How to Use Docker Compose](https://docs.vultr.com/how-to-use-docker-compose) article.

## Access the LibreChat Dashboard

LibreChat requires an account before the chat interface becomes accessible. The first registered user can configure AI provider API keys through the dashboard settings.

1. Open the LibreChat registration page in your browser. Replace `librechat.example.com` with your configured domain.

    ```
    https://librechat.example.com/register
    ```

    The registration form loads and displays fields for your name, username, email, and password.

    > [!NOTE]
    > LibreChat supports social logins through Google, GitHub, Discord, and OpenID Connect. To enable social login, set `ALLOW_SOCIAL_LOGIN` and `ALLOW_SOCIAL_REGISTRATION` to `true` in the `.env` file. Refer to the [authentication configuration](https://www.librechat.ai/docs/configuration/authentication) documentation for setup instructions.

1. Enter your **Full Name**, **Username**, **Email**, and **Password**, then click **Continue**. LibreChat creates the account and redirects to the login page.

    ![LibreChat Register Page](https://assets.vultrdevrel.com/docs-main-doc-assets-1/2582/04cf11a8-e6a3-442f-8870-0c37b813779f.png)

1. Enter your email and password, then click **Continue**. The LibreChat dashboard loads and displays the model selector and conversation interface.

    ![LibreChat Dashboard](https://assets.vultrdevrel.com/docs-main-doc-assets-1/2582/fa26e9b8-ebbf-4660-9998-936fa7429fc5.png)

## Conclusion

LibreChat is now running with Docker Compose and accessible over HTTPS on your domain name. Conversation history, uploaded files, and search indexes are stored in the project directories. For more information, refer to the [official LibreChat documentation](https://www.librechat.ai/docs).
