How to configure a static IP with industrial Raspberry Pi automation

Change the static IP with the help of dhcpcd.conf file and your industrial Raspberry PLC controller
June 11, 2026 by
How to configure a static IP with industrial Raspberry Pi automation
Boot & Work Corp. S.L, Bernat Brunet Pedra

Introduction

Would you like to change the static IP from your Raspberry Pi PLC controller? 

Follow the steps on this post to find out how to do so with industrial automation!

Remember that if you change the static IP from your Raspberry Pi industrial PLC, you will need to use that IP later on if you want to connect again with the Raspberry and not with the default one!

How to change a static IP with Raspberry PLC

First, we need to access the industrial Raspberry Pi PLC. There are 2 different ways. 

1. Connect an external keyboard to one of the USB ports of the Raspberry PLC and an external screen to one of the free HDMI ports.

2. By SSH: To do so, you need to change the IP from your PC  to be on the same network as the Raspberry PLC IP, but it is important not to have the same IP. 

After doing this, you are now ready to connect with the Raspberry PLC. Connect the Ethernet cable from your PC to the Raspberry PLC Ethernet port 0, open a terminal, and type:

If done right, a password will be required (default password: raspberry). After that, you will be in the Raspberry PLC.

Password required - How to configure a static IP with industrial Raspberry Pi automation

The next step is: how to change the static IP. Follow the steps of example static IP.

To see the IP address from the Raspberry PLC, type: 

$ ip a

Then, look for eth0 or eth1, depending on which of them you are willing to change. In the example, we have changed eth0.

 eth0 - How to configure a static IP with industrial Raspberry Pi

Here it appears the address 10.10.10.20.

Now you need to modify the dhcpcd.conf file, located in /etc/ folder. Install nano if you do not have it:

$ sudo apt-get install nano
$ sudo nano /etc/dhcpcd.conf 

In this file, you will need to find the commented paragraph that looks like this:

Example static IP configuration - How to configure a static IP with industrial Raspberry Pi

Uncomment all these lines and change the ip_address to your new ip_address. It is important to change the routers variable too to the same IP as the ip_address, but ending in 1, like in this example:

Change IP address - How to configure a static IP with industrial Raspberry Pi

In the example, the new ip_address will be 10.10.10.19. Save the file and exit.

It is very important to remember the new IP because the default one does not work anymore and if you forget it you will not be able to enter the Raspberry PLC again. To change the eth1 IP address, just change the number that appears in the second line: eth0 --> eth1.

One more step is needed before changing the static IP. Type in the terminal:

$ sudo nano /etc/network/interfaces.d/eth0_1

or

$ sudo nano /etc/network/interfaces.d/eth1_1

Next, comment all lines in the file like this:

Comment all lines - How to configure a static IP with industrial Raspberry Pi

After the change, exit the file and save it. Then, close the Raspberry PLC by typing:

$ exit

Also, disconnect it from the power supply. You may need to wait a bit to let the Raspberry PLC close properly.

Finally, connect again to the Raspberry PLC by typing:

$ ssh pi@"your new static ip"

In case this message appears, just type “yes”

Type yes if message appears - How to configure a static IP with industrial Raspberry Pi

If everything has been done correctly, you have changed the IP from your Raspberry PLC. To check everything went right, type: 

$ ip a

You will see that eth0 / eth1 has now the new IP and the old one does not appear anymore.

eth0 / eth1 with new IP - How to configure a static IP with industrial Raspberry Pi

You have successfully changed the static IP from a Raspberry PLC!

​Search in our Blog

How to configure a static IP with industrial Raspberry Pi automation
Boot & Work Corp. S.L, Bernat Brunet Pedra June 11, 2026
Share this post

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.

PLC Comparison