Install Mirth Connect Server on Ubuntu

Nicolo Bächler
3 min readJan 4, 2024

What is Mirth Connect?

Mirth Connect is a versatile, open-source software, predominantly utilized in the healthcare sector as a comprehensive integration engine. It serves as a critical tool for enabling various healthcare information systems to communicate and exchange data seamlessly. Mirth Connect achieves this by adeptly processing and transforming messages in multiple formats, such as HL7, XML, X12. This capability ensures compatibility between diverse systems, including electronic health records, laboratory information systems, and a range of other medical applications. As a mediator, Mirth Connect plays a pivotal role in facilitating efficient, secure integration and data flow across the healthcare industry’s diverse systems.

Installation Process

  1. Update Your Ubuntu System

Update and upgrade your Ubuntu system to ensure all packages are current:

sudo apt-get update && apt-get upgrade

2. Install Default Java Development Kit (JDK)
Install the default JDK which is essential for running Java-based applications:

sudo apt install default-jdk

2.1 Install PostgreSQL (Optional)
For database management, install PostgreSQL:

sudo apt install postgresql postgresql-contrib

2.2 Access PostgreSQL Command Line
Switch to the PostgreSQL user to perform database operations:

sudo -u postgres psql

2.3 Create a PostgreSQL Database User
Establish a new user for managing the Mirth Connect database:

CREATE ROLE mirth WITH LOGIN PASSWORD 'yourpassword';

2.4 Create PostgreSQL Database
Generate a new database owned by the newly created user:

CREATE DATABASE mirth WITH OWNER mirth;

3. Install Java Runtime Environment (JRE)
Install the default JRE, which is necessary to run Java applications:

sudo apt install default-jre

4. Download the Latest Mirth Connect Server Version
Obtain the latest version of Mirth Connect Server from the official NextGen website:
Mirth Connect Downloads
Choose the Linux version in Tar.gz format. For example, to download version 4.4.2.b326:

curl https://s3.amazonaws.com/downloads.mirthcorp.com/connect/4.4.2.b326/mirthconnect-4.4.2.b326-unix.tar.gz -o mirthconnect.tar.gz

5. Extract the Downloaded File
Unpack the downloaded tar.gz file:

tar -xvzf mirthconnect.tar.gz

6. Relocate the Mirth Connect Directory
Move the extracted Mirth Connect directory to a suitable location:

sudo mv Mirth\ Connect/ /opt/mirthconnect

7. Configure Mirth Connect
Edit the Mirth Connect properties file to set up database credentials:

nano /opt/mirthconnect/conf/mirth.properties

Update the database URL and credentials. If the database is installed on the same server, use localhost. Otherwise, replace it with your PostgreSQL server’s URL. Example configuration for PostgreSQL:

database = postgres
database.url = jdbc:postgresql://localhost:5432/mirth
database.username = mirth
database.password = yourpassword

8. Manage Mirth Connect Server
Commands to start, check the status, or stop the Mirth Connect Server:

/opt/mirthconnect/mcservice start
/opt/mirthconnect/mcservice status
/opt/mirthconnect/mcservice stop

Connecting to the Mirth Connect Server

To effectively configure the Mirth Connect Server, NextGen recommends using the Mirth Connect Administrator Launcher.

Setting Up Administrator Launcher
Download the Mirth Connect Administrator Launcher from:
Mirth Connect Administrator Launcher Downloads
Run the downloaded .exe file.
Connect to Your Server
Enter the server address:

https://[your server URL]:8443

Default Login Credentials
Use the following default login details to access the server:

Username: admin
Password: admin

--

--