Skip to content

Commit 2aeaa93

Browse files
authored
Update vagrant/install.sh, vagrant/README.md and vagrant/Vagrantfile to add support for nextcloud current release. Update readme to make it easier to set up your local dev environment. (#2707)
Signed-off-by: Sami Nieminen <[email protected]>
1 parent 0c34400 commit 2aeaa93

File tree

3 files changed

+40
-13
lines changed

3 files changed

+40
-13
lines changed

vagrant/README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,37 @@
11
# Nextcloud VM with vagrant
2-
This subrepo contains all the Vagrant config to get an Ubuntu 20.04 VM with the latest version of Nextcloud installed.
2+
This subrepo contains all the Vagrant config to get an Ubuntu 24.04 VM with the latest version of Nextcloud installed.
33

44
**Please note that this is __not__ the preferred way to install Nextcloud. It's also untested in the current state.**
55

66
# Setup
7+
8+
## Host setup
9+
Running this cloud image requires you to use libvirt.
10+
Tested working on stock Ubuntu 22.04 LTS
11+
12+
1. Install `qemu-kvm`, `libvirt-daemon-system`, `bridge-utils`, `libvirt-dev` and `libvirt-clients` packages-
13+
14+
Then install the vagrant libvirt plugin: `vagrant plugin install vagrant-libvirt`
15+
16+
Then we need to make sure nested virtualization is initialized, as Nextcloud VM uses QEMU to run apps etc:
17+
18+
Check that nested virtualization is enabled:
19+
Intel systems: `cat /sys/module/kvm_intel/parameters/nested`
20+
AMD systems: `/sys/module/kvm_amd/parameters/nested`
21+
22+
Must return Y or 1.
23+
24+
Following must be done after each reboot:
25+
**Intel setup**
26+
sudo modprobe -r kvm_intel
27+
sudo modprobe kvm_intel nested=1
28+
29+
**AMD setup**
30+
sudo modprobe -r kvm_amd
31+
sudo modprobe kvm_amd nested=1
32+
33+
34+
## VM Setup
735
`vagrant up` will install everything
836

937
Go to [https://localhost:8080/](https://localhost:8080/) and access Nextcloud with credentials `ncadmin / nextcloud`
@@ -18,4 +46,4 @@ See https://raw.githubusercontent.com/nextcloud/vm/main/lib.sh for default value
1846

1947
# Special thanks to
2048
@gjgd for providing https://github.com/gjgd/vagrant-nextcloud which this is based upon
21-
49+
@celeroncool for updating it to 24.04 :)

vagrant/Vagrantfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
Vagrant.configure("2") do |config|
2-
config.vm.box = "ubuntu/focal64"
3-
config.vm.network "forwarded_port", guest: 443, host: 8080
2+
config.vagrant.plugins = "vagrant-libvirt"
3+
config.vm.box = "cloud-image/ubuntu-24.04"
4+
config.vm.network "forwarded_port", guest: 443, host: 8081
45
config.vm.provision "shell", path: "install.sh"
5-
config.vm.provider "virtualbox" do |vb|
6-
vb.memory = "2048"
7-
end
8-
config.vm.provider "vmware_desktop" do |v|
9-
v.vmx["memsize"] = "2048"
6+
config.vm.provider "libvirt" do |libvirt|
7+
libvirt.memory = 4096
8+
libvirt.cpus = 4
9+
libvirt.nested = true
10+
libvirt.cpu_mode = "host-model"
1011
end
1112
end

vagrant/install.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
true
44
SCRIPT_NAME="Install NcVM with Vagrant"
5-
# shellcheck source=lib.sh
6-
source /var/scripts/fetch_lib.sh
75

8-
check_command git clone https://github.com/nextcloud/vm.git
6+
git clone https://github.com/nextcloud/vm.git
97

10-
cd vm || exit && print_text_in_color "$IRed" "Could not cd into the 'vm' folder."
8+
cd vm
119

1210
sudo bash nextcloud_install_production.sh --provisioning

0 commit comments

Comments
 (0)