When working with the binary version of Restcomm, the default database is hsqlDB. This is of course not suitable for production but it is provided as a way for you to conveniently and quickly start up Restcomm. If you are running Restcomm on Amazon Cloud, the configuration and setup comes with MariaDB. For those who wish to run Restcomm on a local server or on another cloud based system, the following tutorial will show you how to get started with Restcomm and MariaDB


  • Make sure MariaDB is installed, for those run on systems that supports Yum install, see the instruction HERE

  • Download the latest version of Restcomm-Connect as explained in Starting Restcomm-Connect

Step 1 - Adding the MariaDB JDBC connector to JBoss Datasource

  • Edit $RESTCOMM_HOME/standalone/configuration/standalone-sip.xml file

  • Under the datasource tag add the following:

  • Make sure you are using the correct IP address and port default port 3306. In the example below the local IP is

  • Use the correct username and password for the MariaDB access

  • Set the MariaDB enabled="true" and make sure you set the default dummy datasource to "false"

<datasource jndi-name="java:/MariaDS" pool-name="MariaDS" enabled="true">
  • In the datasource under the drivers tag, add the following:

  • save and exit the standalone-sip.xml file

<driver name="mariadb" module="org.mariadb.jdbc">

Step 2 - Configuring the mybatis.xml file to use MariaDB

  • Edit the file $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/mybatis.xml

  • Change the environments id to id="mariadb"

  • Add the MariaDB configuration environment tag as shown below

<environments default="mariadb">
        <environment id="mariadb">
                <transactionManager type="JDBC" />
                <dataSource type="JNDI">
                        <property name="data_source" value="java:/MariaDS" />
  • Save and exist the mybatis.xml file

Step 3 - Download MariaDB Java Client Driver

  • Download the mariaDB java client driver from HERE

  • Go to the directory $RESTCOMM_HOME/modules

  • Run the following command to create a new directory structure:  mkdir -p ./org/mariadb/jdbc/main

  • Go to the newly created directory structure $RESTCOMM_HOME/modules/org/mariadb/jdbc/main

  • Copy the downloaded mariadb-java-client-1.2.0.jar to the $RESTCOMM_HOME/modules/org/mariadb/jdbc/main

  • In the $RESTCOMM_HOME/modules/org/mariadb/jdbc/main create a new xml file called module.xml

  • The content of the module.xml should be similar to the one below. Notice the path name of the java client must matches the one you download

  • You should now have 2 files in the $RESTCOMM_HOME/modules/org/mariadb/jdbc/main directory.

<?xml version="1.0" encoding="UTF-8" ?>
<module xmlns="urn:jboss:module:1.1" name="org.mariadb.jdbc">
        <resource-root path="mariadb-java-client-1.2.0.jar"/>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>

 Step 4 - Start mariaDB and Create the restcomm Database.

  • Start mariaDB  - sudo /etc/init.d/mysql start

  • Go to the directory $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/scripts/mariadb

  • There will be an init.sql file and an sql directory

  • Create the restcomm database from the init.sql as follows:

  • mysql -u root < init.sql

Step 5 - Edit the restcomm.xml file to point the DAO to mariadb

  • Edit the file $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/dao-manager.xml

  • Find the dao-manager tag and change the sql-files path to mariadb as shown below

 <dao-manager class="org.restcomm.connect.dao.mybatis.MybatisDaoManager">

Start Restcomm as explained in Starting Restcomm-Connect