Prerequisites
Before changing the HestiaCP port, make sure you have:
- SSH access to your VPS
- Root or sudo privileges
⚠️ Keep your current SSH session open while testing the new port to avoid lockout!
Step 1: Connect to Your VPS
ssh hxroot@YOUR_SERVER_IP -p 22Step 2: Edit HestiaCP Configuration
nano /usr/local/hestia/conf/hestia.confStep 3: Change the Port
Find the line:
PORT='8083'Change it to your desired port (between 1024-65535, avoid common ports):
PORT='8443'Step 4: Save and Exit
Press Ctrl+O to save, then Ctrl+X to exit nano.
Step 5: Update Firewall
Allow the new port:
ufw allow 8443/tcpRemove the old port if desired:
ufw delete allow 8083/tcpStep 6: Restart Hestia Services
systemctl restart hestia
systemctl restart hestia-nginxStep 7: Test New Port
Open your browser and navigate to:
https://YOUR_SERVER_IP:8443Troubleshooting
Cannot access the new port:
- Check firewall:
ufw status - Check if service is listening:
ss -tulpn | grep 8443 - Check HestiaCP status:
systemctl status hestia
✅ HestiaCP port has been changed successfully!