> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/bitwarden/server/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get Bitwarden Server running locally in minutes

This quickstart guide will help you get Bitwarden Server running locally for development or evaluation purposes.

## Prerequisites

Before you begin, ensure you have the following installed:

* [.NET 8.0 SDK](https://dotnet.microsoft.com/download)
* [Docker Desktop](https://www.docker.com/products/docker-desktop)
* [Git](https://git-scm.com/)
* A code editor (VS Code, Visual Studio, or JetBrains Rider recommended)

## Quick Start with Docker

The fastest way to get started is using Docker Compose for the development environment.

<Steps>
  <Step title="Clone the Repository">
    ```bash theme={null}
    git clone https://github.com/bitwarden/server.git
    cd server
    ```
  </Step>

  <Step title="Start the Development Environment">
    Start the required infrastructure services (database, storage, mail):

    ```bash theme={null}
    cd dev
    docker compose --profile cloud up -d
    ```

    This starts:

    * **SQL Server** on port 1433
    * **Azure Storage Emulator** (Azurite) on ports 10000-10002
    * **MailCatcher** on port 1080 (web UI) and 1025 (SMTP)

    <Info>
      Wait about 30 seconds for SQL Server to initialize before proceeding.
    </Info>
  </Step>

  <Step title="Initialize the Database">
    Apply database migrations:

    ```bash theme={null}
    cd ../util/Migrator
    dotnet run
    ```

    You should see output indicating successful migration application.
  </Step>

  <Step title="Run the API Service">
    Start the main API service:

    ```bash theme={null}
    cd ../../src/Api
    dotnet run
    ```

    The API will start on `https://localhost:4000` and `http://localhost:5000`.
  </Step>

  <Step title="Run the Identity Service">
    In a new terminal, start the Identity service:

    ```bash theme={null}
    cd src/Identity
    dotnet run
    ```

    The Identity service will start on `https://localhost:33656`.
  </Step>
</Steps>

<Note>
  Your Bitwarden Server is now running! The API is available at `https://localhost:4000`.
</Note>

## Verify Installation

Test the API with a health check:

```bash theme={null}
curl https://localhost:4000/healthz
```

You should receive a `200 OK` response.

## Next Steps

<CardGroup cols={2}>
  <Card title="Local Setup Guide" icon="laptop-code" href="/development/local-setup">
    Configure your development environment for full-featured development
  </Card>

  <Card title="Architecture" icon="sitemap" href="/architecture">
    Understand the microservices architecture and service relationships
  </Card>

  <Card title="API Reference" icon="code" href="/api/authentication/overview">
    Explore the REST API endpoints and authentication flows
  </Card>

  <Card title="Deploy with Docker" icon="docker" href="/deployment/docker">
    Deploy a production-ready instance with Docker
  </Card>
</CardGroup>

## Alternative: Run All Services

To run all services at once, use the docker-compose configuration:

```bash theme={null}
cd dev
docker compose --profile cloud --profile idp up -d
```

This includes:

* All infrastructure services
* Test identity provider (SimpleSAMLphp) on port 8090

## Troubleshooting

<AccordionGroup>
  <Accordion title="SQL Server connection failed">
    If you see database connection errors:

    1. Ensure SQL Server is running: `docker ps`
    2. Wait 30-60 seconds for SQL Server to fully initialize
    3. Check the connection string in `dev/.env` or `src/Api/appsettings.json`
    4. Try restarting the SQL Server container:
       ```bash theme={null}
       docker compose restart mssql
       ```
  </Accordion>

  <Accordion title="Port already in use">
    If ports are already in use:

    1. Check what's using the port: `lsof -i :4000` (Linux/Mac) or `netstat -ano | findstr :4000` (Windows)
    2. Either stop the conflicting service or modify the port in `launchSettings.json`
    3. Common conflicting ports: 4000 (API), 33656 (Identity), 1433 (SQL Server)
  </Accordion>

  <Accordion title="Certificate errors">
    If you encounter HTTPS certificate warnings:

    ```bash theme={null}
    # Trust the development certificate
    dotnet dev-certs https --trust
    ```

    On Linux, you may need to accept the certificate in your browser.
  </Accordion>
</AccordionGroup>

## Environment Variables

For local development, create a `dev/.env` file with your configuration:

```bash theme={null}
# Database
MSSQL_PASSWORD=YourStrongPassword123!

# Storage (using Azurite defaults)
globalSettings__attachment__baseDirectory=/mnt/data/attachments
globalSettings__send__baseDirectory=/mnt/data/sends

# Mail (using MailCatcher)
globalSettings__mail__smtp__host=localhost
globalSettings__mail__smtp__port=1025
```

See [Environment Variables](/deployment/environment-variables) for a complete reference.

## Development Workflow

Once your environment is set up:

1. **Make changes** to the code in `src/`
2. **Run tests**: `dotnet test` from the solution root
3. **Build**: `dotnet build`
4. **Debug**: Use your IDE's debugging features with breakpoints

See the [Development Guide](/development/local-setup) for IDE-specific configuration.

## Docker Compose Profiles

The development docker-compose configuration supports multiple profiles:

* `cloud` - Core infrastructure (SQL, Azurite, MailCatcher)
* `mssql` - SQL Server only
* `postgres` - PostgreSQL (alternative to SQL Server)
* `mysql` - MySQL (alternative to SQL Server)
* `idp` - SimpleSAMLphp test identity provider
* `storage` - Azurite storage emulator

Example:

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

## Need Help?

<CardGroup cols={2}>
  <Card title="Contributing Guide" icon="code-pull-request" href="/development/contribution-guide">
    Learn how to contribute to Bitwarden Server
  </Card>

  <Card title="Community Forums" icon="comments" href="https://community.bitwarden.com">
    Get help from the community
  </Card>

  <Card title="GitHub Issues" icon="github" href="https://github.com/bitwarden/server/issues">
    Report bugs or request features
  </Card>

  <Card title="Security" icon="shield" href="/development/security">
    Report security vulnerabilities
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.