dozeGitHubGet doze
Registry
Check against your doze

Which doze do you run?

doze 0.1.1newest · 2 Jul 2026doze 0.1.02 Jul 2026Stop checkingKept in this browser only. Nothing is sent anywhere.

MongoDB

Bring your ownNot signed by doze

The document database. doze runs your MongoDB: the mongod you installed, the mongo:7 container, or an archive you pin.

doze add mongo · port 27017
Not a module: doze runs your MongoDB. There is no doze/mongo in the registry. doze add mongo writes a service block, takes the first way that works on your machine, and names the other two.

Three ways to run it, and the block each writes

Installed

first choice
$ doze add mongo --as installed

Runs the mongod on your PATH. If there is none: mongod is not on your PATH: install it, or use --as container or --as download

doze.hcl
service "mongo" {
  run  = "mongod --dbpath $DATA --bind_ip $HOST --port $PORT"
  port = 27017
}

Container

if mongod isn't installed
$ doze add mongo --as container

A container is just a command that stays in the foreground. Needs Docker or a compatible runtime.

doze.hcl
service "mongo" {
  # a container: a container is just a command, and `run` stays in the foreground
  run  = "docker run --rm -p $HOST:$PORT:27017 mongo:7"
  port = 27017
}

Download

pinned by sha256
$ doze add mongo --as download

You fill in the archive URL and the real run line; doze fetches it once and pins its checksum in doze.lock.

doze.hcl: fill in download and run
service "mongo" {
  # fetched once, pinned in doze.lock by its checksum, and run from the archive
  download = "https://example.com/mongo-darwin-arm64.tar.gz" # fill this in
  run      = "./mongo --port $PORT"
  port     = 27017
}
terminal: plain doze add, on a machine without mongod
$ doze add mongo
→ mongo is not a doze module — adding it as a service
  mongod is not installed — the block runs it as a container
  other ways: --as installed · --as container · --as download

  use it from an app:  MONGO_ADDR = service.mongo.address

doze init writes the full URL when it finds a Mongo driver: MONGO_URL = "mongodb://${service.mongo.address}". $HOST, $PORT and $DATA are filled in at run time.

What doze still gives it

  • A name: mongo.<stack>.doze, and your own domain over https if you set one.
  • A port, held by doze while mongod is asleep.
  • Sleep and wake: it wakes when a client connects and sleeps when nothing has for a while. Data stays in $DATA.
  • Logs in doze logs mongo and in the app, next to everything else.

What it doesn't

  • No signature. doze didn't build mongod or the image, so it doesn't sign them. A download is pinned by sha256 in doze.lock: a changed file is refused, but nobody vouched for the first one.
  • No pinned version for installed or container. You get whatever mongod is on the PATH, or whatever mongo:7 points at today.
  • No declared databases or users. A module converges those from doze.hcl; a service is just a process.

Want MongoDB-compatible from the registry? FerretDB.

Any Mongo client connects to it. It's FerretDB 2 over a private Postgres, signed and pinned like every module, with databases, collections, indexes and seeds declared in doze.hcl. Not every MongoDB feature is there; check yours.

$ doze add ferret
The ferret module →

The other tools doze add knows

Each gets the same three ways where it can. rabbitmq, opensearch and clickhouse have no known run line, so installed falls back to the container.

NameWhat it isRuns fromPort
mailpitCatches outgoing email; web inbox on the next portmailpit · axllent/mailpit1025
minioS3-compatible object storage (doze AWS has S3 too)minio · minio/minio9000
natsMessaging and streamsnats-server · nats4222
meilisearchTypo-tolerant search enginemeilisearch · getmeili/meilisearch7700
memcachedThe classic in-memory cachememcached · memcached11211
rabbitmqAMQP message brokercontainer rabbitmq:35672
opensearchSearch and log analyticscontainer opensearchproject/opensearch9200
clickhouseColumn-store analytics databasecontainer clickhouse/clickhouse-server8123

Anything else: doze add <name> writes a download block to fill in. What that looks like