Skip to content

Instantly share code, notes, and snippets.

@ergin
Last active September 21, 2023 09:32
Show Gist options
  • Save ergin/de7febba564b0e4e2817a6a77042e7af to your computer and use it in GitHub Desktop.
Save ergin/de7febba564b0e4e2817a6a77042e7af to your computer and use it in GitHub Desktop.

Install MongoDB on Windows by scoop

I'm installing version 6.3.2 but you can change the version anything you want to install just by replacing "6.3.2" with the other version.

Install MongoDB v6.3.2

scoop install mongodb@6.3.2 -g

Configure MongoDB as a Windows Service

cd C:\ProgramData\scoop\apps\mongodb\6.3.2\bin
mongod.exe --install --serviceName MongoDB@6.3.2 --serviceDisplayName MongoDB@6.3.2

Start or Stop MongoDB Service

net start MongoDB@6.3.2
net stop MongoDB@6.3.2

Note: you can use Task Manager -> Services tab -> MongoDB@6.3.2 to start/stop without commands above.

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