This guide will assist you in installing NSSM to run Musicbot in the background of Windows, automatically restart it if it crashes, and at startup.
- Download the latest release of NSSM.
- Extract the zip somewhere easily accessible.
- Open a command prompt as administrator
- cd to the Win64 folder within the
nssm-2.24
folder you extracted from the zip file. - Run
where python
. You’ll need this information while setting up the Musicbot service. - Run
.\nssm.exe install
- In the Path field, you’ll want to use the output of
where python
from earlier. - In the Starting Directory field, you’ll want to use the MusicBot folder you got from installing Musicbot.
- In the Arguments field, just put
run.py
- Set the Service Name field to MusicBot, or something you’ll remember, and hit Install Service.
- Run
.\nssm.exe start MusicBot
There you have it, Musicbot should now be running in the background, should restart whenever it crashes, and should start on startup.