docs/source/guide/install_enterprise_docker.md
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:
See Secure Label Studio for more details about security and hardening for Label Studio Enterprise.
!!! note Docker deployments are more suitable for proof-of-concept builds and small projects. For production environments and larger deployments, we strongly recommend using Kubernetes. Kubernetes deployments provide better scalability, reliability, and access to advanced features such as Prompts. See Deploy Label Studio Enterprise on Kubernetes for more information.
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:
You must be authorized to access Label Studio Enterprise images.
Set up the Docker login to retrieve the latest Docker image:
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.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.
label-studio-enterprise/env.list with the required environment variables:# Specify the path to the license file.
LICENSE=/label-studio-enterprise/license.txt
# Specify the FQDN name with port if differs from 80
LABEL_STUDIO_HOST=http://localhost/
# Database engine (PostgreSQL by default)
DJANGO_DB=default
# Default configuration
DJANGO_SETTINGS_MODULE=htx.settings.label_studio
# PostgreSQL database name
POSTGRE_NAME=postgres
# PostgreSQL database user
POSTGRE_USER=postgres
# PostgreSQL database password
POSTGRE_PASSWORD=
# PostgreSQL database host
POSTGRE_HOST=db
# PostgreSQL database port
POSTGRE_PORT=5432
# Optional: PostgreSQL SSL mode
# POSTGRE_SSL_MODE=require
# Optional: Specify Postgre SSL certificate
# POSTGRE_SSLROOTCERT=postgre-ca-bundle.pem
# Optional: Client-side certificate and key
# POSTGRE_SSLCERT=client.crt
# POSTGRE_SSLKEY=client.key
# Redis location e.g. redis[s]://[:password]@localhost:6379/1
# rediss:// scheme is mandatory to use SSL
REDIS_LOCATION=redis://redis:6379/1
# Optional: Redis database
# REDIS_DB=1
# Optional: Redis password
# REDIS_PASSWORD=12345
# Optional: Redis socket timeout
# REDIS_SOCKET_TIMEOUT=3600
# Optional: Require certificate
# REDIS_SSL_CERTS_REQS=required
# Optional: Specify Redis SSL certificate
# REDIS_SSL_CA_CERTS=redis-ca-bundle.pem
# Optional: Client-side certificate and key
# REDIS_SSL_CERTFILE=client.crt
# REDIS_SSL_KEYFILE=client.key
# Optional: Specify SSL termination certificate & key
# Files should be placed in the directory "certs" at the same directory as docker-compose.yml file
# NGINX_SSL_CERT=/certs/cert.pem
# NGINX_SSL_CERT_KEY=/certs/cert.key
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:
$ 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.