Skip to content
On this page

Web server

CareSuite uses a Nginx web server as a reverse proxy. Nginx is running as a Docker container and listens on Port 80 and 443 (SSL).

You can modify the Nginx webserver config by editing the file /opt/caresuite/data/server.conf.

Testing the configuration

Every time the server config has been modified, make sure to validate the new configuration:

$ sudo cs.docker exec proxy nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If you don't see syntax is ok and test is successful your configuration contains errors and needs to be fixed.

Reloading the configuration

You can reload the new server configuration by running the following command:

$ sudo cs.docker exec proxy nginx -s reload
2020/01/01 00:00:00 [notice] 7#7: signal process started

If you don't see signal process started make sure to fix any configuration mistakes by testing the configuration


The CareSuite is reachable via https:// by default using a self-signed certificate. This means you will see a certificate error until you import the CA certificate /opt/caresuite/data/ca_import_me.crt into the certificate store of your browser or OS.

Custom Certificate

To use a custom certificate, copy it and the certificate key file to the /opt/caresuite/data/certs directory.

You can rename or delete the existing default certificate and key.

$ ls /opt/caresuite/data/certs
-rw-r--r-- 1 root root 1919 Jul 24 14:37 caresuite.crt
-rw------- 1 root root 1704 Jul 24 14:38 caresuite.key

Redirect all traffic to HTTPS

To redirect all incoming requests to HTTPS, uncomment the following lines in the data/server.conf file and test and reload the server config.

## Uncomment the following lines to redirect all HTTP traffic to HTTPS.
if ($scheme = "http") {
    return 301 https://$host$request_uri;