How to change the service port ASTROBOX

ASTROBOX default port is 80, but I want to change it.

You need to edit the file at:

/etc/astrobox/config.yaml

And add this lines in there:

server:
   port: <your port>

if the server section is in there, just add the port. After that you need to restart the service for the changes to take effect:

sudo service astrobox restart

Thank you very much for your answer.

Hello, I changed as you say, but to no avail.
Here is my revised procedure:

sudo nano /etc/astrobox/config.yaml
server:
firstRun: false
host: 127.0.0.1
ports: 81

Saved
sudo service astrobox restart

It’s ‘port’ not ‘ports’

port is also used, but the problem is the same.

What is the problem? Do you try to do http://127.0.0.1:81 ? Are you trying to access the box from the network ? If so you need to use the boxes IP address on your network instead of 127.0.0.1

I am a normal internal network IP is accessible 192.168.1.108, unchanged before the port.

The default configuration file is as follows:
cloudSlicer:
apiHost: https://api.astroprint.com
boxrouter: wss: //boxrouter.astroprint.com
folder:
logs: / var / log / astrobox
timelapse: / AstroBoxFiles / timelapse
timelapse_tmp: / AstroBoxFiles / timelapse / tmp
uploads: / AstroBoxFiles / uploads
watched: / AstroBoxFiles / watched
serial:
port: / dev / ttyUSB0
server:
firstRun: false
host: 127.0.0.1
system:
actions:

  • Action: shutdown
    command: shutdown -h now
  • Action: astrobox-restart

But after I modify the port configuration file is as follows:

cloudSlicer:
apiHost: https://api.astroprint.com
boxrouter: wss: //boxrouter.astroprint.com
folder:
logs: / var / log / astrobox
timelapse: / AstroBoxFiles / timelapse
timelapse_tmp: / AstroBoxFiles / timelapse / tmp
uploads: / AstroBoxFiles / uploads
watched: / AstroBoxFiles / watched
serial:
port: / dev / ttyUSB0
server:
firstRun: false
host: 127.0.0.1
port: 81
system:
actions:

  • Action: shutdown
    command: shutdown -h now

After this course is to save
sudo service astrobox restart

http://192.168.1.108:81
unable to connect

Firefox can not establish a connection 192.168.1.108:81 server.

Then if http://192.168.1.108
Measurement display

Your Astrobox is still booting up.
Please hit the button below to reload the page.

If this persists and your box does not boot up please click here to send us a report so we can resolve the issue.

try changing host to

host: 192.168.1.108

Hello, thank you for your help. But as you say I modify host: 192.168.1.108
But the problem with the same as before.

cloudSlicer:
apiHost: https://api.astroprint.com
boxrouter: wss://boxrouter.astroprint.com
folder:
logs: /var/log/astrobox
timelapse: /AstroBoxFiles/timelapse
timelapse_tmp: /AstroBoxFiles/timelapse/tmp
uploads: /AstroBoxFiles/uploads
watched: /AstroBoxFiles/watched
serial:
port: /dev/ttyUSB0
server:
firstRun: false
host: 192.168.1.108
port: 81
system:
actions:

  • action: shutdown
    command: shutdown -h now

After this course is to save
sudo service astrobox restart

http://192.168.1.108:81
unable to connect

Firefox can not establish a connection 192.168.1.108:81 server.

Then if http://192.168.1.108
Measurement display

Your Astrobox is still booting up.
Please hit the button below to reload the page.

If this persists and your box does not boot up please click here to send us a report so we can resolve the issue.

I found a problem, even if I set the port: 80 can not work properly.

This might be a different issue. Let’s move this over to our support system at https://AstroPrint.zendesk.com

Will this problem be solved?

Did you report the problem on the link that gave you in the previous answer?

Hello !

I Have same problem when change port on config.yaml

after change i receive

Your Astrobox is still booting up.
Please hit the button below to reload the page.

But the service ssh can acess only http can’t connect

I’m experiencing issues with this process on a pi3 and pi0. the process makes complete sense and should work but after i change the port, reboot, and attempt to access on the new port it’s unable to find the page. If I try the same IP with port 80 I receive a page from the web server but it states the system is not available yet.

My guess is the webserver is not reading from this yaml file on reboot to set the port. Does anyone know what the webserver is that’s running and how i could directly change the port? I’m interested in port forwarding through my router but I have a webserver running locally on port 80 already.

When you edit the config.yaml file you must use an editing tool that does not add information that does not appear on the screen.
For example, the wrong editing tool will add one or more spaces that cause the process to choke.
the errors you are getting might be due to using the wrong editing tool.

When you edit the config.yaml file you must use an editing tool that does not add spaces.
For example, the wrong editing tool will add one or more spaces that cause the process to choke.
the errors you are getting might be due to using the wrong editing tool.

Unfortunatly that’s not the issue. I even went back into VI editor to show all hident character ot be sure there were no ^M or anything odd. It’s clean. Everything is properly spaced and no special characters where they should not be.
What I find odd is when i change the port the server still only responds to port 80 requests. So, although Astroprint as an application may be running on a different I can’t get to it maybe because of some firewall rule and the webserver although providing a web response on port 80 could just be a friendly 404 page. Speculating here as I try to dig deeper.

So, has anyone been able to get this to run on a port other than 80?