# Database in VPS inside a docker container

**URL:** <https://community.forestadmin.com/t/database-in-vps-inside-a-docker-container/1664>\
**Category:** Help me!\
**Created:** [January 19, 2021, 2:57pm UTC](https://community.forestadmin.com/t/database-in-vps-inside-a-docker-container/1664 "2021-01-19T14:57:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nacho](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/nacho/32/579_2.png) [@nacho](https://community.forestadmin.com/u/nacho)\
**Post date:** [January 19, 2021, 2:57pm UTC](https://community.forestadmin.com/t/database-in-vps-inside-a-docker-container/1664/1 "2021-01-19T14:57:03Z")

</div>

I’m currently not able to install FA locally because my DB is not accessible from the IP of my VPS—I first have to ssh and then I can use this DATABASE\_URL: “postgres://user:password@localhost/my-db”

I’m also not able to install FA directly in the VPS because I’m already using that port (I have an nginx reverse proxy to serve another app):

```javascript
Cannot start service app: driver failed programming external connectivity on endpoint (6b0111c348524de4ee7ddcd064e267d58cedf9ceee5a70e214d27e4a3ed7703c): Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use

ERROR: for app Cannot start service app: driver failed programming external connectivity on endpoint (6b0111c348524de4ee7ddcd064e267d58cedf9ceee5a70e214d27e4a3ed7703c): Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use

```

What’s the recommended workaround?

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [January 19, 2021, 3:23pm UTC](https://community.forestadmin.com/t/database-in-vps-inside-a-docker-container/1664/2 "2021-01-19T15:23:19Z")

</div>

Hi @nacho,

Usually when we said “install locally” it means to install locally on a laptop for development purposes, and the database is on localhost too, or elsewhere but reachable directly.

SSL tunneling is good for development, but it’s not recommended for servers.

I am not sure about which component is where in your plan.  
FA can be behind Nginx with a server\_name and proxy\_pass configuration.

---

<div class="post-metadata">

**Author:** ![nacho](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/nacho/32/579_2.png) [@nacho](https://community.forestadmin.com/u/nacho)\
**Post date:** [January 19, 2021, 9:25pm UTC](https://community.forestadmin.com/t/database-in-vps-inside-a-docker-container/1664/3 "2021-01-19T21:25:29Z")

</div>

Thanks, Sliman.

> [@Sliman\_Medini](#):
>
> I am not sure about which component is where in your plan.

I have a remote VPS where I run a docker container with Discourse (just like this forum). I want to analyze Discourse’s postgres DB with FA.

> [@Sliman\_Medini](#):
>
> FA can be behind Nginx with a server\_name and proxy\_pass configuration.

So, how do you recommend I configure it? Http and https requests to the discourse site are currently being handled in the remote VPS via nginx. Would I have to add some sort of route in the nginx config to handle FA requests? Does it matter which port I use?

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [January 20, 2021, 10:31am UTC](https://community.forestadmin.com/t/database-in-vps-inside-a-docker-container/1664/4 "2021-01-20T10:31:23Z")

</div>

Hi @nacho 👋  
When you execute the lumber generate command you can specify a different port by edit the `--application-port` option. Be careful to the `--application-host`, the combination of these two option should be callable from your browser.
