---
title: "Installation"
description: "Get the code, fill in .env and start the stack with Docker Compose."
---

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

# Installation

## Get the code

```bash
git clone https://github.com/ragna-ai/ragna-studio.git
cd ragna-studio
cp .env.example .env
```

All settings go into `.env`. Before the first start, set your domains, secrets, storage, one OAuth provider and one AI key. See [Configuration](/self-hosting/configuration) and [Storage](/self-hosting/storage).

## Start

```bash
make up
```

`make up` runs the base compose file plus `docker/docker-compose.selfhost.yml`. This override sets the in-network hosts for Postgres, Redis and the webbrowser. It overrides the `localhost` values from `.env.example`.

The stack starts in order:

1. **Data stores**

   Postgres and Redis come up.
2. **Migrate**

   `migrate` applies the schema.
3. **Seed**

   `seed` adds the model catalog and the default agent.
4. **Services**

   The backend, worker, frontend and webbrowser start.

`migrate` and `seed` run once per start and are idempotent.

The frontend and backend listen on `127.0.0.1` only (ports 3000 and 3010). Put a [reverse proxy](/self-hosting/reverse-proxy) in front of them.

## Stop

```bash
make down
```

Source: https://docs.ragna.io/self-hosting/installation/index.mdx
