# Quick Start

Get Authority running in 5 minutes. By the end, you'll have a working OAuth 2.0 server.

## Prerequisites

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

## Step 1: Clone the Repository

```bash
git clone https://github.com/azutoolkit/authority.git
cd authority
```

## Step 2: Start Authority

```bash
docker-compose up -d
```

This starts:

* Authority server on port 4000
* PostgreSQL database on port 5432

## Step 3: Access the Dashboard

Open your browser to <http://localhost:4000>.

You should see the Authority landing page:

![Landing Page](https://994706697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlOWXZIZjvh1Ih2caxSvI%2Fuploads%2Fgit-blob-0e196e6ece06e42ccb7a52cbe24b3c5c77a6e579%2Flanding-page.gif?alt=media)

## Step 4: Sign In

Click **Sign In** and use the default admin credentials:

* **Username:** `admin@example.com`
* **Password:** `password123`

![Sign In](https://994706697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlOWXZIZjvh1Ih2caxSvI%2Fuploads%2Fgit-blob-72b8b2f529dacc258fce2ac43067e24259452f61%2Fsignin.gif?alt=media)

## Step 5: Explore the Admin Dashboard

After signing in, you can:

* **Manage OAuth Clients** - Register applications
* **Manage Users** - Create and edit accounts
* **Configure Scopes** - Define access permissions
* **View Audit Logs** - Track all actions
* **Adjust Settings** - Configure security policies

![Admin Dashboard](https://994706697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlOWXZIZjvh1Ih2caxSvI%2Fuploads%2Fgit-blob-7e6d44d6b7eaae2061d5d8d1f7c5f404a6916986%2Fadmin-clients.gif?alt=media)

## Step 6: Create Your First OAuth Client

1. Navigate to **OAuth Clients**
2. Click **New Client**
3. Fill in:
   * **Name:** `My Test App`
   * **Redirect URI:** `http://localhost:3000/callback`
4. Click **Create**

You'll receive a `client_id` and `client_secret`. Save these for the next tutorial.

## Next Steps

* [First OAuth Integration](https://azutopia.gitbook.io/authority/tutorials/first-oauth-integration) - Build a complete OAuth flow
* [Docker Installation Guide](https://azutopia.gitbook.io/authority/how-to-guides/docker) - Production deployment options
* [Environment Variables](https://azutopia.gitbook.io/authority/how-to-guides/environment-variables) - Configuration options

## Troubleshooting

### Port 4000 is in use

Stop the conflicting service or change the port:

```bash
PORT=4001 docker-compose up -d
```

### Database connection failed

Ensure PostgreSQL is running:

```bash
docker-compose logs db
```

### Can't access the dashboard

Check Authority logs:

```bash
docker-compose logs authority
```


---

# 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://azutopia.gitbook.io/authority/tutorials/quick-start.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.
