Change name for octopi

I have more Than one pi3 running OctoPrint and i want to have different Names on them
Now both say octopi
Can not find anywhere to change
2 x. Raspberry pi3 model b + and one pi3 model b. Win10 64 bit and 5 g network

2 Likes

Change the local hostname with rasp-config

You have two options.

  1. If your Pi is already running

    • SSH into it
    • run sudo raspi-config
    • select "2. Hostname" and follow the instructions
  2. If your Pi is not running

    • Plug the SD into your computer and on the drive that pops up (same place where you can find the network config file) create a new file octopi-hostname.txt and put the host name you want into it, e.g.

      octopi2
      
    • Plug the SD back into your Pi and power it up.

8 Likes

Thank you very much!

You are welcome. Please remember to mark the solution to your question so others can find it easier.

I have a strange result. I can change the name and se the octopi in my network and ”connect” to it. It show on the left side a list of octopi options but not the normal layout. Also not connected is showen. Removing the name and all is ok.

Sounds like your browser cache and/or dns cache playing tricks on you. Leave the name changed and give it a day or so. Or you can flush all the caches. You can do a hard refresh in the browser and that might clear it up, but the DNS cache could still cause you problems.

You may also want to choose two new names and change them both at the same time so that the DNS cache can't accidentally point you at the wrong pi for the old name.

Thanks for the help! I had this question.

@markwal - would power cycling the router flush the DNS cache?

I also get a second raspberry for octoprint for a second printer, but is that possible on 1 wifi network and then you only have to change the host name at 1?

Yes, it is possible.

1 Like

These instructions might well have worked in 2018 when the question was first asked, but if I run raspi-config, now, there is no "2. Hostname" available to choose. It may be buried in the menu somewhere, but I didn't find it.

I did find that you can ssh into your octopi. Go to "/etc/hostname" and edit it the the name that you want. (You will have to run the editor with sudo, or you can't write your changes.) Then reboot. I did this with mine, and it no longer collides with the other octopi that I have.

Correct, the options have changed. I now find it under 1 System Options, then S4 Hostname.

I want to leave both the Ethernet and the WiFi of my pi connected to my network…Ethernet for when I’ll near a wired port, and wifi for when I’m not.

Arpwatch on my pfsense router is constantly sending me notifications letting me know the host name keeps swapping between the MAC addresses of the two interfaces. Can each interface have its own host name? I prefer not to turn off the notifications from Arpwatch.