Configuring Hostname on Ubuntu for cPFence Emails and Features

Setting a proper hostname on your server is important for several reasons, including being able to easily identify which server your cPFence notification emails are coming from. The hostname is also required for many other features in cPFence and your server to function properly.

1. Check Your Current Hostname

hostnamectl

2. Set the New Hostname

sudo hostnamectl set-hostname your-new-hostname

3. Update the Hosts File

Open /etc/hosts in your preferred editor:

sudo nano /etc/hosts

Find a line similar to:

127.0.1.1    old-hostname

Change it to:

127.0.1.1    your-new-hostname

4. Apply the Change

To apply the new hostname, you can reboot your server, log out and log back in, or simply reload your shell with:

exec bash

Once completed, your Ubuntu system will use the new hostname, making it easier to identify server-specific notifications and ensuring proper functionality for cPFence and other server features.


Need Further Assistance?

Visit our Knowledgebase or contact our support team for help.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Is cPFence Compatible with Cloudflare, BunnyCDN and Quic.Cloud?

Yes, cPFence is fully compatible with Cloudflare, Quic.Cloud, and BunnyCDN. In fact, we recommend...

Why Do I See "could not change directory to /root: Permission denied" Warnings?

You may occasionally encounter the following warning message while using cPFence: could not...

How to Uninstall cPFence ?

If you need to remove cPFence from your system, follow the steps below to uninstall the software...

How to Set Up Slack Notifications in cPFence?

If you'd like to receive cPFence alerts on your desktop or mobile via Slack, follow the steps...

How to Temporarily Disable All cPFence Functions?

If you need to pause cPFence activity for troubleshooting or other purposes, you can temporarily...