# Using existing Postgres DB for Central

**URL:** <https://forum.getodk.org/t/using-existing-postgres-db-for-central/54562>\
**Category:** Support\
**Tags:** odk-central\
**Created:** [April 16, 2025, 3:48pm UTC](https://forum.getodk.org/t/using-existing-postgres-db-for-central/54562 "2025-04-16T15:48:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdang](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jdang/32/29879_2.png) [@jdang](https://forum.getodk.org/u/jdang)\
**Post date:** [April 16, 2025, 3:48pm UTC](https://forum.getodk.org/t/using-existing-postgres-db-for-central/54562/1 "2025-04-16T15:48:04Z")

</div>

Hi Everyone,

My company wants to host the Odb-Central server on premise, and we want the ODK-Central to connect to our Postgress instance, is this possible? If yes then where I can get the schema to load into our db?

Jdang

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [April 16, 2025, 5:32pm UTC](https://forum.getodk.org/t/using-existing-postgres-db-for-central/54562/2 "2025-04-16T17:32:04Z")

</div>

These are the resources I'd recommend...

- [https://docs.getodk.org/central-install-digital-ocean/#using-a-custom-database-server](https://docs.getodk.org/central-install-digital-ocean/#using-a-custom-database-server)
- [https://docs.getodk.org/central-install-digital-ocean/#using-s3-compatible-storage](https://docs.getodk.org/central-install-digital-ocean/#using-s3-compatible-storage)

---

<div class="post-metadata">

**Author:** ![poVoq](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/povoq/32/4838_2.png) [@poVoq](https://forum.getodk.org/u/poVoq)\
**Post date:** [April 16, 2025, 5:48pm UTC](https://forum.getodk.org/t/using-existing-postgres-db-for-central/54562/3 "2025-04-16T17:48:25Z")

</div>

ODK will autogenerate the shema on first start, no need to preload it.

---

<div class="post-metadata">

**Author:** ![jdang](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jdang/32/29879_2.png) [@jdang](https://forum.getodk.org/u/jdang)\
**Post date:** [April 16, 2025, 8:40pm UTC](https://forum.getodk.org/t/using-existing-postgres-db-for-central/54562/4 "2025-04-16T20:40:59Z")

</div>

thanks, I will take a look.

Jdang

---

<div class="post-metadata">

**Author:** ![jdang](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jdang/32/29879_2.png) [@jdang](https://forum.getodk.org/u/jdang)\
**Post date:** [May 28, 2025, 3:20pm UTC](https://forum.getodk.org/t/using-existing-postgres-db-for-central/54562/6 "2025-05-28T15:20:23Z")

</div>

@yanokwa, I followed all steps in this section:

 ![image](https://getodk.b-cdn.net/uploads/default/original/3X/3/b/3b7ff21337633d98c8fae25520664eedcdb6bf23.png)  
from this doc [https://docs.getodk.org/central-install-digital-ocean/#using-a-custom-database-server](https://docs.getodk.org/central-install-digital-ocean/#using-a-custom-database-server).  
However, when I start my docker compose file, I see this error:  
 ![image](https://getodk.b-cdn.net/uploads/default/original/3X/a/9/a9db777bada231aee577ddd5fd7ad1b079615575.png) even though I can connect to my external Db  
 ![image](https://getodk.b-cdn.net/uploads/default/original/3X/e/d/ed48d81be95cfbe6b283cd0eb6bc4ceb88cdcdb1.png)

What else do I need to do?

Thanks,

Jdang

---

<div class="post-metadata">

**Author:** ![jdang](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jdang/32/29879_2.png) [@jdang](https://forum.getodk.org/u/jdang)\
**Post date:** [May 28, 2025, 10:07pm UTC](https://forum.getodk.org/t/using-existing-postgres-db-for-central/54562/7 "2025-05-28T22:07:24Z")

</div>

This post help alot. [Issues with connecting postgres (localhost) with latest odk central (v 2023.2) - #7 by Arunbala](https://forum.getodk.org/t/issues-with-connecting-postgres-localhost-with-latest-odk-central-v-2023-2/41568/7).  
and here is the details about the solution:

 ![image](https://getodk.b-cdn.net/uploads/default/original/3X/d/4/d4cb843489fdd3c6ad507120604fb65cb4dc3dfd.png)
