# I want to keep PostgreSQL database on separate server \[standard docker install\]

**URL:** https://meta.discourse.org/t/i-want-to-keep-postgresql-database-on-separate-server-standard-docker-install/235497
**Category:** Self-hosting
**Created:** [August 8, 2022, 9:56pm UTC](https://meta.discourse.org/t/i-want-to-keep-postgresql-database-on-separate-server-standard-docker-install/235497 "2022-08-08T21:56:01Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kuaza](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuaza/32/264151_2.png) [@kuaza](https://meta.discourse.org/u/kuaza)
#### Post date: [August 8, 2022, 9:56pm UTC](https://meta.discourse.org/t/i-want-to-keep-postgresql-database-on-separate-server-standard-docker-install/235497/1 "2022-08-08T21:56:02Z")

</div>

I tried everything but I always get this error. I tried the methods below but I get the same error every time.

> [@Configure Discourse to use a separate PostgreSQL server](https://meta.discourse.org/t/running-discourse-with-a-separate-postgresql-server/46375):
>
> Let’s say you’re using AWS RDS, or an existing PostgreSQL server managed elsewhere. It’s fairly straightforward to get Discourse to use such a setup, without needing to grant superuser privileges to anything that Discourse itself runs. Here’s how. Prerequisites Discourse requires PostgreSQL’s major version to [match what we ship with in our docker images](https://github.com/discourse/discourse_docker/blob/main/image/base/Dockerfile#L37); if you try to run on a newer or older version, it might work, but we don’t guarantee it, and if something breaks in the future, you get to …

Error:

```plaintext
./launcher rebuild app
x86_64 arch detected.
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
(<unknown>): did not find expected key while parsing a block mapping at line 40 column 3 -e LANG=en_US.UTF-8
YAML syntax error. Please check your containers/*.yml config files.

```

Is it not working because it is a standard installation? thank you for helping.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 8, 2022, 9:58pm UTC](https://meta.discourse.org/t/i-want-to-keep-postgresql-database-on-separate-server-standard-docker-install/235497/2 "2022-08-08T21:58:01Z")

</div>

That means that you made a mistake while editing the app.yml file. You need to edit and fix the mistake that is around the line 40.

---

<div class="post-metadata">

### Author: ![kuaza](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuaza/32/264151_2.png) [@kuaza](https://meta.discourse.org/u/kuaza)
#### Post date: [August 9, 2022, 3:08pm UTC](https://meta.discourse.org/t/i-want-to-keep-postgresql-database-on-separate-server-standard-docker-install/235497/3 "2022-08-09T15:08:35Z")

</div>

Thanks for your interest but I’m not making mistakes, I’ve tried every possible way. It gives the error only when I add these codes. It doesn’t give an error when I remove it. and I remove the code in the line where it gives an error, interestingly it gives the same error again. in the error code `LANG=en_US.UTF-8`

```plaintext
DISCOURSE_DB_SOCKET: ''
    DISCOURSE_DB_USERNAME: "ssss"
    DISCOURSE_DB_PASSWORD: "sssss"
     DISCOURSE_DB_HOST: localhost
    DISCOURSE_DB_NAME: "sssss"
    DISCOURSE_DB_PORT: "5432"

```

Am I adding the codes in the wrong place? Shouldn’t it be added under env:?

- my new server database postgresql 14

Thanks for help

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [August 9, 2022, 3:45pm UTC](https://meta.discourse.org/t/i-want-to-keep-postgresql-database-on-separate-server-standard-docker-install/235497/4 "2022-08-09T15:45:29Z")

</div>

YAML is white-space indented and it’s very easy to make mistakes like this if you aren’t familiar with it and very careful.

Every one of those must be under the `env` section and following the same identation level as other similar keys. You can leverage tools like [http://www.yamllint.com/](http://www.yamllint.com/) to validate your configuration.

---

<div class="post-metadata">

### Author: ![kuaza](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuaza/32/264151_2.png) [@kuaza](https://meta.discourse.org/u/kuaza)
#### Post date: [August 9, 2022, 6:19pm UTC](https://meta.discourse.org/t/i-want-to-keep-postgresql-database-on-separate-server-standard-docker-install/235497/5 "2022-08-09T18:19:36Z")

</div>

You are amazing, I was so busy because of an interesting gap 🙂 I owe you..

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 8, 2022, 6:20pm UTC](https://meta.discourse.org/t/i-want-to-keep-postgresql-database-on-separate-server-standard-docker-install/235497/6 "2022-09-08T18:20:22Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
