CloudEHRServer EN | ES

Want to test the EHRServer?

This guide will help you install it on your computer.

1. Installing the EHRServer


1) Download and Install MySQL Server

Download here

2) Download and Install Grails 2.5.6

Download and installation instructions here


3) Download EHRServer

You can download latest development version of EHRServer from here. You can download the latest release from here.

4) Configure the database

Edit the DaraSource, under the "development" environment, check this. If the database you configured doesn’t exist, you need to create it in your DBMS (e.g. MySQL). For simplicity name it "ehrserver".

5) Create working folders and configure paths

opts & opts/base_opts

The project includes a folder called "opts". Inside there is a "base_opts" folder, where the default Operational Templates (definitions of openEHR clinical documents) are located. When the EHRServer is started, the OPTs from "base_opts" are copied (and renamed) to "opts", only those definitions will be used by the EHRServer. You can move the "opts" folder to any location, but you need to update the entry "app.opt_repo" in the Config script to reflect the new location of the folder.


The project includes a folder called "xsd" where the needed XML Schemas are located. You can move that folder to any location, but you need to update these entries on the Config.groovy:

  • app.version_xsd
  • app.xslt
  • app.opt_xsd

Note: if you run the EHRServer from the WAR in a Web Server like Tomcat, the xsd folder is not needed because it is packaged with the app in the WAR file.

versions & commits

You need to create these working folders if those are not included in the EHRServer you downloaded. Those folders should have permissions to read and write. After you create that folder, you need to update the entry "app.version_repo" and "app.commit_logs" on the Config script.

By default, those folders are ehrserver/versions and ehrserver/commits, where "ehrserver" is the folder in which the EHRServer code is.

6) Add the ENV VAR to generate REST API Tokens

It's mandatory to configure the EHRSERVER_REST_SECRET environment variable, and it's recommended to assing an UUID as the value.

For instance you can have something like this: EHRSERVER_REST_SECRET=6067dba9-1234-1234-1234-92208c77ce77

How to configure environment variables?

How to get an UUID?

7) Run the EHRServer


Execute this command line from the project folder:

$ehrserver> grails -Dserver.port=8090 -Duser.timezone=UTC run-app

This will run the server locally, on the port 8090, so you will be able to access it through: http://localhost:8090/ehr


Use admin / admin / 123456 (username, password, organization) to login, and you are ready to go. That is the administration user, so it has special access to all the functionalities of the EHRServer.

For a more constrained user, you can use this login: orgman / orgman / 123456 (username, password, organization). That user is an organization manager, and can only manage it’s organizations, so some items on the menu are hidden from this user as only the admin has rights to access them.

8) Create environment variables if you will use the "create account" feature locally

When an account is created, it needs to send an email with some basic account information, and a link to reset the password. The email service needs to be configured to do that. We use these environment variables to do that configuration:

  • EHRSERVER_EMAIL_HOST: URL / IP of your SMTP server
  • EHRSERVER_EMAIL_PORT: port number of your SMTP server
  • EHRSERVER_EMAIL_USER: valid user on your SMTP server (probably an email address)
  • EHRSERVER_EMAIL_PASS: password corresponding to the user
  • EHRSERVER_EMAIL_FROM: the email address that will appear to the receiver as "from"

You can see where this configuration is used here

If you face any issues, you can use our community forum.