Documentation

Change the panel port

Move the panel from HTTPS port 9443 and HTTP port 9080 to other ports with one command, and update the firewalls and the panel URL to match.

Step by step 2 min read Updated

Before you start#

The StackRegent panel answers on HTTPS port 9443, and plain HTTP on 9080 redirects to it. You can choose other ports when installing (install.ps1 -HttpsPort -HttpPort) or change them later with the stackregent panel-port command, which this article covers. There is no page for it in the panel, because a wrong port would cut off the browser you are using; run it on the server from the console or over Remote Desktop.

The command:

  • accepts ports from 1024 to 65535,
  • refuses ports already used by websites, Website Preview, FTP, mail, DNS, MariaDB, SQL Server, the panel's own database or any other program,
  • needs different HTTPS and HTTP ports,
  • updates the panel's Windows Firewall rules and restarts the panel service.

Moving the panel off 9443 cuts down on automated scans in the logs, but it is not a replacement for limiting panel access to your own addresses and using two-factor authentication.

Step 1: Open the provider's firewall first#

If a cloud security group or hardware firewall sits in front of the server, allow the new port there before you switch. Otherwise you will be locked out from outside until you do.

Step 2: Run panel-port#

Open PowerShell as administrator on the server and run, with your own ports:

& "C:\Program Files\StackRegent\bin\stackregent.exe" panel-port 8443 8080

The first number is the HTTPS port; the second, optional number is the HTTP port that redirects to HTTPS. Leave it out to keep the current HTTP port.

Step 3: Update the panel URL#

If you set a custom address under Tools & Settings › Customize Panel URL, for example https://panel.example.com:9443, change its port to match and Save. If you can no longer reach the panel because of that address, run stackregent panel-url-reset on the server; the panel then answers on every host name again.

Step 4: Check and tidy up#

Open https://server1.example.com:8443/ and log in. Then:

  • If Tools & Settings › Firewall limits the StackRegent panel service to certain addresses, the limit follows the new port.
  • Update bookmarks, monitoring checks and any scripts or billing systems that call the REST API on the old port.
  • Tell resellers and customers the new address, or put it in the welcome emails your billing system sends.

On Desktop Experience servers the Start menu StackRegent Panel shortcut was created with the old port; open the panel from the Service Monitor tray menu instead, or edit the shortcut.

Ports that are not available#

Do not pick 9444 (Website Preview), 9445 (phpMyAdmin), 8172 (Web Deploy), 8306 (panel database) or the mail, FTP and database ports; the command refuses them anyway when they are in use. Ports below 1024 are not accepted.

The API and command line chapter lists the other recovery commands.

Frequently asked questions

What is the default StackRegent panel port?

HTTPS 9443, with HTTP 9080 redirecting to it. The installer opens both in Windows Firewall.

Can I run the StackRegent panel on port 443?

No. The command accepts ports from 1024 to 65535, and 443 belongs to the websites on the server. Use a port such as 8443, or reach the panel through its own host name on its port.

I changed the port and cannot reach the panel. What now?

Check that the new port is open in the provider's firewall. On the server, the panel should answer at https://localhost:NEWPORT/. If a custom panel URL still points at the old port, run stackregent panel-url-reset, or run panel-port again with the old ports.

Was this article helpful?

Something missing? Ask in the community or open a ticket.