Download NSSM on windows and set the nssm.exe file path to system environment variables. Run cmd as admin and try installing service with nssm install Astroved (You can put any service name instead of Astroved) A nssm service window will appear. Set Path to the python.exe path directory (If you are using virtualenv, choose the Python from the virtual environment.) Set Startup directory to the main.py folder testapi path drectory Set Arguements to main.py and click Start service Or we can install nssm with cmd - nssm install [Service Name] [python.exe PATH] main.py nssm set AppDirectory [Your App Folder PATH] nssm start [Service Name] You can start the service with nssm start Astroved too. Check the service status nssm status Astroved If the status shows the service is running, then check in the browser with host ip and port number.