Rocky 9.x Control Web Panel

From Notes_Wiki

Home > Rocky Linux or CentOS > Rocky Linux 9.x > Rocky 9.x Mail server > Rocky 9.x Control Web Panel

How to Install and Configure CWP Mail Server on Rocky Linux 9

1: Install Rocky Linux 9 and Configure Hostname & IP

Once the OS is installed and IP is assigned:

 
hostnamectl set-hostname mail.example.com 

Replace mail.example.com with your actual hostname.

2: Install Required Packages

Enable EPEL and install wget:

 
yum install -y epel-release 
yum install -y wget 

3: Update the Server

Update all packages to the latest versions:

 
yum -y update 

4: Reboot the Server

Reboot to apply updates:

reboot 

5: Download the CWP Installer

 
cd /usr/local/src 
wget http://centos-webpanel.com/cwp-el9-latest 

6: Run the Installer Script

 
bash cwp-el9-latest 

The installation may take some time. Follow the on-screen instructions.

7: Access CWP Admin Console

After installation, access the CWP admin panel in your browser:

 
https://<your-server-ip>:2031 

Example:

 
https://172.30.2.83:2031 

Login using the root user and its password.

8: Create a Hosting Account

From the Admin Panel:

  • Go to User Accounts → New Account
  • Fill in the following:

Domain Name (e.g., example.com)

Password

Email Address

Select the default package

  • Click Create Account

9: Configure DNS Records for Your Domain

Make sure the following records are added where your domain DNS is managed:

a) MX Record

Points to your mail server.

 
example.com. IN MX 10 mail.example.com. 

b) SPF Record

Allows your server to send email:

 
v=spf1 a mx ip4:<your-server-ip> ~all 

From CWP Admin Panel:

  • Email → Add SPF Record
  • Select your domain and enter IP in CIDR (e.g., 192.168.1.1/32)
  • Click Add SPF Record

c) DKIM Record

Digitally signs your outgoing emails.

From CWP Admin Panel:

  • Email → Add DKIM Record
  • Ensure the correct domain is selected
  • Click Add DKIM

10: Create Email Accounts

From the CWP Admin Panel:

  • Email → Email Accounts
  • Click Add New Mail
  • Select your user (created earlier)
  • Enter:

Email address (e.g., info@example.com)

Password

  • Click Create Mail

11: Test Mail Sending and Receiving

Use the built-in webmail client (Roundcube):

 
https://<your-server-ip>:2031/roundcube 

Example:

 
https://172.30.2.83:2031/roundcube 

Login with your email credentials and test by sending and receiving emails.

Home > Rocky Linux or CentOS > Rocky Linux 9.x > Rocky 9.x Mail server > Rocky 9.x Control Web Panel