Install Manually
This guide is for manually installing an OpenHIM instance using the built zipped application releases available on their respective github pages.
This method is useful for on-site implementation without internet access.
#
PrerequisitesThis guide assumes that you are installing on an ubuntu server and that the following is already installed and setup:
- NodeJS (v12 or later)
- NPM
- MongoDB (v3.6 or later)
Note:
libappstream3
may cause problems with the npm package manager if your ubuntu instance is not fully updated.
#
Installing the OpenHIM CoreDownload the latest OpenHIM Core release
Unzip the file
To make use of your own custom configurations, you have two options:
You can copy the default.json config file and override the default settings:
wget https://raw.githubusercontent.com/jembi/openhim-core-js/master/config/default.json
. Then, depending on your environment instance, rename the file. For example, in the production setup name the fileproduction.json
. Move your new file into the/config
directory of the project.You can use environment variables to set specific parameters. Environment variables use a _ as a separator for nested keys. For example, to change the port that the Application Programming Interface (API) listens on and to change the ports that the router listens on you could do the following:
api_httpsPort=8081 router_httpsPort=50456 router_httpPort=50457 npm start
Note: The environment variables are case sensitive.
For more information about the config options see our config overview page.
Finally start the OpenHIM Core with the following:
When you start up the OpenHIM Core make sure the
NODE_ENV
matches the setup environment. ie: If you name the config fileproduction.json
make sure theNODE_ENV
is set toproduction
#
Installing the OpenHIM ConsoleBefore installing the OpenHIM console, it is required that you first have the OpenHIM core server up and running. The OpenHIM console communicates with the OpenHIM core via its API to pull and display data.
We recommended that as soon as the OpenHIM core is up and running that you setup a properly signed TLS certificate. However, it is possible to do this later through the OpenHIM console on the Certificates page.
Download the latest OpenHIM Console release
Unzip the file
The next step is vital for the successful setup of the OpenHIM console. First configure the console to point to your OpenHIM core server and then navigate to the config/default.js file in the extracted folder and edit it as follows:
- Finally, start the OpenHIM Console with the following:
#
Ensure communication between the OpenHIM Console and CoreLogin to the console. Defaults to http://localhost:9000
If you enabled SSO, please make sure that Keycloak is up and running, and the openid authentication type if enabled in the openhim-core.