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

# Installation

> Identety is designed to be easy to deploy and configure. The recommended way to get started with Identety is using Docker Compose, which provides a convenient way to run Identety and its required PostgreSQL database.

## Prerequisites

* [Docker](https://docs.docker.com/get-docker/)
* [Docker Compose](https://docs.docker.com/compose/install/)

## Deployment Steps

1. Create a `docker-compose.yml` file with the following content:

```yaml theme={null}
services:
  app:
    image: identety/identety:latest
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgresql://postgres:password@db:5432/identety
      - API_KEY=your-secure-api-key
    depends_on:
      - db

  db:
    image: postgres:15
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=identety
    volumes:
      - postgres_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"

volumes:
  postgres_data:
```

2. Replace `your-secure-api-key` with a strong API key. This key will be used to secure your Identety deployment.

3. Start the services using Docker Compose:

```bash theme={null}
docker-compose up -d
```

This command will download the necessary Docker images and start Identety and its PostgreSQL database in the background.

4. Access the Identety API at `http://localhost:3000`. You can now start making API requests to the Identety endpoints.

## Manual Docker Setup

If you prefer to run Identety using Docker without Docker Compose, you can use the following command:

```bash theme={null}
docker run \
  --name identety \
  -p 3000:3000 \
  -e DATABASE_URL=<your-database-url> \
  -e API_KEY=your-secure-api-key \
  identety/identety:latest
```

Replace `<your-database-url>` with the URL of your PostgreSQL database. For example:

```
postgresql://user:password@host:5432/identety
```

<Note>
  If you want to pass locallly installed postgresql url to docker contaier, use `host.docker.internal:` as host name.

  **For example:**
  `postgresql://user:password@localhost:5432/identety` will be changed to `postgresql://user:password@host.docker.internal:5432/identety`
</Note>

Ensure that you have a running PostgreSQL database accessible at the provided URL.

## Next Steps

With Identety up and running, you can now:

* Configure your authentication providers
* Register client applications
* Define roles and permissions
* Integrate Identety into your applications

Refer to the API documentation for detailed information on using the Identety endpoints.
