No internet connection
  1. Home
  2. Technical Support

How do I change listen port of GUI for TinyPilot Pro?

By Alan Chiu @mikerotch
    2022-12-09 20:42:35.365Z

    When I was using the non-pro version of TinyPilot, I could use tinypilot_external_port: in settings.yaml to specify the port.

    I tried that with TinyPilot Pro and it doesn't seem to work.

    I added that to my settings, then ran the install script again:
    /opt/tinypilot/scripts/upgrade && sudo reboot
    and after the Voyager came back up , I can still access the GUI using port 80 and can't using the port after tinypilot_external_port

    Solved in post #2, click to view
    • 3 replies
    1. C
      Charles Hague @cghague2022-12-12 15:01:19.092Z2023-12-11 18:47:52.637Z

      Hi Alan - thanks for your great question on changing the port TinyPilot listens on!

      You are correct that you need to modify settings.yml. However, if you're already on the most recent version of TinyPilot Pro then you'll need to force the update process to run in order for the changes to be picked up.

      I've put together a short shell snippet that will do this for you. To get started, connect via SSH and run the following commands to specify the required ports:

      Update (2023-12-11): There are new commands for changing the ports. You can view the new method in this thread.

      After the update process completes (which may take a little while) TinyPilot Pro will be listening on the new ports.

      ReplySolution
      1. M
        In reply tomikerotch:
        Alan Chiu @mikerotch
          2022-12-12 16:53:08.335Z

          Thanks, this worked. If I use the GUI to upgrade Tinypilot, do I still have to run the script you provided after the upgrade? Or will the ports stay the same until I run the commands:

          export NEW_EXTERNAL_PORT=80
          export NEW_EXTERNAL_TLS_PORT=443

          again?

          1. C
            In reply tomikerotch:

            The variables NEW_EXTERNAL_PORT and NEW_EXTERNAL_TLS_PORT are temporary and are only used when the above script is being ran. The script writes the actual changes to /home/tinypilot/settings.yml which means they will persist through updates, including those triggered from the web interface.