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 below. This guide uses the Slack desktop app.

Step 1: Install Slack

If you don’t already have it, download the Slack apps for both PC and mobile from:

https://slack.com/downloads

Step 2: Create a Slack Channel

  1. Open the Slack desktop app.
  2. Click “+ Add channels” from the left sidebar.



  3. Choose “Create a channel” and click Next.



  4. Name your channel (e.g. #cpfence-alerts) and click Create.



Step 3: Create a Slack App with Webhook Access

  1. Visit https://api.slack.com/apps and log in.
  2. Click “Create an App”.



  3. Choose “From a manifest”.



  4. Pick your workspace and click Next.



  5. Paste the following JSON (replace the name as needed):
{
  "display_information": {
    "name": "Your Hosting Co"
  },
  "settings": {
    "org_deploy_enabled": false,
    "socket_mode_enabled": false,
    "is_hosted": false,
    "token_rotation_enabled": false
  }
}
  1. Click Next, then Create.





Step 4: Enable Incoming Webhooks

  1. In the app settings, go to Incoming Webhooks, and turn it on.



  2. Click “Add New Webhook”.



  3. Choose your channel and click Allow.



Step 5: Copy the Webhook URL

  1. Slack will show your new Webhook URL.
  2. Click Copy.



Step 6: Configure Webhook in cPFence

  1. In your cPFence WebUI, go to System SettingsSlack Notifications.



  2. Select All Servers or a specific server.
  3. Click Set Slack Webhook URL and paste the URL.
  4. Finally Enable Slack Notifications.
  5. You can also use the CLI commands :
cpfence --slack-notifications-on
cpfence --set-slack-webhook

You’re now set to receive real-time alerts on your desktop and mobile.

Bonus: Adjust Notification Settings (Optional)

To ensure you receive mobile push alerts:

  • Open the Slack app.
  • Click your profile → Preferences.






  • Set your notification schedule and sound preferences.

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.

  • 1 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...

Configuring Hostname on Ubuntu for cPFence Emails and Features

Setting a proper hostname on your server is important for several reasons, including being able...

How to Temporarily Disable All cPFence Functions?

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