# Can't set custom location

**URL:** <https://forums.balena.io/t/cant-set-custom-location/56945>\
**Category:** openBalena\
**Created:** [January 15, 2020, 4:14pm UTC](https://forums.balena.io/t/cant-set-custom-location/56945 "2020-01-15T16:14:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmerciel](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gmerciel](https://forums.balena.io/u/gmerciel)\
**Post date:** [January 15, 2020, 4:14pm UTC](https://forums.balena.io/t/cant-set-custom-location/56945/1 "2020-01-15T16:14:18Z")

</div>

Hi, I’m trying to use [setCustomLocation](https://www.balena.io/docs/reference/sdk/node-sdk/#balena.models.device.setCustomLocation) from Node SDK, but I’m getting “Request error: Internal Server Error”. Is this functionality supported on openBalena? I would like to use it to store the location of my devices and show them on a map. For this particular application, I can’t use balenaCloud because there’s no internet access on the devices, it has to be everything on-premise.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [January 15, 2020, 5:05pm UTC](https://forums.balena.io/t/cant-set-custom-location/56945/2 "2020-01-15T17:05:50Z")

</div>

Hi @gmerciel,  
At the moment open balena doesn’t not have support for device location & custom locations and that’s the reason that the SDK methods are failing.  
As a workaround, you can use device tags for associating this extra information with the device.

I would also like to let you know that balena also offers on-premise installations for no-internet-access use cases like the one you described.  
Would you be interested having one of our solution engineers to reach you about that?

Kind regards,  
Thodoris

---

<div class="post-metadata">

**Author:** ![gmerciel](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gmerciel](https://forums.balena.io/u/gmerciel)\
**Post date:** [January 15, 2020, 5:13pm UTC](https://forums.balena.io/t/cant-set-custom-location/56945/3 "2020-01-15T17:13:19Z")

</div>

Thanks a lot Thodoris. Using device tags as a workaround sounds like a good idea.

About the on-premise offer, it would be great if I could have more information. I could also explain with more details the use case.

Thanks again!

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [January 15, 2020, 5:17pm UTC](https://forums.balena.io/t/cant-set-custom-location/56945/4 "2020-01-15T17:17:19Z")

</div>

Hi again @gmerciel,  
I will give a note to one of our solution engineers and they will reach you about that on your forums email.

Kind regards,  
Thodoris

---

<div class="post-metadata">

**Author:** ![xavierchan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/xavierchan/32/3492_2.png) [@xavierchan](https://forums.balena.io/u/xavierchan)\
**Post date:** [July 1, 2020, 5:59am UTC](https://forums.balena.io/t/cant-set-custom-location/56945/6 "2020-07-01T05:59:58Z")

</div>

Hi, @thgreasi . I want to use device location feature. Even though you said that open balena dosen’t support it. Can you give some suggestion to help me get that?

---

<div class="post-metadata">

**Author:** ![gelbal](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/gelbal/32/1109_2.png) [@gelbal](https://forums.balena.io/u/gelbal)\
**Post date:** [July 1, 2020, 10:51am UTC](https://forums.balena.io/t/cant-set-custom-location/56945/7 "2020-07-01T10:51:35Z")

</div>

Hi @xavierchan, you’d need to retrieve the device location somehow and maintain that information. At balena we use device’s IP address to perform [Geocoding](https://en.wikipedia.org/wiki/Geocoding) and persist the location in the balenaCloud database. Each time the device reports a new IP address, we make a new Geocoding query to retrieve the new coordinates. You could look into building something similar. Then as Thodoris suggested here, you might store the location data as device tags.

Alternatively, you could add GPS tracker hardware to your device to track the location. We have an example project illustrating this scenario here: [https://github.com/balena-io-playground/gps-tracker](https://github.com/balena-io-playground/gps-tracker)

Also we are tracking the feature request here: [https://github.com/balena-io/open-balena-api/issues/258](https://github.com/balena-io/open-balena-api/issues/258)  
Feel free to express your interest there and subscribe to notifications.

Let us know how you end up building this.  
Cheers…
