Salad.Guyo
Salad.Guyo

Reputation: 3425

How to create service for django app with nssm on windows

nssm service to run django application.

I have created nssm service to run my django app on windows machine but it doesn't work. Please suggest an alternative package or the right config to get the service running. Here is the command I used.

Adding nssm to environment variable

some_shell>setx PATH "%PATH%;C:\Users\app\nssm" /M

Creating nssm service

some_shell>nssm install myappservice

Here I gave C:\Users\django_app\manage.py as path and;

C:\Users\django_app as Startup directory

I get "windows could not start the myappservice on local computer..." error whenever I try to start the service.

Upvotes: 0

Views: 1374

Answers (1)

moein_py
moein_py

Reputation: 168

Go ahead and select python.exe in your env or venv path and give it "manage.py runserver" as command and set the startup path to your project this way it gets started

Upvotes: 1

Related Questions