KB450083 - Installing Nextcloud on Windows
Posted on November 8, 2018 by Rob MacQueen
- Make sure all virtualization software is uninstalled (VMware, Hyper-V)
- Download and install Virtualbox using default settings from https://www.virtualbox.org/wiki/Downloads
- Download Nextcloud VM Pre-installed – 40 GB from https://www.hanssonit.se/nextcloud-vm/
- Open Virtualbox.
- Import the OVA/VHDx into VirtualBox by clicking File > Import Appliance. Navigate to the directory that you downloaded the Nextcloud VM to and select the .ova file. Click Next. Click Import on the next screen. The import will take a little bit of time.
- After the import is complete, you should see “vm” listed to the left in a “Powered Off” state.
- Right click on the vm and select Settings. Make sure under the General options that Ubuntu (64 bit is selected if you have a 64 bit main OS or Ubuntu (32-bit) if you have a 32 bit main OS. (If you don’t select the correct Version, you will be stuck at a black screen with a blinking cursor.)
- Under the Network option make sure that Enable Network Adapter is checked, Bridged Adapter is selected next to “Attached to:” and that your Network Adapter is selected under “Name:”.
- Click OK.
- With “vm” highlighted, click Start. Ubuntu will begin setting up the required files and commands.
- Once Ubuntu completes the setup, you will be faced with a Nextcloud Login.
- Log in with the following default credentials. Login: ncadmin Password: nextcloud
- After you are logged in the next screen will ask you for the same password again to begin running the start-up script. It will check the network connection first and then install the remaining scripts from GitHub.
- The next screen will then tell you what scripts will be run and what settings you can add/change.
- You can change the keyboard layout for the first setting by typing “y” and then hit Enter. Select your keyboard and then hit Enter. The default keyboard is in Swedish so you may need to change it to English (US). Press Enter. Press Enter again if English (US) is the language you selected on the previous screen. Press Enter on the next screen to leave it default for the keyboard layout. Press Enter again on the No compose option. You can also type “n” to move on to the next step.
- Type “y” to change the time zone. Select your region and press Enter. Select your time zone and press Enter to exit this step.
- Press Enter to go on to the downloading of packages. Type “n” unless you want to change to a mirror for the download location.
- Press Enter on the following screen to allow SSL to be installed. This is a self-signed certificate and you can change this at a later date. It also reminds you to open both port 80 and 443 within the server. (You can visit https://www.techandme.se/open-port-80-443/) Type “y” to install the SSL Certificate if you have a domain. Type “n” if you still need to get a domain. You will be able to run this script again after you get a domain. The script is located in the /var/scripts directory. Just type “sudo bash /var/scripts/activate-ssl.sh”. Press Enter to move on to the next step.
- The next step will give you some apps that you can configure during this process. You can hit the space bar on the app you want to configure or for our purposes just hit Enter.
- In this step you can change the password for the system user. Enter a new UNIX password. Press Enter. Then retype it. Press Enter.
- Next, change the Nextcloud password. Enter a new password, press Enter and then retype it. Press Enter.
- On the Extra configurations screen it will give you some options to configure. Press the Space bar on the options you want to configure or press Enter if you’re not configuring them right now.
- Packages will then be downloaded and the system upgraded.
- After the install is complete, you will be faced with a Congratulations screen. Take note of the IP and Hostname listed. There is also some other good information listed that you may want to keep as well including the Tips & Tricks.
- Press Enter when you are done reading and taking note of the information. The Installation is finished; press Enter to reboot the system.
- The system will reboot, load the files needed for the OS.
- When the OS loads, you will now be able to log into Nextcloud with the user “ncadmin” and the password you chose in one of the previous steps.
- The login will complete and you will be at the Nextcloud main menu.
- You can now access your Nextcloud installation via the LAN IPv4 address internally and via the WAN IPv4 address for external use.
If you want to start the nextcloud server automatically after a reboot of windows you can do the following steps:
- Locate your startup folder for the user that the vm is installed. The startup folder on my system is:
- C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
- If you need help finding the startup folder on your windows instance press keys WINDOWS+R and enter shell:startup.
- In that folder place a batch file nextcloud.bat with following content:
- "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm vm --type headless
- In this example the VM is named vm. You may have to change it for your instance but it may also be the same since we are using a preconfigured OVA image.