How to use remote SQL database


If you would like to use the remote PostgreSQL database, on the server side you need to allow remote connections from the GitLab host. This can be done using the Ansible inventory variables:

postgresql_server__listen_addresses: [ '*' ]
postgresql_server__allow: [ '' ]

On the GitLab host, you need to enable the debops.postgresql role by adding the host to its respective Ansible inventory group:


The PostgreSQL client role also needs to be pointed to the remote database server, it can be done using the Ansible inventory variables:

postgresql__server: ''

The debops.gitlab role should detect the PostgreSQL configuration automatically. If not, you can force the use of the PostgreSQL server through the Ansible inventory:

gitlab__database: 'postgresql'


MariaDB / MySQL databases are not supported anymore. GitLab's developers themselves discourage their use: