# Postgres already running

**URL:** https://meta.discourse.org/t/postgres-already-running/131128
**Category:** Self-hosting
**Created:** [October 16, 2019, 2:46am UTC](https://meta.discourse.org/t/postgres-already-running/131128 "2019-10-16T02:46:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JohnAMacDonald](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@JohnAMacDonald](https://meta.discourse.org/u/JohnAMacDonald)
#### Post date: [October 16, 2019, 2:46am UTC](https://meta.discourse.org/t/postgres-already-running/131128/1 "2019-10-16T02:46:56Z")

</div>

Hello all,

Apologies if I sound dumb, as I’m new to this, however, I’m trying to run two websites on my Ubuntu 16.04, Pterodactyl Panel and Discourse, I got Pterodactyl Panel working, and Discourse works without Nginx, however when i follow these instructions: [https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247)

However after setting discourse up for Nginx, I get this error after rebuild with the command: ` /var/discourse/launcher rebuild app`

I get this error:.

```plaintext
FAILED
--------------------
Pups::ExecError: socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1 failed with return #<Process::Status: pid 1928 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1"
4deb791432a587b5cc6777001a71fd6391e5982fe830f339115c2002e07c17fb
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem

```

Any help would be much appreciated!

Thanks!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 16, 2019, 2:49am UTC](https://meta.discourse.org/t/postgres-already-running/131128/2 "2019-10-16T02:49:29Z")

</div>

[Move from standalone container to separate web and data containers](https://meta.discourse.org/t/how-to-move-from-standalone-container-to-separate-web-and-data-containers/29413) will give you some hints on how to have a separate data container. See also the multisite #howto which describes creating multiple databases.

---

<div class="post-metadata">

### Author: ![JohnAMacDonald](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@JohnAMacDonald](https://meta.discourse.org/u/JohnAMacDonald)
#### Post date: [October 16, 2019, 2:51am UTC](https://meta.discourse.org/t/postgres-already-running/131128/3 "2019-10-16T02:51:07Z")

</div>

Interesting, I will take a look at that, so that should fix my issue? Or is there something else I could look at in the meantime?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 16, 2019, 12:35pm UTC](https://meta.discourse.org/t/postgres-already-running/131128/4 "2019-10-16T12:35:28Z")

</div>

You can’t run two postgres servers,so you’ll need to get both applications to use the same one. Mostly, you add the discourse database to the existing server and put the user, password, and host values in environment variables in your yml file.
