---
title: How to Deploy Label Studio – Open-Source Data Labeling Platform
url: https://docs.vultr.com/how-to-deploy-label-studio-open-source-data-labeling-platform
description: Deploy Label Studio as a self-hosted data labeling platform for machine learning datasets with secure access.
publish_date: 2026-04-16T19:32:43.968419Z
last_updated: 2026-04-16T19:57:07.947359Z
author: Praful Singh
header_image: https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2554/5d8e19bd-8799-4d0a-88de-f3e8d839509f.png
---

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

[Label Studio](https://labelstud.io/) is an open-source data labeling platform that supports annotation across a wide range of data types, including text, images, audio, video, and time series. It provides a customizable labeling interface, multi-user project management, and export support for formats such as JSON and CSV, making it a practical tool for preparing and refining datasets for machine learning workflows.

This article explains how to deploy Label Studio on a Linux server using Docker Compose. It covers directory setup, environment configuration, Traefik reverse proxy integration for automatic HTTPS, and demonstrates the application with a sample text classification project.

## Prerequisites

Before you begin, you need to:

* Have access to a [Linux-based server](https://www.vultr.com/features/operating-systems/) (with at least 2 CPU cores and 4 GB of RAM) 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, `labelstudio.example.com`).

## Set Up the Directory Structure, Configuration, and Environment Variables

Label Studio stores annotation data and uploaded files in a persistent volume. The project directory holds the Docker Compose configuration and environment variables.

1. Create a project directory for Label Studio and navigate into it.

    ```console
    $ mkdir ~/labelstudio
    $ cd ~/labelstudio
    ```

1. Create a `.env` file to store environment variables.

    ```console
    $ nano .env
    ```

    Add the following configuration:

    ```ini
    DOMAIN=labelstudio.example.com
    LETSENCRYPT_EMAIL=admin@example.com
    ```

    Replace the placeholders:

    * **labelstudio.example.com**: Your registered domain name.
    * **admin@example.com**: Your email address for Let's Encrypt notifications.

    Save and close the file.

## Deploy with Docker Compose

The deployment stack consists of two services: Traefik handles reverse proxy and automatic TLS certificate management via Let's Encrypt, and Label Studio runs the data labeling application with persistent storage for annotations and uploaded files.

1. Create the Docker Compose configuration file.

    ```console
    $ nano docker-compose.yaml
    ```

    Add the following configuration:

    ```yaml
    services:
      traefik:
        image: traefik:v3.6
        container_name: traefik
        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"
          - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
          - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
          - "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
          - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
        ports:
          - "80:80"
          - "443:443"
        volumes:
          - "./letsencrypt:/letsencrypt"
          - "/var/run/docker.sock:/var/run/docker.sock:ro"
        restart: unless-stopped

      labelstudio:
        image: heartexlabs/label-studio:1.23.0
        container_name: labelstudio
        expose:
          - "8080"
        environment:
          - DJANGO_ALLOWED_HOSTS=${DOMAIN}
          - CSRF_TRUSTED_ORIGINS=https://${DOMAIN}
          - USE_X_FORWARDED_HOST=true
          - SECURE_PROXY_SSL_HEADER=HTTP_X_FORWARDED_PROTO,https
        volumes:
          - ./data:/label-studio/data
        labels:
          - "traefik.enable=true"
          - "traefik.http.routers.labelstudio.rule=Host(`${DOMAIN}`)"
          - "traefik.http.routers.labelstudio.entrypoints=websecure"
          - "traefik.http.routers.labelstudio.tls.certresolver=letsencrypt"
          - "traefik.http.services.labelstudio.loadbalancer.server.port=8080"
        restart: unless-stopped
    ```

    Save and close the file.

    In the above manifest:

    * **services**: Launches two containers managed by Docker Compose:
        * **traefik**: Functions as the reverse proxy and TLS termination point.
        * **labelstudio**: Hosts the data labeling web application.
    * **image**: Defines which container image each service uses. The Label Studio image uses a pinned version (`1.23.0`) for reproducibility; check the [Label Studio releases](https://github.com/HumanSignal/label-studio/releases) for the latest stable version.
    * **container_name**: Assigns predictable names to containers, simplifying log inspection and management commands.
    * **command (Traefik)**: Establishes Traefik's operational parameters: Docker provider integration, HTTP and HTTPS entry points, automatic redirection from HTTP to HTTPS, and Let's Encrypt certificate acquisition.
    * **ports (Traefik)**: Maps host ports `80` and `443` to Traefik, allowing it to receive incoming web traffic.
    * **expose (Label Studio)**: Makes port `8080` available internally for Traefik routing without exposing it directly to the host network.
    * **volumes**:
        * The `./data` bind mount stores annotation data on the host persistently.
        * The `./letsencrypt` bind mount retains TLS certificates between container restarts.
        * The Docker socket mount (`/var/run/docker.sock`) enables Traefik to detect and configure routes for running containers automatically.
    * **labels (Label Studio)**: Instructs Traefik to route HTTPS traffic for the configured domain to the Label Studio container.
    * **restart: unless-stopped**: Configures both containers to restart automatically after crashes or server reboots, unless explicitly stopped.

1. Create the Label Studio data directory and assign its group to `root` (group `0`). The Label Studio container runs as a non-root user that belongs to the `root` group, so this group ownership allows the container to write annotation data to the bind mount.

    ```console
    $ mkdir data
    $ sudo chown :0 data
    ```

1. Start the containers in detached mode.

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

1. Verify that both containers are running.

    ```console
    $ docker compose ps
    ```

    The output displays two running containers with Traefik listening on ports 80 and 443 and Label Studio exposing port 8080.

1. View the logs for the services.

    ```console
    $ docker compose logs
    ```

    The output shows the Label Studio Django startup sequence and Traefik registering routes for the configured domain.

    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 and Configure Label Studio

Label Studio requires an initial user account on first access. The first registered user automatically receives administrator privileges and can create projects, manage team members, and configure storage.

1. Open your web browser and navigate to Label Studio at `https://labelstudio.example.com`, replacing `labelstudio.example.com` with your configured domain name.

    ![Label Studio sign-up page with email and password fields](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2554/1dc5ecce-d04e-4d60-b3b2-19bd94ddfc86.png)

1. Click **Sign Up** and create the initial administrator account.

    The main dashboard opens after registration.

## Create a Sample Labeling Project

Label Studio uses projects to organize annotation tasks. Each project defines a labeling interface, data source, and export configuration. The following steps create a text classification project and annotate sample data to confirm the deployment is working correctly.

1. From the main dashboard, click **Create Project**.

    ![Label Studio dashboard with the Create Project button highlighted](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2554/fab24a43-76fa-4352-961a-d60bbdd47307.png)

1. Configure the project in the creation modal:

    * **Project Name**: Enter a descriptive name (for example, `Sentiment Analysis`).
    * **Description**: Optionally add a short description.
    * **Labeling Template**: Select **Text Classification**.

1. Click **Save** to create the project.

    The project dashboard opens.

1. Click **Import** to add sample data.

    ![Label Studio import dialog with options to upload files or paste data](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2554/6b189bb4-ec85-4648-bd18-f3fd7f10b234.png)

1. Upload a sample dataset file or paste the following JSON content into the import field:

    ```json
    [
      {"text": "This product is amazing."},
      {"text": "Worst experience ever."}
    ]
    ```

1. Click **Import** to load the tasks into the project.

    The tasks appear in the **Data Manager**.

1. Click on a task from the task list to open the labeling interface.

1. Select the appropriate label (for example, **Positive** or **Negative**) and click **Submit** to save the annotation.

1. Repeat the process for remaining tasks. The **Data Manager** displays each task as **Completed** after annotation.

## Conclusion

You have successfully deployed Label Studio on your Linux server using Docker Compose with Traefik for automatic HTTPS. The setup provides secure web access to a scalable data annotation tool with persistent storage for projects, uploaded data, and annotation results. Label Studio supports customizable labeling interfaces, collaborative workflows, flexible data import and export options, and integration with machine learning backends. For more information, refer to the [official Label Studio documentation](https://labelstud.io/guide/).