# Working with Igntion's Docker Container Ports

**URL:** <https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204>\
**Category:** Ignition\
**Created:** [March 25, 2025, 9:55pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204 "2025-03-25T21:55:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Ortega](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@Kevin\_Ortega](https://forum.inductiveautomation.com/u/Kevin_Ortega)\
**Post date:** [March 25, 2025, 9:55pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/1 "2025-03-25T21:55:28Z")

</div>

Hello, I am using setting up a Docker container running ignition and I would like to tie the tag historian up to a MariaDB that is running on the host machine. What are the steps I need to take to ensure that it is setup properly?

---

<div class="post-metadata">

**Author:** ![Kevin\_Ortega](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@Kevin\_Ortega](https://forum.inductiveautomation.com/u/Kevin_Ortega)\
**Post date:** [March 25, 2025, 9:59pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/2 "2025-03-25T21:59:33Z")

</div>

In addition to this, I have also allowed the Ignition container to use the host networking resources, rather than bridging the container network to the host network, to make it "easier". I would like to use the bridge function, but I just need to get it working first.

---

<div class="post-metadata">

**Author:** ![Cody\_Morgan](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@Cody\_Morgan](https://forum.inductiveautomation.com/u/Cody_Morgan)\
**Post date:** [March 25, 2025, 10:07pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/3 "2025-03-25T22:07:19Z")

</div>

If you're using host networking, then the fact that Ignition is in a docker container is almost irrelevant. Just configure your database connection like normal, and use `localhost` in your connection URL. [Connecting to MariaDB | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/database-connections/connecting-to-databases/connecting-to-mariadb)

---

<div class="post-metadata">

**Author:** ![Kevin\_Ortega](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@Kevin\_Ortega](https://forum.inductiveautomation.com/u/Kevin_Ortega)\
**Post date:** [March 25, 2025, 10:29pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/4 "2025-03-25T22:29:00Z")

</div>

So I attempted this and I continue to get a Fault on the Database connection page. Is there a way to see why the fault is occurring? I have allowed all localhost connections on the MariaDB still having issues.

---

<div class="post-metadata">

**Author:** ![Cody\_Morgan](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@Cody\_Morgan](https://forum.inductiveautomation.com/u/Cody_Morgan)\
**Post date:** [March 25, 2025, 10:32pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/5 "2025-03-25T22:32:55Z")

</div>

Is there anything in the logs? I personally don't know which logger you may need to adjust the log level on, but it's probably documented somewhere, maybe even in the forum.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 25, 2025, 10:34pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/6 "2025-03-25T22:34:55Z")

</div>

Status \> Connections \> Databases. Click the Details button.

Should be a message and stack trace?

---

<div class="post-metadata">

**Author:** ![Kevin\_Ortega](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@Kevin\_Ortega](https://forum.inductiveautomation.com/u/Kevin_Ortega)\
**Post date:** [March 25, 2025, 11:10pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/7 "2025-03-25T23:10:56Z")

</div>

I checked the logs... it was a user-privileges issue from the Database side. Looking at those logs helped isolate the issue.

As a follow-up, if I wanted to use bridge mode rather than host mode, how would I configure the database connection? Would i have to reference the specific ip address of the host machine in the configuration? Also, how would I findout what IP address I am binded to inside the container, because I also need to allow the user privledges from the container, in my MariaDB priveledges.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 25, 2025, 11:12pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/8 "2025-03-25T23:12:08Z")

</div>

~~I think you'd need to host the DB in either another Docker container or on some other host.~~

edit: that might not be right, you'll have to try some stuff.

---

<div class="post-metadata">

**Author:** ![Cody\_Morgan](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@Cody\_Morgan](https://forum.inductiveautomation.com/u/Cody_Morgan)\
**Post date:** [March 25, 2025, 11:16pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/9 "2025-03-25T23:16:57Z")

</div>

You can get the container IP from the docker CLI, there's an example in here:

> **[Networking with standalone containers](https://docs.docker.com/engine/network/tutorials/standalone/)**
>
> Tutorials for networking with standalone containers

I _think_ you can just use the host ip to reach the host when using the default bridge, but I don't remember for certain.

---

<div class="post-metadata">

**Author:** ![Kevin\_Ortega](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@Kevin\_Ortega](https://forum.inductiveautomation.com/u/Kevin_Ortega)\
**Post date:** [March 26, 2025, 10:01pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/10 "2025-03-26T22:01:49Z")

</div>

This worked! I had to make sure the host machine allowed the Docker Container IP address and the MariaDB instance allowed the user from the specific ip range. Once I got that set, I got the "VALID" connection! Thank you so much 😃

---

<div class="post-metadata">

**Author:** ![Cody\_Morgan](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@Cody\_Morgan](https://forum.inductiveautomation.com/u/Cody_Morgan)\
**Post date:** [March 26, 2025, 10:02pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/11 "2025-03-26T22:02:49Z")

</div>

Glad you got it working!

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [March 27, 2025, 2:45pm UTC](https://forum.inductiveautomation.com/t/working-with-igntions-docker-container-ports/104204/12 "2025-03-27T14:45:44Z")

</div>

> [@Kevin\_Ortega](#):
>
> As a follow-up, if I wanted to use bridge mode rather than host mode, how would I configure the database connection?

You can use `host.docker.internal` within the container to resolve to the host machines address. ref: [Explore networking features on Docker Desktop | Docker Docs](https://docs.docker.com/desktop/features/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host)
