How to Install Apache CloudStack – Step-by-Step Guide

Apache CloudStack is a powerful open-source cloud management platform used to deploy and manage large networks of virtual machines. In this guide, we’ll walk through the steps to install CloudStack on an Ubuntu-based server.

✅ Assumptions:

  • You are running Ubuntu 22.04 LTS.
  • You have a clean server (on-prem or EC2 instance) with root or sudo access.
  • Networking, firewalls, and repositories are properly configured.

📦 Step 1: Prepare the System

sudo apt update && sudo apt upgrade -y
sudo hostnamectl set-hostname cloudstack-mgmt


Enable the universe repo:

sudo add-apt-repository universe
sudo apt update

⚙️ Step 2: Install MariaDB Server

CloudStack requires a database backend.

sudo apt install mariadb-server -y

Configure MariaDB for CloudStack:

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Add or update these lines under [mysqld]:

bind-address = 127.0.0.1
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
max_connections = 500
innodb_file_per_table = 1
innodb_file_format = Barracuda
innodb_large_prefix = 1

Restart MariaDB:

sudo systemctl restart mariadb

🗃️ Step 3: Create the CloudStack Database

Login to MariaDB:

sudo mysql -u root -p

Run the following SQL commands:

CREATE DATABASE cloud CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON cloud.* TO 'cloud'@'localhost' IDENTIFIED BY 'cloudpass';
FLUSH PRIVILEGES;
EXIT;

☁️ Step 4: Install CloudStack Management Server

Add CloudStack’s official repository:

echo "deb http://download.cloudstack.org/ubuntu jammy 4.18 main" | sudo tee /etc/apt/sources.list.d/cloudstack.list
wget -O - https://download.cloudstack.org/release.asc | sudo apt-key add -
sudo apt update

Install the management server:

sudo apt install cloudstack-management -y

🧱 Step 5: Initialize the CloudStack Database

sudo cloudstack-setup-databases cloud:cloudpass@localhost --deploy-as=root

🚀 Step 6: Start the Management Server

sudo systemctl enable cloudstack-management
sudo systemctl start cloudstack-management

🌐 Step 7: Access the CloudStack UI

Once the management server is running, access the CloudStack UI via browser:

http://<your-server-ip>:8080/client

Use the default login:

  • Username: admin
  • Password: password

🎉 You’re In!

You can now configure zones, add hypervisors (KVM, Xen, or VMware), set up storage, and deploy virtual machines directly from the intuitive CloudStack web interface.


🔗 Bonus: Add KVM Host (Optional)

If you’d like to go further and add a KVM hypervisor to start spinning up virtual machines, I’ll cover that in a follow-up post!

🔥Subscribe to the channel: youtube.be/@AngryAdmin 🔥

🚨Dive into my blog: angrysysops.com

🚨Snapshots 101: a.co/d/fJVHo5v

🌐Connect with us:

💻Website: angrysysops.com

🔥vExpert info: vExpert Portal

Please leave the comment