# Change the user running the Ignition Gateway service

**URL:** <https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 13, 2023, 10:03am UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564 "2023-01-13T10:03:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISEMAREN\_AAG](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@ISEMAREN\_AAG](https://forum.inductiveautomation.com/u/ISEMAREN_AAG)\
**Post date:** [January 13, 2023, 10:03am UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/1 "2023-01-13T10:03:36Z")

</div>

Good morning.

I was testing the Python subprocess module in Ignition, and noticed that the **user running the Ignition Gateay service is root (Linux)**.

Is it possible to **change this user**? Would this change have any negative consequences?

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

Best regards.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [January 13, 2023, 11:54am UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/2 "2023-01-13T11:54:34Z")

</div>

You will have to run the service as an other user.

This can affect file access, or the timezone/locale amongst other things.

should be easy enough to revert if it causes trouble i guess xd

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 13, 2023, 12:45pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/3 "2023-01-13T12:45:20Z")

</div>

You set this in the SystemD unit file for the Ignition service. Consider specifying `AmbientCapabilities=CAP_NET_RAW CAP_NET_BIND_SERVICE` to allow Ignition to use ports 80 & 443 and to use built-in ping when not root.

Make sure to change ownership of all Ignition files and folders to the new user.

---

<div class="post-metadata">

**Author:** ![ISEMAREN\_AAG](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@ISEMAREN\_AAG](https://forum.inductiveautomation.com/u/ISEMAREN_AAG)\
**Post date:** [January 13, 2023, 2:41pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/4 "2023-01-13T14:41:38Z")

</div>

I have edited the service configuration: "sudo nano /etc/systemd/system/Ignition-Gateway.service", but the "AmbientCapabilities" variable does not exist.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/0/10dddee14b18ddc826d028ae7958a1b75dded7e4.png)

Should I add it like this: AmbientCapabilities=CAP\_NET\_BIND\_SERVICE?

Thank you.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 13, 2023, 3:27pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/5 "2023-01-13T15:27:09Z")

</div>

Yes, you add it yourself, in the `[Service]` section.

---

<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:** [January 13, 2023, 6:09pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/6 "2023-01-13T18:09:30Z")

</div>

Also, consider using a systemd override file instead of editing the main file, e.g.:

```bash
systemctl edit Ignition-Gateway.service

```

This will create an override file at `/etc/systemd/system/Ignition-Gateway.service.d/override.conf` that will persist through an Ignition upgrade (that may reset/revert that base configuration file).

---

<div class="post-metadata">

**Author:** ![ISEMAREN\_AAG](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@ISEMAREN\_AAG](https://forum.inductiveautomation.com/u/ISEMAREN_AAG)\
**Post date:** [January 13, 2023, 7:08pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/7 "2023-01-13T19:08:15Z")

</div>

@kcollins I have followed your instructions but now I have this problem:

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

---

<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:** [January 13, 2023, 7:10pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/8 "2023-01-13T19:10:03Z")

</div>

You may need to include an explicit ExecStart line with empty content to negate the base settings, e.g.

```auto
ExecStart=
ExecStart=<your new stuff>

```

---

<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:** [January 13, 2023, 7:12pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/9 "2023-01-13T19:12:27Z")

</div>

I should probably also mention that the override file is for augmenting the base file, you don't need to put the contents of the original file in there, otherwise you'll end up with conflicts there.

---

<div class="post-metadata">

**Author:** ![ISEMAREN\_AAG](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@ISEMAREN\_AAG](https://forum.inductiveautomation.com/u/ISEMAREN_AAG)\
**Post date:** [January 13, 2023, 7:48pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/10 "2023-01-13T19:48:43Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/e/7e20a91e706ab0cf6a685744733b8f6c323259a8.png)  
Now I have another error:  
_ **runuser: cannot be used by users other than 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:** [January 13, 2023, 8:47pm UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/11 "2023-01-13T20:47:26Z")

</div>

What do you have currently in both your:

- `/etc/systemd/system/Ignition-Gateway.service`
- `/etc/systemd/system/Ignition-Gateway.service.d/override.conf`

... files?

---

<div class="post-metadata">

**Author:** ![ISEMAREN\_AAG](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@ISEMAREN\_AAG](https://forum.inductiveautomation.com/u/ISEMAREN_AAG)\
**Post date:** [January 16, 2023, 9:01am UTC](https://forum.inductiveautomation.com/t/change-the-user-running-the-ignition-gateway-service/68564/12 "2023-01-16T09:01:59Z")

</div>

Good morning.  
Finally I decided to restore the file as it was: User=root.  
This is giving me too many problems.  
Sorry for the inconvenience.
