Skip to content

webvirtcloud/webvirtcloud

Repository files navigation

WebVirtCloud

WebVirtCloud is a web-based virtualization platform that allows users to manage and create virtual machines on a remote server. You just need to install WebVirtCloud on a server or even your laptop or PC and you can use it to create, manage, and delete virtual machines. It is a self-hosted alternative to platforms like DigitalOcean, Linode, and Vultr.

Features

  • User management: WebVirtCloud allows you to create and manage users.
  • Virtual machine management: You can create, manage, and delete virtual machines on a remote server.
  • Virtual machine templates: Pre-configured virtual machine templates, such as Ubuntu, Debian, Fedora, CentOS, Almalinux and Rocky Linux.
  • Firewall management: You can manage the firewall rules for your virtual machines.
  • Floating IP management: You can manage floating IPs for your virtual machines.
  • Load Balancer: You can create a load balancer and add virtual machines to it.

How it works

We have two components: the controller and the compute. The controller is the web interface that allows you to manage your virtual machines. The compute is the hypervisor that runs the virtual machines.

Recommended setup

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).

Multi region support

WebVirtCloud supports multi-region. You can have multiple compute nodes in different regions and manage them from the same controller.

Requirements

Controller configuration

To install WebVirtCloud, follow these steps:

  1. Clone the repository:
git clone https://github.com/webvirtcloud/webvirtcloud.git
  1. Change into the webvirtcloud directory:
cd webvirtcloud
  1. Copy Caddyfile from templates Caddyfile.selfsigned or Caddyfile.letsencrypt to Caddyfile. For example, if you want to use a self-signed certificate:
cp Caddyfile.selfsigned Caddyfile
  1. Run script for deploy WebVirtCloud:
./webvirtcloud.sh env
  1. Start WebVirtCloud:
./webvirtcloud.sh start
  1. Open client side in browser (example for domain: webvirtcloud.app):
http://client.webvirtcloud.app
  1. Open admin side in browser (example for domain: webvirtcloud.app):
http://manage.webvirtcloud.app

Warning

If you use webvirtcloud.app or your own wildcard domain you need to allow SSL certificate in browser.

For assets:

https://assets.webvirtcloud.app

and for API:

https://api.webvirtcloud.app

Credentials

Default credentials for admin side:

username: admin@webvirt.cloud
password: admin

You can create new user in admin side or register new user in client side.

Update controller

Run script for update:

./webvirtcloud.sh update

If have installation before new features like Load Balancer, you need to add new size to database:

./webvirtcloud.sh loaddata

Warning

Don't forget update WebVirtCompute daemon on nodes after update controller.

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 <noreply@gmail.com>"

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

Important

Load Balancer required access from controller to private network for deploy and manage HaProxy on virtual machine.

Compute configuration (hypervisor)

More information about the compute configuration can be found in the WebVirtCompute repository.

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.

License

WebVirtCloud is licensed under the Apache 2.0 License. See the LICENSE file for more information.