Console Configuration
The OpenHIM console is accessible by navigating to your web server.
Note: The default port for the OpenHIM console is port 80. It is possible to change this port in your NGINX configuration file. See How to update your NGINX Config file for instructions on how to do this.
For example, assuming your web server host is your local machine, the Uniform resource Locator (URL) will be http://localhost:80/. The default OpenHIM administrator login credentials are as follows. Upon logging in, you will be prompted to customize your credentials so that it is more secure:
- Username: [email protected]
- Password: openhim-password
Note: You will have problems logging in if your OpenHIM server is still setup to use a self-signed certificate (the default). This for the case where the OpenHIM core is set up to use the https protocol. The protocols https and http are both supported (https is the default). The protocol to use can be set in the core config.
Please see section How to Setup SSL which identifies the steps necessary to generate a free certificate. If you choose to do this later, you may get around this by following these steps:
- Visit the following link: https://localhost:8080/authenticate/[email protected] in Chrome.
Note: Make sure you are visiting this link from the system that is running the OpenHIM core. Otherwise, replace localhost and 8080 with the appropriate OpenHIM core server hostname (or IP Address) and API port.
- You should see a message saying “Your connection is not private”. Click “Advanced” and then click “Proceed”.
- Once you have done this, you should see some JSON text displayed on the screen, you can ignore this and close the page. This will ignore the fact that the certificate is self-signed.
- Now, you should be able to go back to the OpenHIM console login page and login. This problem will occur every now and then until you load a properly signed certificate into the OpenHIM core server.
The credentials used from this point will be considered the OpenHIM administrative account and is therefore highly recommended that you apply a strong password. General best practices in password creation that have been identified in this article may help you.
#
How to update your NGINX Config fileThe following steps guides you through the process of updating your NGINX config file for the purpose of changing the default listening port for the OpenHIM console:
- Navigate to the NGINX config file
vim /etc/nginx/sites-enabled/openhim-console
- Add the following line directly after the curly bracket: listen 12345; // Where 12345 is the port number that you have chosen to use
- Save and exit with the command :wq
- Check your configuration for syntax errors
sudo nginx -t
- Refresh the NGINX config
service nginx reload
Your NGINX configuration will then appear as follows:
#
How to Generate a free Let’s Encrypt (letsencrypt) certificateNote: This section only applies to OpenHIM installations that have a public facing domain name. If you are running the OpenHIM on your local machine or on a virtual machine, you may continue with the self-signed certificate.
You are able to generate a free certificate by following these steps:
Fetch letsencrypt certbot script and make it executable (These commands assume you are running as the root user):
Install certbot dependencies (If this fails and you have a small amount of ram then you may need to add a swapfile):
Allow the openhim the ability to read the generated certificate and key:
Change your OpenHIM cert config in /etc/openhim/config.json to the following:
Setup auto renewal of the certificate:
Append the following line at the end of your crontab: