Trying to change ip and port on raspberry pi

What is the problem?

Want to set static IP and change port on newest raspberry pi with newest python

What did you already try to solve it?

tried editing ~/.octoprint/config.yaml - with host: and port:

server:

Use this option to define the host to which to bind the server, defaults to "0.0.0.0" (= all

interfaces)

host: 192.168.1.31

Use this option to define the port to which to bind the server, defaults to 5000

port: 7005

If this option is true, OctoPrint will show the First Run wizard and set the setting to

false after that completes

Have you tried running in safe mode?

WRITE HERE

Did running in safe mode solve the problem

why?

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog... no bundle, no support, unless the reason you couldn't retrieve the bundle is your network issues

huh?

Additional information about your setup

Hardware you are trying to connect to, hardware you are trying to connect from, router, access point, used operating systems, ... as much data as possible

nothing special

please help!

From my point of view assigning static IPs is best done in the router.

See this guide.

HTH

The Raspberry Pi IP address(es) are determined by the operating system and setting a static IP address is an OS function completely independent of OctoPrint.

The port (and IP address) that OctoPrint listens to would be changed in configuration files associated with it, but I'm pretty sure changes to .octoprint/config.yaml are not the way to do that.

As we narrow in on what you are doing and how we can help, please use the </> preformatted text tool when posting text captured from your system. This will prevent the markdown editor from "reformatting" it (YAML formatting is important).

The blue text in the template are links to additional information. In particular, we would really like to have the systeminfo bundle and as much additional information details as possible. The more details you give us, the more help we can provide.

Nope - I use a Microsoft Domain with DHCP servers and you can't set ports - only ips. Not an option for my print farm. Thanks for trying.

Correct - although there are postings telling you changing the yaml will do it they don't do anything. The older OS was done easily in to Linux files - not no more! I need to change ports and set static ips. Guess I wasted time here because it's an OS issue - sorry. But thanks for showing me what I already believed!

wasted time thinking this forum can really help - thanks?

You previously mentioned that you solved the IP assignment via DHCP yourself.

If you wish to change the port used simply edit the

/etc/systemd/system/octoprint.service

file and change the port to whatever you want.

There is no guarantee that this will not break some plugins though.

If your Pi has a dedicated IP address, why change the port?

Also why harp on the "highly paid" volunteers here, simply because you did not get the response you wanted?

I did not say I changed anything via DNS because that would change nothing but the DNS entry as you well know[?]! I want to set a static IP and port Octoprint listens on like I used to be able to with the older now NON supported Python versions. Why we need to update Python is ridiculous - who is going to hack my raspberry pi and why waste their time! listens on SERIOUSLY!. Surely someone knows how to do this? THANKS?

You espoused a proficiency with Windows DHCP services. Given that, you can get it to set a static IP address and DNS (A Record) or bypass DHCP or set a fixed address on the PI directly.

That solves your Fixed IP issue no matter which version of OctoPi you use.

I already told you how to change the port to something non-standard above. I assume that trivial change is not beyond your capabilities.

Python needs to be upgraded to keep up with the updates. You could simply choose not to use more recent versions of OctoPI and so not worry about Python versions.

All of your questions have been answered.

Thanks.

1 Like

Changing port in the services file kills Octoprint - no real help here - deleting account