This documentation page applies to deploying your own open source ClearML Server. It does not apply to ClearML Hosted Service users.
:::
Deploy the **ClearML Server** in Linux or macOS using the pre-built Docker image.
For **ClearML** docker images, including previous versions, see [https://hub.docker.com/r/allegroai/clearml](https://hub.docker.com/r/allegroai/clearml).
However, pulling the **ClearML** Docker image directly is not required. We provide a docker-compose YAML file that does this.
The docker-compose file is included in the instructions on this page.
For information about upgrading **ClearML Server** in Linux or macOS, see [here](upgrade_server_linux_mac.md)
:::important
If **ClearML Server** is being reinstalled, we recommend clearing browser cookies for **ClearML Server**. For example,
for Firefox, go to Developer Tools > Storage > Cookies, and for Chrome, go to Developer Tools > Application > Cookies,
and delete all cookies under the **ClearML Server** URL.
:::
## Prerequisites
For Linux users only:
* Linux distribution must support Docker. For more information, see this [explanation](https://docs.docker.com/engine/install/) in the Docker documentation.
* Be logged in as a user with `sudo` privileges.
* Use `bash` for all command-line instructions in this installation.
* The ports `8080`, `8081`, and `8008` must be available for the **ClearML Server** services.
## Deploying
:::warning
By default, **ClearML Server** launches with unrestricted access. To restrict **ClearML Server** access, follow the
instructions in the [Security](clearml_server_security.md) page.
:::
**To launch **ClearML Server** on Linux or macOS:**
1. Install Docker. The instructions depend upon the operating system:
* Linux - see [Docker for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/).
* macOS - see [Docker for OS X](https://docs.docker.com/docker-for-mac/install/).
1. Verify the Docker CE installation. Execute the command:
docker run hello-world
The expected is output is:
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64)
3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
1. For macOS only, increase the memory allocation in Docker Desktop to `8GB`.
1. In the top status bar, click the Docker icon.
1. Click **Preferences****>** **Resources****>** **Advanced**, and then set the memory to at least `8192`.
1. Click **Apply**.
1. For Linux only, install `docker-compose`. Execute the following commands (for more information, see [Install Docker Compose](https://docs.docker.com/compose/install/) in the Docker documentation):
1. For Linux only, configure the **ClearML Agent Services**. If `CLEARML_HOST_IP` is not provided, then **ClearML Agent Services** will use the external public address of the **ClearML Server**. If `CLEARML_AGENT_GIT_USER` / `CLEARML_AGENT_GIT_PASS` are not provided, then **ClearML Agent Services** will not be able to access any private repositories for running service tasks.
export CLEARML_HOST_IP=server_host_ip_here
export CLEARML_AGENT_GIT_USER=git_username_here
export CLEARML_AGENT_GIT_PASS=git_password_here
1. Run `docker-compose` with the downloaded configuration file.
docker-compose -f /opt/clearml/docker-compose.yml up -d
The server is now running on [http://localhost:8080](http://localhost:8080).