# Ciphermail Community Virtual Appliance External Database Configuration

**URL:** <https://community.ciphermail.com/t/ciphermail-community-virtual-appliance-external-database-configuration/1056>\
**Category:** General\
**Created:** [May 19, 2026, 10:25pm UTC](https://community.ciphermail.com/t/ciphermail-community-virtual-appliance-external-database-configuration/1056 "2026-05-19T22:25:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmo](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@rmo](https://community.ciphermail.com/u/rmo)\
**Post date:** [May 19, 2026, 10:25pm UTC](https://community.ciphermail.com/t/ciphermail-community-virtual-appliance-external-database-configuration/1056/1 "2026-05-19T22:25:31Z")

</div>

Hi all,

I have a problem with the Ciphermail Community Edition Virtual Appliance.

I was trying to follow the instructions to connect to a PostgreSQL database ( [Setup — CipherMail Documentation](https://www.ciphermail.com/documentation/gateway-administration-guide/setup.html#postgresql) ) but the configuration file we’re supposed to create:

```auto
sudo vi /etc/ciphermail/ansible/group_vars/all/database.yml

```

Is ignored, and the configuration after running the playbook command is always the default localhost MariaDB.

I’m stumped. At one point I tried using different variable names, because I found the template.

I tried:

```auto
---
ciphermail_database_config__database_type: 'custom'
ciphermail_database_config__connection_url: 'jdbc:postgresql://<database-host>:<database-port>/<database-name>?<database-options>'
ciphermail_database_config__driver_class: 'org.postgresql.Driver'
ciphermail_database_config__database_name: '<database-name>'
ciphermail_database_config__database_user: '<database-user>'
ciphermail_database_config__database_password: '<database-password>'

```

I also tried:

```auto
---
ciphermail_community__database_type: 'custom'
ciphermail_community__connection_url: 'jdbc:postgresql://<database-host>:<database-port>/<database-name>?<database-options>'
ciphermail_community__driver_class: 'org.postgresql.Driver'
ciphermail_community__database_name: '<database-name>'
ciphermail_community__database_user: '<database-user>'
ciphermail_community__database_password: '<database-password>'

```

But it didn’t work.

I’m not sure what I’m doing wrong, probably something obvious, and would appreciate any help.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![rmo](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@rmo](https://community.ciphermail.com/u/rmo)\
**Post date:** [May 19, 2026, 10:37pm UTC](https://community.ciphermail.com/t/ciphermail-community-virtual-appliance-external-database-configuration/1056/2 "2026-05-19T22:37:13Z")

</div>

Just to add some more information, I tried appliance versions 6.2.5 and 6.3.2, with kvm.

---

<div class="post-metadata">

**Author:** ![martijn](https://dub1.discourse-cdn.com/flex017/user_avatar/community.ciphermail.com/martijn/32/127_2.png) [@martijn](https://community.ciphermail.com/u/martijn)\
**Post date:** [May 20, 2026, 9:08am UTC](https://community.ciphermail.com/t/ciphermail-community-virtual-appliance-external-database-configuration/1056/3 "2026-05-20T09:08:10Z")

</div>

Configuring the gateway using ansible is only supported by the pro/enterprise edition.

To configure an external database with the community edition, you need to create a config file `/etc/ciphermail/spring.config.d/database/application.yml`

For example for MariaDB:

```yaml
---
ciphermail:
  hibernate:
    connection:
      driver_class: 'org.mariadb.jdbc.Driver'
      url: 'jdbc:mariadb://127.0.0.1:3306/ciphermail'
      username: 'dbuser'
      password: 'dbpassword'

```

See [Vagrantfile · main · CipherMail B.V. / ciphermail-community-gateway · GitLab](https://gitlab.com/ciphermail/ciphermail-community-gateway/-/blob/main/Vagrantfile?ref_type=heads) (look for `alma9_install_ciphermail`) for a full installation script (for a Vagrant box) with a database config file `application.yml`

---

<div class="post-metadata">

**Author:** ![rmo](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@rmo](https://community.ciphermail.com/u/rmo)\
**Post date:** [May 20, 2026, 11:09am UTC](https://community.ciphermail.com/t/ciphermail-community-virtual-appliance-external-database-configuration/1056/4 "2026-05-20T11:09:10Z")

</div>

Thank you! Good to know that I’m not doing something wrong. By the way, is this mentioned in the documentation and I missed it?

---

<div class="post-metadata">

**Author:** ![martijn](https://dub1.discourse-cdn.com/flex017/user_avatar/community.ciphermail.com/martijn/32/127_2.png) [@martijn](https://community.ciphermail.com/u/martijn)\
**Post date:** [May 20, 2026, 11:48am UTC](https://community.ciphermail.com/t/ciphermail-community-virtual-appliance-external-database-configuration/1056/5 "2026-05-20T11:48:19Z")

</div>

See [README.md · main · CipherMail B.V. / ciphermail-community-gateway · GitLab](https://gitlab.com/ciphermail/ciphermail-community-gateway/-/blob/main/README.md)
