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

# Docker deployment

> Deploy Perplexica using Docker with bundled SearxNG or your own instance

Docker is the recommended way to run Perplexica. The Docker image includes both Perplexica and SearxNG, making setup straightforward with a single command.

## Quick start

Run Perplexica with the bundled SearxNG instance:

```bash theme={null}
docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data --name perplexica itzcrazykns1337/perplexica:latest
```

Once running, open your browser and navigate to [http://localhost:3000](http://localhost:3000) to configure your settings (API keys, models, etc.) in the setup screen.

<Note>
  The `-v` flag creates a persistent volume for your data and uploaded files. Your settings and search history will be preserved across container restarts.
</Note>

## Using your own SearxNG instance

If you already have SearxNG running, use the slim version of Perplexica:

```bash theme={null}
docker run -d -p 3000:3000 -e SEARXNG_API_URL=http://your-searxng-url:8080 -v perplexica-data:/home/perplexica/data --name perplexica itzcrazykns1337/perplexica:slim-latest
```

<Warning>
  Make sure your SearxNG instance has:

  * JSON format enabled in the settings
  * Wolfram Alpha search engine enabled
</Warning>

Replace `http://your-searxng-url:8080` with your actual SearxNG URL, then configure your AI provider settings at [http://localhost:3000](http://localhost:3000).

## Building from source

For more control over your deployment, you can build Perplexica from source:

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

  <Step title="Build the Docker image">
    ```bash theme={null}
    docker build -t perplexica .
    ```
  </Step>

  <Step title="Run the container">
    ```bash theme={null}
    docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data --name perplexica perplexica
    ```
  </Step>

  <Step title="Configure settings">
    Access Perplexica at [http://localhost:3000](http://localhost:3000) and configure your settings in the setup screen.
  </Step>
</Steps>

<Note>
  After the container is built, you can start Perplexica directly from Docker Desktop or your Docker management tool without opening a terminal.
</Note>

## Using Docker Compose

You can also use Docker Compose to manage your deployment:

```yaml docker-compose.yaml theme={null}
services:
  perplexica:
    image: itzcrazykns1337/perplexica:latest
    ports:
      - '3000:3000'
    volumes:
      - data:/home/perplexica/data
    restart: unless-stopped

volumes:
  data:
    name: 'perplexica-data'
```

Run with:

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

## Container configuration

### Exposed ports

* **3000**: Perplexica web interface (Next.js application)
* **8080**: SearxNG API (only in full image, not slim)

### Volume mounts

* `/home/perplexica/data`: Stores application data, settings, and search history
* `/home/perplexica/uploads`: Stores uploaded files (created automatically)

### Environment variables

* `SEARXNG_API_URL`: SearxNG API endpoint (default: `http://localhost:8080`)
  * Required for slim image when using external SearxNG
  * Automatically configured in the full image

## Managing the container

<CodeGroup>
  ```bash Start theme={null}
  docker start perplexica
  ```

  ```bash Stop theme={null}
  docker stop perplexica
  ```

  ```bash Restart theme={null}
  docker restart perplexica
  ```

  ```bash View logs theme={null}
  docker logs perplexica
  ```

  ```bash Follow logs theme={null}
  docker logs -f perplexica
  ```

  ```bash Remove container theme={null}
  docker stop perplexica
  docker rm perplexica
  ```
</CodeGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Updating Perplexica" icon="arrow-up" href="/deployment/updating">
    Keep your installation up to date
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/deployment/troubleshooting">
    Common issues and solutions
  </Card>
</CardGroup>
