> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker

> On-premise deployment of Parea in your environment via Docker

# Installing Deployment

Self-deploying Parea through Docker consists of 4 easy steps:

<Steps>
  <Step title="Clone repo">
    Clone the [parea-deployment](https://www.github.com/parea-ai/parea-deployment) repo.
  </Step>

  <Step title="Setup .env file">
    Navigate into `docker` directory, copy the `.env.sample` file to `.env` and fill-in your organization slug into `REACT_APP_SELF_HOST_ORGANIZATION_NAME`.
    You can *optionally configure* your SSO provider, re-generate the auth/JWT secret and any secret to encrypt public keys, and update the ports of the frontend/backend/auth services.
    Note, you must not comment out any environment variables even if they are empty.
  </Step>

  <Step title="Start the deployment">
    Run `docker-compose pull && docker-compose up -d` to pull and run the docker images.
  </Step>

  <Step title="Update backend URL in SDK">
    To use the self-deployed Parea backend in the SDK, you need to set the `PAREA_BASE_URL` environment variable to the backend URL.
    Note, the backend runs by default on [http://localhost:8000](http://localhost:8000) on the host machine.
  </Step>
</Steps>

If you followed above steps, this will start by default:

* the frontend on [http://localhost:3030](http://localhost:3030)
* the backend on [http://localhost:8000](http://localhost:8000)

If you wish to stop the deployment, you can run `docker-compose down`.

# Updating Deployment

1. Run `docker-compose pull` to pull the latest images
2. Run `docker-compose down` to stop the containers
3. Run `docker-compose up -d` to start the containers
