MongoDB / Installation & setup
CLI tools & setup
Prepare your workspace, run a small example and check the result before starting the course.
A terminal is where you type commands. A runtime or compiler runs your code; a package manager installs project dependencies. Follow the tools and command surfaces named in this course’s guide.
Already set up? Continue to What Is MongoDB? →
BEFORE THE FIRST CODING TASK
Your computer, ready to learn.
A disposable local MongoDB instance
Create a new practice folder in your editor and open its integrated terminal there. Use a separate folder from personal or production projects. Prepare a running Docker engine and install mongosh using the official supported-platform guides. Check host CPU/image support. This fixture is local-only, has no application credentials and loses its disposable data when the --rm container stops.
Already configured? Run the verification steps and continue. Use the command surface labelled beside each snippet, such as your terminal or SQL console.
- 1
Check the local engine and client.
Windows · Terminaldocker version mongosh --versionWhat you should see: The Docker server and MongoDB shell are available.
Something didn’t work?
The server image and shell are separate prerequisites. Check platform/CPU support before pulling an image.
- 2
Start a new local-only practice container and keep this terminal open.
Windows · Terminaldocker run --rm --name pebells-mongo -p 127.0.0.1:27017:27017 mongodb/mongodb-community-server:9.0-ubi9-slimWhat you should see: The database process starts in the foreground on the local mapped port.
Something didn’t work?
Choose a new container name/port if occupied. Check engine, memory, image and CPU errors rather than disabling protections.
- 3
Open another terminal and ask the local server to respond.
Windows · Terminalmongosh "mongodb://127.0.0.1:27017" --quiet --eval "db.runCommand({ ping: 1 })"What you should see: The response contains ok: 1.
Something didn’t work?
Wait for startup and verify the mapped port. A running container alone does not prove the database accepts requests.
Check it yourself
Explain client versus server, make a small synthetic test collection in a practice database and verify its contents. This disposable setup is not authenticated production hosting; stop the foreground process with Ctrl+C when finished.
This is a self-check; it does not mark a lesson or course complete.
Official setup guides & version requirements
My workspace notes
Notes stay in this browser. They are not uploaded or assessed.