Install Xen-Orchestra in Debian

This guide is copied from:
I wanted a local copy to save for future need, in case the original page is gone/can’t find it again 🙂

Installing dependencies

From debian package repository install:
sudo apt-get install build-essential redis-server libpng-dev git python-minimal nfs-common curl
*nfs-common is needed for mounting NFS remote storages through xoa UI.

• install nodejs
curl -sL | sudo -E bash –
sudo apt-get install -y nodejs

• install yarn
curl -sS | sudo apt-key add –
echo “deb stable main” | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn

Installing xoa

First download source code, I use /opt path:
cd /opt/
sudo git clone -b master

Then use yarn to build xoa:

cd xen-orchestra/
sudo yarn
sudo yarn build

After all is finished copy sample config file into root path:
sudo cp /opt/xen-orchestra/packages/xo-server/sample.config.yaml /opt/xen-orchestra/.xo-server.yaml

Now edit config file and uncomment line:
mounts: ‘/’: ‘../xo-web/dist/’

To run xoa you can use yarn start inside /opt/xen-orchestra/ but let’s continue…

Installing extra modules

There are few modules that are absolutely must have especially for scheduled backups.
So go into node_modules directory and create symbolic links of module that were donwnloaded with source code:

sudo ln -s /opt/xen-orchestra/packages/xo-server-transport-email /opt/xen-orchestra/packages/xo-server/node_modules
sudo ln -s /opt/xen-orchestra/packages/xo-server-backup-reports /opt/xen-orchestra/packages/xo-server/node_modules
sudo ln -s /opt/xen-orchestra/packages/xo-server-auth-ldap /opt/xen-orchestra/packages/xo-server/node_modules

Autostart xoa service
To make systemd xoa service (autostart on boot, easy restart etc) create file in systemd path:
sudo vi /etc/systemd/system/xo-server.service
and copy into it:

# systemd service for XO-Server.

Description= XO Server

ExecStart=/usr/bin/yarn start

# END systemd service for XO-Server.

Next reload daemon and enable service:

sudo systemctl daemon-reload
sudo systemctl enable xo-server.service
sudo systemctl start xo-server.service

And that’s it. I wont explain UI of xoa. You can look it online[4]. One of the great features is scheduled backups, choose NFS storage, VM’s you need to backup, backup interval and you’re good to go. There are also different types of backup but more one that use online docs.

Updating xoa
If you wanna update xoa you can just use git and then yarn to rebuild:

cd /opt/xen-orchestra/
sudo git pull –ff-only
sudo yarn
sudo yarn build

This entry was posted in Guides. Bookmark the permalink.