Setting Static IP Address in concole balena

how to change the ip address from the console?


Hey there! You can’t set a different IP from the balenaCloud console, as its not balena the entity that gives an IP to the device. If your device is on a DHCP network, then the gateway will dynamically award the device an IP. You could also configure a static IP by tweaking the device’s NetworkManager configuration as explained here:

this is what I understood but where add the file with ip informations ?
it’s not very clear to me

All of the network configuration for balenaOS can be done though files in the boot partition of your device. If you have a freshly downloaded balenaOS .img, you can mount it and inspect the resin-boot or resin-flash (for devices that boot from eMMC) partition. In the boot partition you will find a directory called system-connections

So if you put the sd card in your computer, you should see a partition containing a system-connections folder, put your NetworkManager config file in there.
On a running balena device, the boot partition is mounted in the /mnt/boot/ folder in the host OS.

it means that the ip address is fixed forever
if you do not have access to the SD card, you can 't modify the ip adress

we can therefore reach by the DEVICE NAME ?

On a running balena device, the boot partition is mounted in the /mnt/boot/ folder in the host OS.

You can add a config file in the /mnt/boot/system-connections/ folder on a running balena device.

You can not reach your device on your local network by device name.
You have to use the ip address.
On OSes with avahi / mDNS running (which is not the case for Windows) you can reach devices by <short-uuid>.local

do uuid shorts change dynamically

in the free version it is possible to have up to 10 devices
what’s going on for the 11th?

it is not displayed?

Hey, the uuid is fixed per device, so it won’t change dynamically. If you add more than 10 devices on a free plan all devices that are over the limit will be limited in functionality in the dashboard, and they might stop working completely (eg. pulling updates) at any time, so I wouldn’t go over the limit if you care about reliability.

the cloud balena is interesting for me to be able to adjust and set the raspberry
but then in production, I no longer need balena cloud

if i remove a device from the cloud, is the uuid valid?

Yes it is, but you won’t be able to deploy new releases, update the hostOS, etc. to the device you have removed.

summary :
it’s a bit of a shame that we can’t change the ip address without accessing the SD card

What other way do you have in mind that would allow you to change the IP address, without accessing the SD card?

with balena cloud
how do you do it if the RPI is on the other side of the world?

Setting up networking configurations is done on /mnt/boot/system-connections/ by adding the config file remotely and this operation accesses and changes the contents of the SD card. I don’t seem to understand how would you do this without accessing the SD card. The network config files are standard network manager’s config files, for more networking configuration information you can check our docs here

so it’s simply the method to modify or add this file remotely that I don’t understand …

how do you do it ? step by step

Here are some steps on how to set up a static IP address on a device

  1. Use the dashboard to connect to the HostOS of the device (or cli using balena ssh <deviceUUID>).
  2. cd /mnt/boot/system-connections/
  3. use ls to find the network config file
  4. edit that file
  5. Read about Setting a static IP.
  6. Make the necessary changes to the config file based on what you want the static ip to be
  7. Save the file
  8. reboot the device
    Your device should have a static IP address now.

ok !! sorry for not understanding everything

I hope the instructions helped.

how do you edit a file from the console? There is no nano command

Hello there, you can use the vi editor in the HostOS