Skip to content

Instantly share code, notes, and snippets.

@ergin
Last active December 10, 2023 18:28
Show Gist options
  • Save ergin/907a957d3db10675913aef41616d14ef to your computer and use it in GitHub Desktop.
Save ergin/907a957d3db10675913aef41616d14ef to your computer and use it in GitHub Desktop.

Install MongoDB on Windows by scoop

Follow the below steps to install the latest version of MongoDB on Windows by scoop package manager.

Install MongoDB

scoop install mongodb -g

Configure MongoDB as a Windows Service

cd C:\ProgramData\scoop\apps\mongodb\current\bin
mongod.exe --install --serviceName MongoDb --serviceDisplayName MongoDb --config C:\ProgramData\scoop\apps\mongodb\current\bin\mongod.cfg

Start or Stop MongoDB Service

You can use command line to start/stop MongoDB service or alternatively use the Services menu in the Task Manager.

net start MongoDb
net stop MongoDb

Note: tested with MongoDB v7.0.1 on Windows 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment