Setup Controller
This guide will walk you through the steps required to get your cloud platform up and running quickly. Whether you're a seasoned system administrator or a first-time user, this guide is designed to make the installation process as smooth as possible.
We recommend running the controller and the compute on separate servers. The controller can be installed on a server or even your laptop or PC. The compute should be installed on a server with virtualization support (e.g. KVM).
Prerequisites
- Docker
- Docker Compose
Install
Clone the repository
git clone https://github.com/webvirtcloud/webvirtcloud.git
Go into the webvirtcloud directory
cd webvirtcloud
Set up Caddy
To configure TLS for the web server, copy either the Caddyfile.selfsigned
or Caddyfile.letsencrypt
and without TLS Caddyfile.noncert
template to Caddyfile
.
Caddy web server does not support TLS for IP address.
For example, if your IP address is 192.168.0.114
, you can use 192-168-0-114.nip.io
as your domain name. Below, we demonstrate how to set up a self-signed certificate for the domain webvirtcloud-192-168-0-114.nip.io
For TLS with self-signed certificates:
# Create the directory structure for Caddy certificates
mkdir -p .caddy/certs
# Generate a self-signed SSL certificate using OpenSSL
openssl req -x509 \
-newkey rsa:4096 \
-keyout .caddy/certs/key.pem \
-out .caddy/certs/cert.pem \
-days 365 \
-nodes \
-subj "/CN=webvirtcloud-192-168-0-114.nip.io"
# Copy the self-signed Caddyfile to the main Caddyfile
cp Caddyfile.selfsigned Caddyfile
Without TLS:
cp Caddyfile.noncert Caddyfile
Run the setup script:
./webvirtcloud.sh env
Example:
Enter your domain or IP address (only HTTP). Default: localhost
Enter: webvirtcloud-192-168-0-114.nip.io
Start WebVirtCloud
./webvirtcloud.sh start
For first-time users, refer to the Features section to explore the capabilities of WebVirtCloud.
- Client panel - https://webvirtcloud-192-168-0-114.nip.io
- Admin panel - https://webvirtcloud-192-168-0-114.nip.io/admin
Default Credentials for admin side:
username: [email protected]
password: admin
It is critical to change the default credentials immediately after the first login to ensure security.
You can create new user in admin side or register new user in client side.
Update controller
Run update script
./webvirtcloud.sh update
If you have installation before and want to use new features like the Load Balancer, you need to add new size to database:
./webvirtcloud.sh loaddata
Don't forget update WebVirtCompute daemon on nodes after update controller.
Wait until the update process finishes.
Additional settings
You can change the default settings in the custom.env
file. Just copy variables you want to change from the global.env
file and change them in the custom.env
file. Example for mail settings:
# Email environment variables
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_HOST_USER=admin
EMAIL_HOST_PASSWORD=admin
EMAIL_USE_TLS=True
EMAIL_FROM="WebVirtCloud <[email protected]>"
Load Balancer
Load Balancer is a new feature in WebVirtCloud. You can create a load balancer and add virtual machines to it. The load balancer will distribute the incoming traffic to the virtual machines.
Manually enable Load Balancer for client side (only if you have installed befeore Load Balancer feature):
echo "VITE_LOADBALANCER=true" >> custom.env
Load Balancer required access from controller to private network for deploy and manage HaProxy on virtual machine.
Installing the Compute Node (Hypervisor)
Now your controller is up and running. The next step is Setup Hypervisor.
After updating the controller, make sure to update the WebVirtCompute daemon on all compute nodes to ensure compatibility.
Private networking
If you don't have additional network interfaces on your server for private network, you can use the WireGuard VPN to create a private network between the controller and the compute.
Also check README.md which is always up-to-date.