# Server Setup Error: Cannot start service database

**URL:** <https://forum.aotu.ai/t/server-setup-error-cannot-start-service-database/101>\
**Category:** Questions\
**Created:** [July 2, 2020, 9:47pm UTC](https://forum.aotu.ai/t/server-setup-error-cannot-start-service-database/101 "2020-07-02T21:47:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krx070333](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@krx070333](https://forum.aotu.ai/u/krx070333)\
**Post date:** [July 2, 2020, 9:47pm UTC](https://forum.aotu.ai/t/server-setup-error-cannot-start-service-database/101/1 "2020-07-02T21:47:55Z")

</div>

Hi,  
I got an error at setting up Brainframe Server. A face a problem to start the server so I decide to reinstall the server. However, I got a problem.  
Below is my error message.

ERROR: for database Cannot start service database: driver failed programming external connectivity on endpoint brainframe\_database\_1 (a016ba5100958c2650aa9912f28594b45d1a7bf250d3c8523bb96ed42f1ad172): Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address already in use  
ERROR: Encountered errors while bringing up the project.

Thank you.

---

<div class="post-metadata">

**Author:** ![tyler.compton](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/tyler.compton/32/27_2.png) [@tyler.compton](https://forum.aotu.ai/u/tyler.compton)\
**Post date:** [July 2, 2020, 10:28pm UTC](https://forum.aotu.ai/t/server-setup-error-cannot-start-service-database/101/2 "2020-07-02T22:28:24Z")

</div>

BrainFrame’s database (Postgres) uses port 5432, and it looks like you may have another application using this port. You can check which application is using that port with the following command:

```auto
sudo lsof -i :5432

```

Try stopping that application and restarting BrainFrame. If you want to keep that application running, you can change which port BrainFrame exposes the database on by adding a file called `.env` in the same directory as the `docker-compose.yml` with the following contents:

```auto
DATABASE_PORT=5433

```

These configuration options are described here: [https://aotu.ai/docs/advanced\_usage/server\_configuration/](https://aotu.ai/docs/advanced_usage/server_configuration/)

---

<div class="post-metadata">

**Author:** ![krx070333](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@krx070333](https://forum.aotu.ai/u/krx070333)\
**Post date:** [July 2, 2020, 10:54pm UTC](https://forum.aotu.ai/t/server-setup-error-cannot-start-service-database/101/3 "2020-07-02T22:54:32Z")

</div>

Thank you so much! That works very well!

---

<div class="post-metadata">

**Author:** ![tyler.compton](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.aotu.ai/tyler.compton/32/27_2.png) [@tyler.compton](https://forum.aotu.ai/u/tyler.compton)\
**Post date:** [July 3, 2020, 12:37am UTC](https://forum.aotu.ai/t/server-setup-error-cannot-start-service-database/101/4 "2020-07-03T00:37:46Z")

</div>

I’m very glad to hear it!
