TRANSLATED INTO ENGLISH WITH AN AUTOMATIC TRANSLATOR ... ORIGINAL GUIDE IN SPANISH IN THE FOLLOWING POST
(TRADUCIDO AL INGLÉS CON TRADUCTOR AUTOMÁTICO ... GUIA ORIGINAL EN ESPAÑOL EN EL SIGUIENTE POST)
1.1 Hardware requirements
1.2 Keyboard configuration in the VM
1.3 Network configuration
2. CREATION OF THE VIRTUAL MACHINE IN OPENMEDIAVAULT KVM
2.1 Previous steps
2.2 Creating the VM in the OMV GUI
2.3 Viewers and VM startup
3. INSTALLATION AND INITIAL CONFIGURATION OF UBUNTU 20.04 LTS
3.1 Ubuntu Desktop 20.04 LTS
3.2 Ubuntu Server 20.04 LTS
3.3 Network configuration. Fixed IP.
3.4 Complete installation of Ubuntu Desktop to Ubuntu Server
3.5 Initial Ubuntu Server configuration. User, OpenSSH and Firewall
3.5.4 Set the host domain
3.6 Disabling or uninstalling the graphical interface.
3.6.1 Disable graphical interface in Ubuntu 20.04 LTS
3.6.2 Uninstall graphical interface in Ubuntu 20.04 LTS
4. BACKUP COPY, RESTORATION AND DUPLICATION OF VM.
4.1 VM backup
4.2 Restore VM backup
4.3 VM duplication
5. INSTALLATION OF NEXTCLOUD SERVER IN UBUNTU 20.04 LTS THROUGH SNAP
5.1 Installing the Nextcloud Server snap on Ubuntu 20.04 LTS
5.2 Initial configuration of the Nextcloud Server snap in Ubuntu 20.04 LTS
5.3 Installation of Certificate for HTTPS secure browsing in Nextcloud snap.
5.4 Manual replacement of self-signed certificate by Let's Encrypt certificate in Nextcloud snap.
6. INSTALLATION AND MANUAL CONFIGURATION OF NEXTCLOUD SERVER IN UBUNTU 20.04 LTS. ADVANCED USERS.
6.1 Apache and MySQL Installation
6.2 Installing Nextcloud 22
6.3 Apache configuration
6.4 Starting Nextcloud
Nextcloud is an open source service that provides a private cloud hosted on our server, in the style of icloud or google drive, but with the documents under our absolute control on our server. It has countless plugins that expand its functionality. On its official page we find documentation for the user, see here, and for the administrator, see here.
This guide explains the procedures in a way that a user new to Linux can understand. If you are an advanced user, you can skip many parts.
The COMPLETE PROCESS is described starting from a conventional OPENMEDIAVAULT (OMV) installation to get Nextcloud in an Ubuntu VIRTUAL MACHINE (VM) within OMV through the KVM plug-in. The KVM plugin is integrated into the OMV GUI (thanks, ryecoaaron), it allows to virtualize an operating system in a simple way and there is support in this forum for its use. Ubuntu is one of the recommended operating systems to host Nextcloud in its official documentation, see here.
The virtualization process in OMV is described using the KVM plug-in. It solves a possible keyboard mapping problem in languages other than English with some linux operating systems, this method can be improved, but it works.
It describes how to install and configure Ubuntu with or without a graphical environment (Desktop or Server), and how to convert Desktop to Server and vice versa. You can also leave the graphical environment installed but disabled without consuming resources, recommended for non-advanced Linux users.
Two methods of installing Nextcloud are described. By snap or by installing LAMP and Nextcloud on the system. There are several ways to do it, see here. Installation via snap is recommended for non-advanced linux users.
It describes how to do the initial configuration of Nextcloud.
It describes how to install a Lets Encrypt Certificate or a self-signed certificate if you do not have a domain (it is recommended to have one, it is cheap and easy to configure, but it is not essential).
Depending on your installation choices, you will skip parts of the guide.
1.1 Hardware requirements:
CPU with virtualization capacity (check the characteristics on the manufacturer's website)
CPU with at least two cores to install Ubuntu on the VM.
RAM. At least 2GB to dedicate to the Ubuntu VM (plus what we need for the OMV system, it is advisable to have 4GB or more in the system)
HDD. We recommend an SSD disk formatted in EXT4 and of the capacity that we want to have in Nextcloud. Disk formats that use "copy on write" are not virtual machine friendly, although you can always disable copy on write in that folder. If we need more space later, there are ways to expand it by adding another disk or replacing this one and moving the VM to the new disk (see point 4 of this guide).
1.2 Difficulties with keyboard mapping in the VM:
There are historical complications with keyboard mapping and graphical viewers in virtual machines (especially VNC viewers), and some apparently still persist. KVM configures the default keyboard mapping in English, if you use English keyboard you will not have these problems. In my case, with a Spanish keyboard, I have been able to configure it correctly in Ubuntu Server after several attempts. In other languages there are also complications.
An easy way to overcome this difficulty is to install Ubuntu Desktop, and use Virt Viewer (Spice) to view the VM from a Windows PC. Ubuntu Desktop correctly configures everything automatically and it works. Then install Ubuntu Server on Ubuntu Desktop (very simple, a command on the command line). You can then choose to disable or uninstall the graphical interface to save resources and gain server security, or keep it active if you want.
1.3 Network configuration in the VM:
There are two network configuration options on the VM.
The "default" network, the default configuration, explained in a simple way, is the equivalent of having an intermediate "virtual router" between our VM and the physical router (or the team that assigns IPs). This virtual router will assign IP addresses to the VM in a subnet within the main network of our intranet. That is, a subnet is created within our intranet.
The network "bridge" is a Macvtap bridge, it is the equivalent of a "virtual switch". It is like having a switch that directs the host machine (OMV) and the guest machine (our VM) alike to the physical router of our intranet. Our router will assign an IP to OMV and another IP to the VM as if they were separate machines within the network.
My recommendation if you have problems with this is to define the VM with the network "default" and then change it to "bridge". It is the method that has worked best for Ubuntu to recognize it correctly. Each one to follow their best path.
(continue in the next post)