---
title: "One-line setup"
description: "Install with one command, set the domains and start the stack."
---

> 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.

# One-line setup

To set it up by hand instead, see [Install using Docker Compose](https://docs.ragna.io/self-hosting/install-options/docker-compose).

## Install

Run the installer on the server, in the folder where RAGNA Studio should live:

```bash
curl -fsSL https://get.ragna.io | sh
```

It creates a `ragna-studio` folder with:

- the compose files and `postgres-init.sql` of the latest release,
- `.env` with generated secrets and the release pinned as `RAGNA_VERSION`.

Then it asks for the domains, OAuth client, storage and AI keys, and starts the stack. To read the script first, see [Prefer not to run a script from the internet?](https://docs.ragna.io/getting-started/quickstart#prefer-not-to-run-a-script-from-the-internet).

## Domains

Enter the public URLs the reverse proxy will serve, for example `https://app.example.com` and `https://api.example.com`. The installer sets `APP_URL`, `API_BASE_URL`, their public counterparts, `TRUSTED_ORIGINS` and `COOKIE_DOMAIN`, see [Configuration](https://docs.ragna.io/self-hosting/configuration#domains). The OAuth redirect URI it prints uses the API URL.

If app and API don't share a parent domain, the installer can't derive `COOKIE_DOMAIN` and asks for it to be set by hand.

## Change settings later

Edit `ragna-studio/.env`, then run the installer again from the same folder:

```bash
curl -fsSL https://get.ragna.io | sh
```

It keeps the `.env` and restarts every service whose settings changed.

## What starts

The installer 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`.

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 a starter agent template.
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](https://docs.ragna.io/self-hosting/reverse-proxy) in front of them.

## Stop

```bash
docker compose -p ragna_studio down
```

The data stays in the Docker volumes.

Source: https://docs.ragna.io/self-hosting/install-options/one-line-setup/index.mdx
