# Run XWiki in Docker, use database server on host system - Possible?

**URL:** <https://forum.xwiki.org/t/run-xwiki-in-docker-use-database-server-on-host-system-possible/8976>\
**Category:** Help / Discuss\
**Tags:** xwiki-docker, docker, mariadb, postgres\
**Created:** [July 4, 2021, 5:56pm UTC](https://forum.xwiki.org/t/run-xwiki-in-docker-use-database-server-on-host-system-possible/8976 "2021-07-04T17:56:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander060101](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/a/858c86/32.png) [@Alexander060101](https://forum.xwiki.org/u/Alexander060101)\
**Post date:** [July 4, 2021, 5:56pm UTC](https://forum.xwiki.org/t/run-xwiki-in-docker-use-database-server-on-host-system-possible/8976/1 "2021-07-04T17:56:59Z")

</div>

Hi,

is it possible to run XWiki in a Docker container but use the database server running on the host system (a Plesk server in my case)?

I tried it with MariaDB 10.1.48 and PostgreSQL 10.17 by setting the DB\_HOST environment variable to the ip address of my docker0 network adapter.  
But I did not get it to work.

I used 13-mysql-tomcat and 13-postgres-tomcat.

When I run MariaDB in a Docker container, too, it works fine.  
I tried that.

So:  
Is this not possible or am I doing something wrong?

Thanks in advance!

Best regards  
Alexander

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [July 23, 2021, 3:50pm UTC](https://forum.xwiki.org/t/run-xwiki-in-docker-use-database-server-on-host-system-possible/8976/2 "2021-07-23T15:50:11Z")

</div>

> [@Alexander060101](#):
>
> is it possible to run XWiki in a Docker container but use the database server running on the host system (a Plesk server in my case)?

yes! I don’t see anything preventing that. You just need to make sure your host is available from within the docker container.
