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

# Docker

> Deploy Fleet with Docker or Docker Compose.

## Docker Compose (recommended)

The repo includes a `docker-compose.yml` for the simplest deployment path.

```bash theme={null}
git clone https://github.com/aayushxr/fleet.git
cd fleet
docker compose up -d
```

Fleet will be available at `http://localhost:3000`.

## Docker (standalone)

### Build the image

```bash theme={null}
docker build -t fleet .
```

### Run the container

```bash theme={null}
docker run -d \
  -p 3000:3000 \
  -e NODE_ENV=production \
  --name fleet \
  fleet
```

## Reverse proxy

To expose Fleet publicly, put it behind nginx with Certbot for TLS. See the platform-specific guides for full setup instructions:

* [DigitalOcean](/self-hosting/digital-ocean#7-add-https-with-nginx--certbot)
* [Hetzner](/self-hosting/hetzner#7-add-https-with-nginx--certbot)
* [AWS](/self-hosting/aws#7-add-https-with-nginx--certbot)

### nginx example

```nginx theme={null}
server {
    listen 80;
    server_name fleet.yourdomain.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
```

<Warning>
  Socket.IO requires sticky sessions if you run multiple Fleet instances behind a load balancer. For most self-hosted setups, a single instance is sufficient.
</Warning>

## Updating

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