# Mongonaut

## Installation

---

## Pages

- [About Mongonaut](https://mongonaut.org/about-mongonaut)
- [Installation](https://mongonaut.org/installation)

### Security

- [Zero Trust Tunnel](https://mongonaut.org/security/zero-trust-tunnel)

---

# Install Mongonaut

Mongonaut is available as a Docker image, making it easy to run alongside your MongoDB instance.

## Quick Start

```bash
docker run -it --rm \
  -p 8081:8081 \
  -e MONGO_CONNECTION_URL="mongodb://mongo:27017/" \
  ghcr.io/withzu/mongonaut
```

<Alert type="warning">

**Security Warning:** The examples above expose Mongonaut publicly on port 8081 without authentication. It is your responsibility to properly secure access to Mongonaut in production environments. Consider using:

- [Cloudflare Zero Trust Tunnel](/security/zero-trust-tunnel) *(recommended)*
- A reverse proxy with authentication
- Network-Level security controls

Never expose an unsecured Mongonaut instance directly to the internet, as this could allow unauthorized access to your MongoDB databases!

</Alert>

## Full Docker Compose example

```yaml name="docker-compose.yml"
services:
  mongonaut:
    image: ghcr.io/withzu/mongonaut
    ports:
      - 8081:8081
    environment:
      MONGO_CONNECTION_URL: mongodb://mongo:27017/
    networks:
      - mongo-network
  mongo:
    image: mongo:latest
    ports:
      - 27017:27017
    networks:
      - mongo-network
networks:
  mongo-network:
    driver: bridge
```

## Environment Variables


| Variables              | Description                         | Default                  |
| ---------------------- | ----------------------------------- | ------------------------ |
| `MONGO_CONNECTION_URL` | URL of the target MongoDB           | `mongodb://mongo:27017/` |
| `MONGONAUT_READONLY`   | Whether the data is editable or not | `false`                  |


