# Connect awx to postgres database on localhost

**URL:** <https://forum.ansible.com/t/connect-awx-to-postgres-database-on-localhost/33290>\
**Category:** AWX Project\
**Tags:** rhel, awx\
**Created:** [July 1, 2020, 3:50am UTC](https://forum.ansible.com/t/connect-awx-to-postgres-database-on-localhost/33290 "2020-07-01T03:50:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Biker](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bill_biker/32/8087_2.png) [@Bill\_Biker](https://forum.ansible.com/u/Bill_Biker)\
**Post date:** [July 1, 2020, 3:50am UTC](https://forum.ansible.com/t/connect-awx-to-postgres-database-on-localhost/33290/1 "2020-07-01T03:50:59Z")

</div>

Hello All,  
Just cloned awx-13.0.0. I decided I want to connect awx to a postgres  
database. I am running RHEL 7, with ansible 2.9, python3, etc, docker-compose 1.26.

I have postgres up and running, I created a database in there called awx, with an awx user  
and the awx users password.

it won’t connect to the postgres database. any suggestions?

thanks,

ior what am i missing?

ewholz.

---

<div class="post-metadata">

**Author:** ![harsh\_chawda](https://avatars.discourse-cdn.com/v4/letter/h/4491bb/32.png) [@harsh\_chawda](https://forum.ansible.com/u/harsh_chawda)\
**Post date:** [July 1, 2020, 4:29am UTC](https://forum.ansible.com/t/connect-awx-to-postgres-database-on-localhost/33290/2 "2020-07-01T04:29:02Z")

</div>

Hello Eric ,

Can you try with this.

- First connect to the container ,get container id by running docker ps
- docker exec -it containerID bash- Connect to the database
- psql -h localhost -p 5432 -U awx -W- List the databases
- \l  
Hope it helps.

---

<div class="post-metadata">

**Author:** ![Bill\_Biker](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bill_biker/32/8087_2.png) [@Bill\_Biker](https://forum.ansible.com/u/Bill_Biker)\
**Post date:** [July 3, 2020, 12:32pm UTC](https://forum.ansible.com/t/connect-awx-to-postgres-database-on-localhost/33290/3 "2020-07-03T12:32:19Z")

</div>

Hello Harsh Chawda,  
Thanks for the reply - I will take a look at this.  
thanks
