# Online installation mode

Akamas is deployed as a set of containerized services running on Docker and managed via Docker Compose. In online installation mode, the latest version of the Akamas Docker Compose file and all the images required by Docker can be downloaded from the AWS ECR repository.

In case the Akamas Server is behind a proxy server please also read how to [setup Akamas behind a Proxy](https://docs.akamas.io/akamas-docs/3.1.2/installing-akamas/install-the-akamas-server/online-installation-mode/online-installation-behind-a-proxy-server).

## Get Akamas Docker artifacts <a href="#installation-getdockerartifacts" id="installation-getdockerartifacts"></a>

It is suggested to first create a directory `akamas` in the home directory of your user, and then run the following command to get the latest compose file:

{% code overflow="wrap" %}

```bash
cd ~
mkdir akamas
cd akamas
curl -O https://s3.us-east-2.amazonaws.com/akamas/compose/$(curl https://s3.us-east-2.amazonaws.com/akamas/compose/stable.txt)/docker-compose.yml
```

{% endcode %}

## Configure Akamas environment variables <a href="#installation-configureenvironmentvariables" id="installation-configureenvironmentvariables"></a>

To configure Akamas, you should set the following environment variables:

* `AKAMAS_CUSTOMER`: this is the customer name matching the one referenced in the Akamas license.
* `AKAMAS_BASE_URL`: this is the endpoint in the Akamas APIs that will be used to interact with the CLI, typically `http://<akamas server dns address>:8000`

You can export the variables using the following snippet:

```bash
# add double quotes ("xx xx") if the name contains white spaces
export AKAMAS_CUSTOMER=<your name or your organization name>
export AKAMAS_BASE_URL=http://<akamas server dns address>:8000
```

It is recommended to save these exported variables in your \~/.bashrc file for convenience.

## Start Akamas

In order to login into AWS ECR and pull the most recent Akamas containers images you also need to set the AWS authentication variables to the appropriate values provided by Akamas Customer Support Services by running the following command:

```bash
export AWS_ACCESS_KEY_ID=<your access key id>
export AWS_SECRET_ACCESS_KEY=<your secret access key>
export AWS_DEFAULT_REGION=us-east-2
```

At this point, you can start installing Akamas server by running the following AWS CLI commands:

{% code overflow="wrap" %}

```bash
aws ecr get-login-password --region us-east-2 | docker login -u AWS --password-stdin https://485790562880.dkr.ecr.us-east-2.amazonaws.com
```

{% endcode %}

```bash
docker-compose up -d
```
