---
title: Install Label Studio Enterprise On-premises using Docker Compose
short: Install using Docker
type: guide
tier: enterprise
order: 0
order_enterprise: 66
meta_title: Install Label Studio Enterprise on-premises using Docker
meta_description: Install, back up, and upgrade Label Studio Enterprise with Docker to create machine learning and data science projects on-premises.
section: "Install & Setup"
Install Label Studio Enterprise on-premises if you need to meet strong privacy regulations, legal requirements, or want to manage a custom installation on your own infrastructure using Docker or public cloud. If you want to use a different installation method:
- You can use Kubernetes and Helm to deploy Label Studio Enterprise in the cloud. See Deploy Label Studio Enterprise on Kubernetes.
- You can run Label Studio Enterprise in an airgapped environment, and no data leaves your infrastructure. See Install Label Studio Enterprise without public internet access.
See Secure Label Studio for more details about security and hardening for Label Studio Enterprise.
To install Label Studio Community Edition, see Install Label Studio. This page is specific to the Enterprise version of Label Studio.
!!! note
On-prem deployments of Label Studio Enterprise are not supported for Academic licenses.
{% insertmd includes/deploy.md %}
Make sure you have an authorization token to retrieve Docker images and a current license file. If you are a Label Studio Enterprise customer and do not have access, email support or open a ticket through our support portal to receive an authorization token and a copy of your license file.
Make sure Docker Compose is installed on your system.
After you install Label Studio Enterprise, the app is automatically connected to the following running services:
- PostgresSQL (versions >=13)
- Redis (version >=6.0)
You must be authorized to access Label Studio Enterprise images.
Set up the Docker login to retrieve the latest Docker image:bash docker login --username heartexlabs
When prompted to enter the password, enter the token. If login succeeds, a ~/.docker/config.json file is created with the authorization settings.
!!! note
If you have default registries specified when logging into Docker, you might need to explicitly specify the registry: docker login --username heartexlabs docker.io.
After you retrieve the latest Label Studio Enterprise image, add the license file. You can't start the Docker image without a license file.
label-studio-enterprise and place the license file in it.bash mkdir -p label-studio-enterprise cd label-studio-enterprise license.txt, to the label-studio-enterprise directory.To run Label Studio Enterprise in production, start it using Docker compose. This configuration lets you connect Label Studio to external databases and services.
Create a file, label-studio-enterprise/env.list with the required environment variables:
```
LABEL_STUDIO_HOST=http://localhost/
DJANGO_DB=default
DJANGO_SETTINGS_MODULE=htx.settings.label_studio
POSTGRE_NAME=postgres
POSTGRE_USER=postgres
POSTGRE_PASSWORD=
POSTGRE_HOST=db
POSTGRE_PORT=5432
REDIS_LOCATION=redis://redis:6379/1
2. After you set all the environment variables, create the following `docker-compose.yml`:
version: '3.8'
services:
nginx:
image: heartexlabs/label-studio-enterprise:VERSION
ports:
- "80:8085"
- "443:8086"
depends_on:
- app
restart: on-failure
env_file:
- env.list
command: nginx
volumes:
- ./certs:/certs:ro
working_dir: /label-studio-enterprise
app:
image: heartexlabs/label-studio-enterprise:VERSION
restart: on-failure
env_file:
- env.list
command: label-studio-uwsgi
volumes:
- ./mydata:/label-studio/data:rw
- ./license.txt:/label-studio-enterprise/license.txt:ro
working_dir: /label-studio-enterprise
rqworkers_low:
image: heartexlabs/label-studio-enterprise:VERSION
depends_on:
- app
env_file:
- env.list
volumes:
- ./mydata:/label-studio/data:rw
- ./license.txt:/label-studio-enterprise/license.txt:ro
working_dir: /label-studio-enterprise
command: [ "python3", "/label-studio-enterprise/label_studio_enterprise/manage.py", "rqworker", "--with-scheduler", "low" ]
rqworkers_default:
image: heartexlabs/label-studio-enterprise:VERSION
depends_on:
- app
env_file:
- env.list
volumes:
- ./mydata:/label-studio/data:rw
- ./license.txt:/label-studio-enterprise/license.txt:ro
working_dir: /label-studio-enterprise
command: [ "python3", "/label-studio-enterprise/label_studio_enterprise/manage.py", "rqworker", "--with-scheduler", "default" ]
rqworkers_high:
image: heartexlabs/label-studio-enterprise:VERSION
depends_on:
- app
env_file:
- env.list
volumes:
- ./mydata:/label-studio/data:rw
- ./license.txt:/label-studio-enterprise/license.txt:ro
working_dir: /label-studio-enterprise
command: [ "python3", "/label-studio-enterprise/label_studio_enterprise/manage.py", "rqworker", "--with-scheduler", "high"]
rqworkers_critical:
image: heartexlabs/label-studio-enterprise:VERSION
depends_on:
- app
env_file:
- env.list
volumes:
- ./mydata:/label-studio/data:rw
- ./license.txt:/label-studio-enterprise/license.txt:ro
working_dir: /label-studio-enterprise
command: [ "python3", "/label-studio-enterprise/label_studio_enterprise/manage.py", "rqworker", "--with-scheduler", "critical" ]
```
docker-compose up
!!! note
If you expose port 80, you must start Docker with sudo.
To check the version of the Label Studio Enterprise Docker image, use the docker ps command on the host.
From the command line, run the following as root or using sudo and review the output:bash $ docker ps 03b88eebdb65 heartexlabs/label-studio-enterprise:2.2.8-1 "uwsgi --ini deploy/…" 36 hours ago Up 36 hours 0.0.0.0:80->8000/tcp label-studio-enterprise_app_1
In this example output, the image column displays the Docker image and version number. The image heartexlabs/label-studio-enterprise:2.2.8-1 is using the version 2.2.8-1.