How to install OpenLiteSpeed and CyberPanel on a new (Ubuntu) EC2 Instance

Step 1: Launch an Ubuntu EC2 Instance

Go to the AWS Management Console and navigate to EC2.

Launch a new instance:

Select an Ubuntu Amazon Machine Image (AMI).

Choose an instance type (e.g., t2.micro for free tier).

Configure security group rules to allow HTTP (port 80), HTTPS (port 443), and SSH (port 22).

Step 2: Update and Upgrade Ubuntu

Connect to your instance via SSH: ssh -i "your-key.pem" ubuntu@your-ec2-public-ip

Update and upgrade the system: sudo apt update && sudo apt upgrade -y

Step 3: Install CyberPanel

Install wget and download the CyberPanel installer:

sudo apt update && sudo apt upgrade -y && sudo apt install -y wget && wget -O installer.sh https://cyberpanel.net/install.sh && sudo bash installer.sh

Run the installer: sudo bash installer.sh

Follow the prompts:

Choose 1 for CyberPanel installation with OpenLiteSpeed.

Select 1 to install the full package.

Set a default MySQL password or allow the installer to generate one.

If you run into “If you don’t have direct access to root user, please run sudo su – command (do NOT miss the – at end or it will fail) and then run installation command again.“, do this…

First, issue the sudo su - command (be sure to include the dash)

Second, issue the following command: bash /home/ubuntu/installer.sh

Step 4: Configure OpenLiteSpeed

Once the installation is complete, access OpenLiteSpeed’s WebAdmin console via browser: http://your-ec2-public-ip:7080

Default credentials:

Username: admin

Password: Use the password displayed at the end of the installation process.

If the password doesn’t work to access port 7080 (WebAdmin), issue the following command to reset the admin’s password: sudo /usr/local/lsws/admin/misc/admpass.sh

Secure the WebAdmin panel:

Go to Listeners > Admin Listener > SSL and enable HTTPS.

Step 5: Configure Security Groups

Update your EC2 instance’s security group to allow necessary ports:

  • 22: SSH (optional)
  • 80: HTTP
  • 443: HTTPS
  • 7080: WebAdmin Panel
  • 8090: CyberPanel Dashboard

Step 6: Access CyberPanel

Open your browser and go to: https://your-ec2-public-ip:8090

Log in with the following credentials:

Username: admin

Password: (same as your MySQL password or one displayed during installation)

Step 7: Optional Post-Installation Steps

Enable HTTPS: Use CyberPanel to install Let’s Encrypt SSL for your websites.

Configure DNS: Point your domain to your EC2 instance by setting up DNS records.

Create Websites: Use CyberPanel to create and manage websites, databases, and email accounts.

Troubleshooting Tips

If you cannot access the web interfaces, ensure the security group rules allow traffic on required ports.

Check service statuses: sudo systemctl status lscpd sudo systemctl status lsws

Elementor Logo

Elementor Credentials

Crocoblock logo

Crocoblock Subscription Key