# Programming Set IP address for OPC-UA Device?

**URL:** <https://forum.inductiveautomation.com/t/programming-set-ip-address-for-opc-ua-device/51995>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [October 15, 2021, 4:25pm UTC](https://forum.inductiveautomation.com/t/programming-set-ip-address-for-opc-ua-device/51995 "2021-10-15T16:25:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheColonel26](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@TheColonel26](https://forum.inductiveautomation.com/u/TheColonel26)\
**Post date:** [October 15, 2021, 4:25pm UTC](https://forum.inductiveautomation.com/t/programming-set-ip-address-for-opc-ua-device/51995/1 "2021-10-15T16:25:06Z")

</div>

I would like to be able to programmatically set the host name of a Allen Bradley Device Connection (For OPC-UA) on the gateway using a python script.

Basically I want to be able to let the user set the IP address to the PLC on the Perspective screen, but that can come later.

Is this possible? If so how would I go about it?

---

<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:** [October 15, 2021, 4:31pm UTC](https://forum.inductiveautomation.com/t/programming-set-ip-address-for-opc-ua-device/51995/2 "2021-10-15T16:31:09Z")

</div>

How about [system.device.setDeviceHostname](https://docs.inductiveautomation.com/display/DOC81/system.device.setDeviceHostname)?
