Important: The cPFence WebUI can only be enabled and run on your Enhance main control panel server. It will not function on other servers.
The cPFence WebUI lets you manage your entire server cluster from a single dashboard. Follow these steps to enable and configure it on your main control panel server.
=================== AUTO SETUP ===================
[RECOMMENDED] Run cpfence --deploy-ssh-key
This will automatically configure passwordless SSH for all servers.
==================================================
Step 1: Enable the WebUI Module
Run the following command on your main control panel server:
cpfence --enable-webui
If the WebUI is already running, you’ll see a message indicating it’s enabled. To reset the admin password at any time, use:
cpfence --reset-webui-pass
Step 2: Edit Your Server List
Add the servers you want to manage to the following file:
/opt/cpfence/user-config/cpfwebui/servers.txt
Add one entry per line using this format:
Server Name,root@server-ip
See this guide for step-by-step instructions: How to Add a New Server to cPFence WebUI Central Dashboard
Step 3: Set Up Passwordless SSH
To allow the WebUI to connect to your servers, set up passwordless SSH from the main control panel server:
- Generate an SSH key pair if you don't already have one:
ssh-keygen
- If password login is enabled on the servers, run:
ssh-copy-id root@<server-ip>
If password login is disabled, copy the contents of ~/.ssh/id_ed25519.pub from your main server into ~/.ssh/authorized_keys file on each target server.
Then test SSH access with:
ssh root@<server-ip>Accept the prompt with "yes". After that, it should no longer ask for a password.
- Test SSH access to confirm no password is required:
ssh root@<server-ip>
Read More : How to Secure SSH While Allowing cPFence WebUI Access?
Step 4: Whitelist Your IP for Dashboard Access
To secure your dashboard, whitelist your IP by running this command on your main server:
cpfence --add-webui-ip <your-ip>
This command adds your IP to the allowed list and opens port 9095 (TCP) using UFW.
Step 5: Access the cPFence Central Dashboard
You can now access the WebUI from your browser using the following details:
- Username:
admin
- Password: Use the password you set previously. To reset, run
cpfence --reset-webui-pass
- URL:
http://your-server-hostname:9095/
Tip: To secure your cPFence WebUI with SSL and avoid whitelisting your IP each time you log in, follow this guide.
Visit our troubleshooting page for solutions to common issues: Troubleshooting Common Issues with the cPFence WebUI
Other Useful Commands
cpfence --disable-webui
Disable the cPFence WebUIcpfence --restart-webui
Restart the cPFence WebUI servicecpfence --del-webui-ip <ip>
Remove an IP from the WebUI whitelist
Need Further Assistance?
If you encounter any issues or need additional help, feel free to reach out to our support team via your client portal.