/vm

:computer: The Nextcloud VM (virtual machine)

Primary LanguageShellGNU General Public License v3.0GPL-3.0

Nextcloud VM

Server installation. Simplified. ☁️

Interactive Guidance

The Nextcloud VM(aka Nextcloud Virtual Machine or NcVM) — helps you create a personal or corporate Nextcloud Server faster and easier. Fundamentally, NcVM is a carefully crafted family of *nix scripts which interactively guide you through a quality-controlled installation to obtain an A+ security-rated Nextcloud instance.

Curated Extras

The Nextcloud app store extends core features by allowing you to enable a multitude of free one-click apps. However, integration apps there like Collabora Online and ONLYOFFICE are solely bridges to Nextcloud. You’re still required to install those services separately, which can be complex. NcVM provides optional full installation of select curated apps, including those and others. Monitor and manage your cloud using any web browser with NcVM’s hand-picked collection of power utilities featuring stunning, modern UIs.

All Systems Go

NcVM can check for and install stable updates to keep things current, smooth, and secure.


Support the development

Machine configuration of the released version

Please check the configuration here.

Full documentation

You can find the full documentation here

Build your own VM, or install on a VPS

DigitalOcean example: https://youtu.be/LlqY5Y6P9Oc
The script will mount and format the drive. Please select Manually Format & Mount when adding the second volume.

MINIMUM SYSTEM REQUIREMENTS

  • A clean Ubuntu Server 18.04.X using the alternative installer
  • OpenSSH (preferred)
  • 20 GB HDD for OS
  • XX GB HDD for DATA (/mnt/ncdata)
  • Absolute minimum is 1 vCPU and 2 GB RAM (4 GB minimum if you are running OnlyOffice)
  • A working internet connection (the script needs it to download files and variables)
  • VMware Player (fully tested with Hyper-V and KVM as well).

RECOMMENDED

  • DHCP available
  • 40 GB HDD for OS
  • 4 vCPU
  • 4 GB RAM
  • Ports 80 and 443 open to the server. Here’s why port 80 is recomended. Yes: the VM handles redirection to 443.

INSTALLATION: OVERVIEW

Two scripts run consecutively to create your Nextcloud instance, seperated by a reboot. The first script (nextcloud_install_production.sh) is used to to the main installation, e.g. when installing it on a new server. It helps you choose and install features, create your user account, and then reboots. After the VM reboots and you login with the new user name you created, the second script (nextcloud-startup-script.sh) completes setup.

INSTALLATION: STEP-BY-STEP

  • STEP 1 — Download and execute the latest Nextcloud VM installer script using super user do (sudo):
    sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh)"
    After the first script completes ...
  • STEP 2 — The VM automatically reboots.
  • STEP 3 — Login with your new user name locally or remotely (via CLI: ssh <user>@IP-ADDRESS). The second script executes and completes installation.
AN IMPORTANT NOTE

If the VM automatically runs as root after rebooting, press CTRL+C to abort nextcloud-startup-script.sh. Then manually run the startup script as your newly-created user: sudo -u <user> sudo bash /var/scripts/nextcloud-startup-script.shSetup is not finished after running the first script. Both must execute consecutively.

Do you want to run this on your Raspberry Pi?

Great news! We’ve forked this repository and created a Raspberry Pi image. Download it here or here.

We call it NextBerry and it’s confirmed to be working on Raspberry Pi 2 & 3.

NOTE (2018-08-01): This is not maintained anymore, but keeping the info in case someone wants to pick it up again.

I want to test a Release Candidate (RC)!

No problem, brave explorer! We made it simple. Run update.sh but abort it before it starts so that you have the latest nextcloud_update.sh. Then put this in your nextcloud_update.sh below the curl command (lib.sh) but before everything else and run it.

To test a specific RC version:

NCREPO="https://download.nextcloud.com/server/prereleases"
NCVERSION=12.0.1RC5
STABLEVERSION="nextcloud-$NCVERSION"

Or the latest RC:

NCREPO="https://download.nextcloud.com/server/prereleases"
NCVERSION=$(curl -s -m 900 $NCREPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | tail -1)
STABLEVERSION="nextcloud-$NCVERSION"

FAQ

Keep asking questions so we can add them here.

Q: Where can I download VMware Player?
A: Get the latest release here.

Q: Why are my apps disabled during an upgrade?
A: To ensure compatibility with a newer system. (Read further.)

Q: How do I update my Nextcloud VM?
A: Use our script — sudo bash /var/scripts/update.sh — or, as root in the terminal — run_update_nextcloud

Q: How do I run the occ command?
A: We’ve added an alias for that as well. As root, just run nextcloud_occ

Q: The Mcrypt module is missing in the VM. Why?
A: It’s deprecated¹ abandonware². (More here.)

Q: Where do I tweak PHP-FPM settings?
A: You can change them in /etc/php/7.2/fpm/pool.d/nextcloud.conf but BE AWARE: Only alter them if you know what you’re doing!

Q: Some apps like issuetemplate aren’t installed by the setup script.
A: We’ve seen this temporary network irregularity before. Try again. It’ll work!

Q: The downloaded file is just a few kilobytes, or corrupted.
A: That’s due to heavy server load. Wait a few minutes and try again.

Q: The script says: “WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.”
A: Read here.

Q: How do I fix a “NETWORK NOT OK” error when booting the VM?
A: Check the most likely culprits: your network and firewall settings.

  • Open VMware / Virtualbox Settings. Remove your VM’s network adapter (aka Network Interface Card or NIC). Add a new NIC.
    alt_tag
  • Set the NIC to Bridged, not Shared mode.
  • Ensure your firewall isn't blocking the VM’s IP address.
  • Ensure either:
    • (a) your router has DHCP enabled so it automatically assigns the VM a unique IP address or
    • (b) you manually assign your VM a unique static IP (preferably locked to its MAC address)

Q: I get a message that I'm not root, but I am.
A: Is your net connection solid? See more here

Q: Which Hyper-V generation should we chose when creating a machine to load this image?
A: Currently, use a first generation machine.

Q: Do you have a pre-configured Hyper-V VM?
A: Yep! Download it here.

Q: I want a bigger version of this VM. Where can I find that?
A: Download 500GB, 1T, 2T, and order custom sizes here.

Q: I found a bug! How do I report it?
A: Submit bug sightings here.

Q: How do I install apps that weren’t selected during the first install?

A: Easy! All app installer scripts are in our repo. Just download and execute the script(s) for your desired app(s). For example, to install Nextcloud Talk run: curl -sLO https://raw.githubusercontent.com/nextcloud/vm/master/apps/talk.sh && sudo bash talk.sh

Q: I typed in the wrong [domain name | password | etc]! Can I abort and resume?
A: Sorry, no. Extract the VM again and start over. The script can not be run twice in a row.

Q: Does automatic update affect both Ubuntu and Nextcloud?
A: If you want to auto update Ubuntu and Nextcloud check this blog post.

Q: Can I enable / disable auto updates of my OS / Nextcloud?
A: Yes. It’s controlled by a cronjob. Disable the cronjob to disable auto updates.

Q: How do I backup?
A: There are several ways. We recommend Rsync to a NAS or similar. You can find a script here.

Q: How do I route ports 443, 10000, and 22 to my VM? Can you help me with NAT loopback?
A: Sure can. Check this out.

First look

alt tag

The usual tags

Downloads from Github:
Downloads
Build Status:
Build Status
Stability Status:
Stability Status

Current maintainers

Special thanks to