Hereβs a complete and easy guide to install Docker and run MongoDB on Raspberry Pi OS (Debian 12).
Run the official installation script:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Add your user to the Docker group (to avoid using sudo
every time):
sudo usermod -aG docker $USER
newgrp docker
docker run -d --name mongodb \
-p 27017:27017 \
-v ~/mongo-data:/data/db \
arm64v8/mongo:5.0 --noauth
docker ps
You should see mongodb
running.
-
Without auth:
mongo mongodb://localhost:27017