# Self-Hosted Service

Self hosted deployments allow clients to run their own private instance of TaaS on premise or within their own virtual private cloud (AWS, Google Cloud, etc). In this deployment, TaaS will connect directly to the exchanges. API keys, trade history and balances will all be kept private, even from Tread Labs.

If you are interested in our self-hosted option please [**contact us.**](https://www.tread.fi/contact)

## Docker

TaaS runs as a local webserver that is initialized and hosted on Docker. The localization allows for full privacy and security for your trades and API keys. In order to get started with TaaS, [download Docker](https://docs.docker.com/get-docker/). We recommend getting the GUI if you are not familiar with Docker.

## Starting Webserver

The startup script will initialize the latest Docker image, download the latest version of TaaS and starts the webserver.

Place the key file in the same folder as the startup script.

**Windows**:&#x20;

***Work in progress***&#x20;

**Mac/Unix**:&#x20;

{% code overflow="wrap" %}

```
curl -fs -d '{ "license_key": "<Insert product key>" }'  https://ktf83pe7y6.execute-api.us-east-1.amazonaws.com/beta/taas-distribution/setup | bash
```

{% endcode %}

*Note:* If you see a 502 Gateway error, the container has not fully initialized, try again in a couple minutes.

Once the script has finished initializing the Docker image, open up the Docker and you should see that the TaaS images have been loaded:

<figure><img src="/files/CKXXUKIhh5aY3UZIfVLK" alt=""><figcaption><p>All four images should be loaded to Docker at this point</p></figcaption></figure>

## Accessing Webserver

Once the script has finished loading the images, it will bring up the *taas-docker* container and host TaaS on *localhost:80*

<figure><img src="/files/2btUhUbbF3CvzRIRctdb" alt=""><figcaption><p>Verify that taas_docker is running </p></figcaption></figure>

From your browser, go to localhost and you should be welcomed by the login page.

<figure><img src="/files/8YTf5u9thqsIFmzJKmJE" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tread.fi/enterprise/self-hosted-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
