12.12. (MANUAL) CamCOPS Windows service¶
These instructions relate to manual server installation. For a simpler Docker-based system, see here.
The most convenient way of running a CamCOPS server under Windows is via a service.
The service starts the following:
the CamCOPS web server, via CherryPy (equivalent to running
the CamCOPS scheduler, via Celery (equivalent to running
the CamCOPS back-end worker processes, via Celery (equivalent to running
To create a Windows service for CamCOPS, use the
command. You will need to run it from a command prompt with Administrator
Before starting the server, ensure you have set the following two system environment variables:
CAMCOPS_WINSERVICE_LOGDIR, determining where disk logs are stored;
CAMCOPS_CONFIG_FILE, governing which config file will be used.
Logs from CamCOPS go to files in the directory specified by the environment variable. However, output from the service itself goes to the Windows operating system logs: see.
Options as of 2019-04-23:
usage: 'camcops_windows_service-script.py [options] install|update|remove|start [...]|stop|restart [...]|debug [...]' Options for 'install' and 'update' commands only: --username domain\username : The Username the service is to run under --password password : The password for the username --startup [manual|auto|disabled|delayed] : How the service starts, default = manual --interactive : Allow the service to interact with the desktop. --perfmonini file: .ini file to use for registering performance monitor data --perfmondll file: .dll file to use when querying the service for performance data, default = perfmondata.dll Options for 'start' and 'stop' commands only: --wait seconds: Wait for the service to actually start or stop. If you specify --wait with the 'stop' option, the service and all dependent services will be stopped, each waiting the specified period. # The ‘debug’ option runs a service in debugging mode so you can see what it’s doing.