We provide three Docker images for various deployments: "all-in-one" for quick testing and experiments, a development image for debugging problems, and a production image for all other cases.
All-in-one image is documented in the README.md file in the repository. The rest are covered below.
Our production image
is recommended for most deployments.
It does not include PostgreSQL or other backends, so you must run them separately.
You can do that with Docker Compose, Kubernetes, or other means.
Setup with Docker Compose
The following steps describe a quick local setup:
Store the following in the
postgrescontainer runs PostgreSQL that would store data in the
./datadirectory on the host.
Start services with
docker compose up -d.
If you have
mongoshinstalled, just run it to connect to FerretDB. It will use credentials passed in
mongoshflags or MongoDB URI to authenticate to the PostgreSQL database. You'll also need to set
PLAIN. The example URI would look like:
If you don't have
mongosh, run the following command to run it inside the temporary MongoDB container, attaching to the same Docker network:
docker run --rm -it --network=ferretdb --entrypoint=mongosh mongo \
You can improve that setup by:
- securing connections with TLS;
- adding backups.
Find out more about:
The development image
contains the debug build
of FerretDB with test coverage instrumentation, race detector,
and other changes that make it more suitable for debugging problems.
It can be used exactly the same way as the production image, as described above.