# Docker configuration for UnRaid OS

**URL:** <https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878>\
**Category:** Ignition\
**Tags:** docker\
**Created:** [January 21, 2023, 10:57pm UTC](https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878 "2023-01-21T22:57:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcus\_Sternberg](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@Marcus\_Sternberg](https://forum.inductiveautomation.com/u/Marcus_Sternberg)\
**Post date:** [January 21, 2023, 10:57pm UTC](https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878/1 "2023-01-21T22:57:07Z")

</div>

Having issues getting data persistence to work using the volume tags in an UnRaid operation system. The information in the Ignition Manual - Docker ([Docker Image - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Docker+Image)) under the section Preserving Gateway State' was insufficient for a path configuration in the UnRaid Docker setup.

My best guess per this screenshot

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ff6937f08ac2718adf246f90fe9b179a53d50792.png)

**Has someone succeeded with making Ignition data persistence to work in UnRaid?**

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [January 22, 2023, 5:16pm UTC](https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878/2 "2023-01-22T17:16:59Z")

</div>

My guess is that you're running into issues with the initial files under the data folder getting "stomped" by the bind-mount. For the moment, you might try using [kcollins/ignition](https://hub.docker.com/r/kcollins/ignition) image that has a built-in alternative mount path (`/data`) that will copy the initial content from the data volume into place during first-launch.

Past that, keep in mind that there may be permissions issues with the volume you're mounting--you can align the UID/GIDs being used with the `IGNITION_UID` and `IGNITION_GID` environment variables (to match what you might need on that preserved volume, i.e. `/mnt/user/appdata/ignition/data` in your example).

---

<div class="post-metadata">

**Author:** ![Nicholas\_Rodgers](https://avatars.discourse-cdn.com/v4/letter/n/77aa72/32.png) [@Nicholas\_Rodgers](https://forum.inductiveautomation.com/u/Nicholas_Rodgers)\
**Post date:** [November 19, 2023, 5:59am UTC](https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878/4 "2023-11-19T05:59:16Z")

</div>

Has anyone worked this out? Trying to get the container running in Unraid and having the same issues as the original poster with non-persistent data

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [April 21, 2024, 10:11am UTC](https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878/5 "2024-04-21T10:11:36Z")

</div>

Also can't seem to get a new container running with UnRAID.

Using the following environment variables:

```python
      - IGNITION_UID=99
      - IGNITION_GID=100 

```

And getting the following error while running the compose file:

> ignition-gateway | /usr/local/bin/docker-entrypoint.sh: line 629: /usr/local/bin/ignition/data/init.properties: Permission denied

---

<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:** [April 22, 2024, 1:45pm UTC](https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878/6 "2024-04-22T13:45:07Z")

</div>

In order to use the `IGNITION_UID` and `IGNITION_GID` variables, you also need to start the container as `root`. You'll probably see a warning like this in your container logs:

```python
init | 2024/04/22 13:44:14 | WARNING: IGNITION_UID='999' and IGNITION_GID='999' are ignored when not running as root (uid=0), detected uid=2003

```

Add `user: 0:0` to the service and see if that helps.

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [April 23, 2024, 7:54pm UTC](https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878/7 "2024-04-23T19:54:52Z")

</div>

Thanks that worked! I'm not used to running my Docker containers as root.

---

<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:** [April 23, 2024, 8:37pm UTC](https://forum.inductiveautomation.com/t/docker-configuration-for-unraid-os/68878/8 "2024-04-23T20:37:36Z")

</div>

> [@richardNZ15](#):
>
> I'm not used to running my Docker containers as root.

I don't blame you, you shouldn't run as root if possible! Thankfully, with this strategy, only the entrypoint script is run as root; from there, `gosu` handles root stepdown to launch the gateway as the target UID. The alternative is to align the volume ownership/permissions with our images built-in UID/GID of `2003`.
