# AWX installtion using external PostgresSQL

**URL:** <https://forum.ansible.com/t/awx-installtion-using-external-postgressql/33857>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [September 21, 2020, 10:10am UTC](https://forum.ansible.com/t/awx-installtion-using-external-postgressql/33857 "2020-09-21T10:10:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GAURAV\_Pande](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@GAURAV\_Pande](https://forum.ansible.com/u/GAURAV_Pande)\
**Post date:** [September 21, 2020, 10:10am UTC](https://forum.ansible.com/t/awx-installtion-using-external-postgressql/33857/1 "2020-09-21T10:10:44Z")

</div>

Hi All,

Could you please guide how to install AWX using exernal PostgresSQL database.

I know Inventory file needs to be updated with pg\_hostname , pg\_username , pg\_password and pg\_port , but what changes has to be done on PostgresSQL External server w.r.t pg\_hba.conf ?

Do i need to include the Docker engine IP and containers IP as well in pg\_hba.conf ?

The awx version iam using is 14.0.0.0 and PostgresSQL version is 10.

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [September 21, 2020, 12:20pm UTC](https://forum.ansible.com/t/awx-installtion-using-external-postgressql/33857/2 "2020-09-21T12:20:44Z")

</div>

If the postgresql.conf and pg\_hba.conf file allows connections from your awx servers, it will work fine.

---

<div class="post-metadata">

**Author:** ![GAURAV\_Pande](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@GAURAV\_Pande](https://forum.ansible.com/u/GAURAV_Pande)\
**Post date:** [September 21, 2020, 2:23pm UTC](https://forum.ansible.com/t/awx-installtion-using-external-postgressql/33857/3 "2020-09-21T14:23:27Z")

</div>

Hi Ankit , All

Could you please elaborate on this more ? which value in postgresql.conf we need to define for this I didnt find any?  
Also in pg\_hba.conf do i need to give all the Docker/Bridge IP’s as well (docker0 , br-\* and virtual ethernet’s ).

Below is the Output of ifconfig from my AWX host Server IP :- 149.25.103.35

Which all interface IP’s i need to give in pg\_hba.conf ?

br-110007a46b6b: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet 172.22.0.1 netmask 255.255.0.0 broadcast 172.22.255.255  
inet6 fe80::42:56ff:fe29:e1fa prefixlen 64 scopeid 0x20  
ether 02:42:56:29:e1:fa txqueuelen 0 (Ethernet)  
RX packets 0 bytes 0 (0.0 B)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 0 bytes 0 (0.0 B)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

docker0: flags=4099\<UP,BROADCAST,MULTICAST\> mtu 1500  
inet 172.31.0.1 netmask 255.255.255.0 broadcast 172.31.0.255  
inet6 fe80::42:7dff:fe85:8850 prefixlen 64 scopeid 0x20  
ether 02:42:7d:85:88:50 txqueuelen 0 (Ethernet)  
RX packets 4198 bytes 500810 (489.0 KiB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 7390 bytes 48863622 (46.5 MiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ens192: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet 149.25.103.35 netmask 255.255.255.0 broadcast 149.25.103.255  
inet6 fe80::250:56ff:fe83:b636 prefixlen 64 scopeid 0x20  
ether 00:50:56:83:b6:36 txqueuelen 1000 (Ethernet)  
RX packets 5983300 bytes 1084901356 (1.0 GiB)  
RX errors 0 dropped 172 overruns 0 frame 0  
TX packets 6994187 bytes 1270418686 (1.1 GiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ens224: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet 172.26.103.35 netmask 255.255.0.0 broadcast 172.26.255.255  
inet6 fe80::250:56ff:fe83:7a03 prefixlen 64 scopeid 0x20  
ether 00:50:56:83:7a:03 txqueuelen 1000 (Ethernet)  
RX packets 8034608 bytes 599257891 (571.4 MiB)  
RX errors 0 dropped 13546 overruns 0 frame 0  
TX packets 20022 bytes 3231091 (3.0 MiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73\<UP,LOOPBACK,RUNNING\> mtu 65536  
inet 127.0.0.1 netmask 255.0.0.0  
inet6 ::1 prefixlen 128 scopeid 0x10  
loop txqueuelen 1000 (Local Loopback)  
RX packets 103404 bytes 191858265 (182.9 MiB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 103404 bytes 191858265 (182.9 MiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

veth9077048: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet6 fe80::8cc4:a0ff:fe4c:6444 prefixlen 64 scopeid 0x20  
ether 8e:c4:a0:4c:64:44 txqueuelen 0 (Ethernet)  
RX packets 0 bytes 0 (0.0 B)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 10 bytes 732 (732.0 B)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

veth7eb4b4b: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet6 fe80::e023:b1ff:fe04:4414 prefixlen 64 scopeid 0x20  
ether e2:23:b1:04:44:14 txqueuelen 0 (Ethernet)  
RX packets 155068 bytes 11446776 (10.9 MiB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 155077 bytes 8363766 (7.9 MiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

vethfbace30: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500  
inet6 fe80::ce9:25ff:fe81:94f2 prefixlen 64 scopeid 0x20  
ether 0e:e9:25:81:94:f2 txqueuelen 0 (Ethernet)  
RX packets 196430 bytes 14867710 (14.1 MiB)  
RX errors 0 dropped 0 overruns 0 frame 0  
TX packets 196470 bytes 10617143 (10.1 MiB)  
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

---

<div class="post-metadata">

**Author:** ![GAURAV\_Pande](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@GAURAV\_Pande](https://forum.ansible.com/u/GAURAV_Pande)\
**Post date:** [September 22, 2020, 5:04am UTC](https://forum.ansible.com/t/awx-installtion-using-external-postgressql/33857/4 "2020-09-22T05:04:36Z")

</div>

Hi All,

Could you please help me solve this Mail Thread . Thanks

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [October 2, 2020, 6:09pm UTC](https://forum.ansible.com/t/awx-installtion-using-external-postgressql/33857/5 "2020-10-02T18:09:34Z")

</div>

Hi Gaurav,

You need to use the server IP not docker internal IP addresses. Try checking both files where it allows or restricts the connections.
