Development release


If you are not sure, you probably want to install the stable release. Follow this guide.

You can get the development release cloning the sources.


Don’t do this if you install a packaged release.

git clone

Possible development scenarios where to deploy

Obviously if you can deploy on a physical machine will be better but it is not always possible. In that case you can test on a nested KVM, that is, a KVM inside another KVM.


KVM requires VT-X / AMD-V.

sudo apt install cpu-checker
sudo kvm-ok


Do not consider VirtualBox in this situation, because it doesn’t pass VT-X / AMD-V to the guest operating system.

Ubuntu required packages

Check this file at the line depends for a list of required packages. You must install it running:


The libvirt-bin package was dropped since Ubuntu 18.10. The package was split into two parts: libvirt-daemon-system and libvirt-clients.

sudo apt-get install perl libmojolicious-perl mysql-common libauthen-passphrase-perl \
libdbd-mysql-perl libdbi-perl libdbix-connector-perl libipc-run3-perl libnet-ldap-perl \
libproc-pid-file-perl libsys-virt-perl libxml-libxml-perl libconfig-yaml-perl \
libmoose-perl libjson-xs-perl qemu-utils perlmagick libmoosex-types-netaddr-ip-perl \
libsys-statistics-linux-perl libio-interface-perl libiptables-chainmgr-perl libnet-dns-perl \
wget liblocale-maketext-lexicon-perl libmojolicious-plugin-i18n-perl libdbd-sqlite3-perl \
debconf adduser libdigest-sha-perl qemu-kvm libnet-ssh2-perl libfile-rsync-perl \
libdate-calc-perl libdatetime-perl libdatetime-format-dateparse-perl libnet-openssh-perl \
libpbkdf2-tiny-perl libdatetime-perl

Mysql Database

Ravada needs a MySQL database to store information.

MySQL server


MySql required minimum version 5.6

It is required a MySQL server, it can be installed in another host or in the same one as the ravada package.

Ubuntu based distros

sudo apt-get install mysql-server

Debian based distros

sudo apt-get install mariadb-server

RedHat and Fedora based distros

sudo dnf install mariadb mariadb-server
sudo systemctl enable --now mariadb.service
sudo systemctl start mariadb.service

After completion of mysql installation, run command:

sudo mysql_secure_installation

MySQL database and user

It is required a database for internal use. In this examples we call it ravada. We also need an user and a password to connect to the database. It is customary to call it rvd_user. In this stage the system wants you to set a password for the sql connection.


When installing MySQL you wont be asked for a password, you can set a password for the root user in MySQL via mysql_secure_installation or type your user’s password when it ask’s you for a password.

Create the database:

sudo mysqladmin -u root -p create ravada

Grant all permissions on this database to the rvd_user:

sudo mysql -u root -p ravada -e "create user 'rvd_user'@'localhost' identified by 'Pword12345*'"
sudo mysql -u root -p ravada -e "grant all on ravada.* to rvd_user@'localhost'"

The password chosen must fulfill the following characteristics:

  • At least 8 characters.

  • At least 1 number.

  • At least 1 special character.

Config file

Create a config file at /etc/ravada.conf with the username and password you just declared at the previous step.

  user: rvd_user
  password: *****

When developping Ravada, your username must be able to read the configuration file. Protect the config file from others and make it yours.

sudo chmod o-rx /etc/ravada.conf
sudo chown your_username /etc/ravada.conf

Ravada web user

Add a new user for the ravada web. Use rvd_back to create it.

cd ravada
sudo PERL5LIB=./lib ./script/rvd_back --add-user admin


The server must be able to send DHCP packets to its own virtual interface.

KVM should be using a virtual interface for the NAT domnains. Look what is the address range and add it to your iptables configuration.

First we try to find out what is the new internal network:

sudo route -n
...   U     0      0        0 virbr0

So it is , netmask 24. Add it to your iptables configuration:

-A INPUT -s -p udp --dport 67:68 --sport 67:68 -j ACCEPT


The client must have a spice viewer such as virt-viewer. There is a package for linux and it can also be downloaded for windows.


Ravada has two daemons that must run on the server:

  • rvd_back : must run as root and manages the virtual machines

  • rvd_front : is the web frontend that sends requests to the backend

Run each one of these commands in a separate terminal

Run the backend in a terminal:

sudo PERL5LIB=./lib ./script/rvd_back --debug
Starting rvd_back v1.2.0

The backend must be stopped and started again when you change a library file. Stop it pressing CTRL-C

Run the frontend in another terminal:

PERL5LIB=./lib morbo -m development -v ./script/rvd_front
Server available at

Now you must be able to reach ravada at the location http://your.ip:3000/ or if you run it in your own workstation.

The frontend will restart itself when it detects a change in the libraries. There is no need to stop it and start it again.

Start/Shutdown scripts

If you wish to create a script to automatize the start and shutdown of the ravada server, you can use these two bash scripts:

 2#script to start ravada server
 6	echo "./start_ravada"
 7	echo "./start_ravada 1 (messages not shown to terminal)"
10if [ "$1" == "-h" ]
12	display_usage
13	exit 1
16    export PERL5LIB="./lib"
17	if [ "$SHOW_MESSAGES" == "1" ]
18	then
19	   morbo -m development -v ./script/rvd_front > /dev/null 2>&1 &
20	   sudo PERL5LIB=./lib ./script/rvd_back --debug > /dev/null 2>&1 &
21	else
22	   morbo -m development -v ./script/rvd_front &
23       sudo PERL5LIB=./lib ./script/rvd_back --debug &
24	fi
25	echo "Server initialized succesfully."
 2#script to shutdown the ravada server
 4pid_front=$(pidof './script/rvd_front')
 5if [ -n "$pid_front" ];then
 6    echo "Shutting down rvd_front"
 7    sudo kill -15 $pid_front
 9    echo rvd_front already down
12pid_back=$(pidof -x './script/rvd_back')
13if [ -n "$pid_back" ];then
14    echo "Shutting down rvd_back"
15    sudo kill -15 $pid_back
17    echo rvd_back already down