- Get started
- Create user accounts
Install and Upgrade
- Install and upgrade
- Set up database storage
- Get data
- Import pre-annotated data
- Sync data from cloud or Redis storage
Manage Data & Projects
- Set up your labeling project
- Label and annotate data
- Export results
Machine Learning Setup
- Set up machine learning with your labeling process
- Frontend library
- Frontend reference
- Backend API
Start Label Studio
After you install Label Studio, start the server to start using it.
By default, Label Studio starts with a SQLite database to store labeling tasks and annotations. You can specify different source and target storage for labeling tasks and annotations using Label Studio UI or the API. See Database storage for more.
You can specify a machine learning backend and other options using the command line interface. Run
label-studio --help to see all available options, or refer to the following tables.
Some available commands for Label Studio provide information or start the Label Studio server:
||Start the Label Studio server.|
||Display available command line arguments.|
||Initialize a specific project in Label Studio.|
||Start the Label Studio server and initiliaze a specific project.|
||Reset the password for a specific Label Studio username. See Create user accounts for Label Studio.|
||Get access to a shell for Label Studio to manipulate data directly. See documentation for the Django shell-plus command.|
||Show the version of Label Studio and then terminates.|
The following command line arguments are optional and must be specified with
label-studio start <argument> <value> or as an environment variable when you set up the environment to host Label Studio:
|Command line argument||Environment variable||Default||Description|
||Do not automatically open a web browser when starting Label Studio.|
||Specify the database file path for storing labeling tasks and annotations. See Database storage.|
||OS-specific||Directory to use to store all application-related data.|
||Enable debug mode for troubleshooting Label Studio.|
||Deprecated, do not use. Specify the path to the server configuration for Label Studio.|
||Path to the label configuration file for a specific Label Studio project. See Set up your labeling project.|
||Specify the URLs for one or more machine learning backends. See Set up machine learning with your labeling process.|
||Specify one of sequential or uniform to define the order for labeling tasks. See Set up task sampling for your project on this page.|
||One of DEBUG, INFO, WARNING, or ERROR. Use to specify the logging level for the Label Studio server.|
||Specify the web server port for Label Studio. Defaults to 8080. See Run Label Studio on localhost with a different port on this page.|
||Specify the hostname to use to generate links for imported labeling tasks or static loading requirements. Leave empty to make all paths relative to the root domain. For example, specify
||Certificate file to use to access Label Studio over HTTPS. Must be in PEM format. See Run Label Studio with HTTPS on this page.|
||Private key file for HTTPS connection. Must be in PEM format. See Run Label Studio with HTTPS on this page.|
||Specify a project description for a Label Studio project. See Set up your labeling project.|
||Password to use for the default user.|
||Username to use for the default user.|
||Automatically agree to let Label Studio fix SQLite issues when using Python 3.6–3.8 on Windows operating systems.|
By default, Label Studio runs on port 8080. If that port is already in use or if you want to specify a different port, start Label Studio with the following command:
label-studio start --port <port>
For example, start Label Studio on port 9001:
label-studio start --port 9001
Or, set the following environment variable:
LABEL_STUDIO_PORT = 9001
To run Label Studio on Docker with a port other than the default of 8080, use the port argument when starting Label Studio on Docker. For example, to start Label Studio in a Docker container accessible with port 9001, run the following:
docker run -it -p 9001:8080 -v `pwd`/mydata:/label-studio/data heartexlabs/label-studio:latest label-studio
Or, if you’re using Docker Compose, update the
docker-compose.yml file that you’re using to expose a different port for the NGINX server used to proxy the connection to Label Studio. For example, this portion of the
docker-compose.yml file exposes port 9001 instead of port 80 for proxying Label Studio:
... nginx: image: nginx:latest ports: - 9001:80 depends_on: - app ...
To run Label Studio on Docker with a host and subdomain, you can refer to the example
deploy/dockerfiles/subpath.example.yml Docker YAML file. To customize it for your environment, manually modify the
nginx/subdomain.example.simple.conf NGINX configuration file, the relevant Label Studio environment variables, and the PostgreSQL database settings for your environment.
To run Label Studio with HTTPS and access the web server using HTTPS in the browser, specify a certificate and private key when starting Label Studio.
You can start Label Studio with the following command:
label-studio start --cert <certificate.pem> --key <keyfile.pem>
Or, set the following environment variables:
LABEL_STUDIO_CERT_FILE = <certificate.pem> LABEL_STUDIO_KEY_FILE = <keyfile.pem>
The certificate and private key files must both be provided as PEM files.
To run Label Studio on the cloud using Heroku, specify an environment variable so that Label Studio loads.
If you want, you can specify a different hostname for Label Studio, but you don’t need to.
To run Label Studio with Heroku and use PostgreSQL as the database storage, specify the PostgreSQL environment variables required as part of the Heroku environment variable
DATABASE_URL. For example, to specify a PostgreSQL database hosted on Amazon:
DATABASE_URL = postgres://username:email@example.com:5432/dbname
Then you can specify the required environment variables for a PostgreSQL connection as config variables. See Database storage.
If you want multiple people to collaborate on a project, you might want to run Label Studio with an external domain name.
To do that, use the
host parameter when you start Label Studio. These parameters ensure that the correct URLs are created when importing resource files (images, audio, etc) and generating labeling tasks.
There are several possible ways to run Label Studio with an external domain name.
- Replace the
hostparameter in the file which you specified with
--configoption. If you don’t use
label_studio/utils/schema/default_config.jsonin the Label Studio package directory.
- Specify the parameters when you start Label Studio:
label-studio start --host http://your.domain.com/ls-root.
- Specify the parameters as environment variables
HOSTespecially when setting up Docker:
Or, you can use environment variables:
LABEL_STUDIO_HOST = https://subdomain.example.com:7777
You must specify the protocol for the domain name:
If your external host has a port, specify the port as part of the host name.
When you start Label Studio, you can control the order in which tasks are exposed to annotators for a specific project.
For example, to create a project with sequential task ordering for annotators:
label-studio start <project_name> --sampling sequential
The following table lists the available sampling options:
|sequential||Default. Tasks are shown to annotators in ascending order by the
|uniform||Tasks are sampled with equal probabilities.|
|prediction-score-min||Tasks with the minimum average prediction score are shown to annotators. To use this option, you must also include predictions data in the task data that you import into Label Studio.|
You can also use the API to set up sampling for a specific project. Send a PATCH request to the
/api/projects/<project_id> endpoint to set sampling for the specified project. See the API reference for projects.
Individual annotators can also control the order in which they label tasks by adjusting the filtering and ordering of labeling tasks in the Label Studio UI. See Set up your labeling project.