How to Install Nextcloud Server on Windows with the WSL Install Script

Hi Nextcloud community.

I’ve created a paid but unobfuscated PowerShell script for the installation of Nextcloud Server on Windows using WSL.

Running Nextcloud this way has many advantages over previous single-user Windows solutions such as not having a disk space cap, less resource usage, greater compatibility with apps, and thanks to the script easy installation and configuration.

The script also solves tons of issues that arise when trying to do this manually by following internet guides and it adds additional features such as automated shutdown of the server while on battery power or while gaming.

I’ve personally used the script for years at this point and it’s extremely reliable. I’ve also kept it maintained for current customers on a regular basis which is why the script is paid.

I believe it is currently the best way to install a single user instance of Nextcloud Server on Windows and sadly not a lot of people know about it which is why I’m posting here.

For more information:

Does it install nextcloud on docker for desktop or in wsl2 directly?

I have an instance running the nextcloud snap in wsl2 and it’s stable and runs great.

Good question!

It installs Nextcloud in WSL2 directly without docker or snap.

Pros of this method:

  1. This has the benefit of avoiding the issues that come with switching your distro to use systemd. Systemd is now officially supported by Microsoft but this was not the case when the script was released. Some issues that are caused by systemd remain today even though support is now official. The main issue right now is that there are scenarios where interacting with a systemd WSL distro from the Windows shell is broken making reliable automation not viable.

  2. Not requiring systemd (or especially docker) and being able to more reliably automate startup/shutdown of WSL means even less resource usage. For example our script includes automated startup/shutdown while gaming or on battery power.

  3. If you’re running the snap package this means you are using MySQL as your Nextcloud database. In testing MySQL databases running under WSL have an abnormally high chance of corruption when the computer is powered off. I highly recommend anyone using MySQL under WSL switch to something else immediately. Our script uses SQLite which has many benefits over other databases for single user instances and testing shows it’s not actually any slower (and can actually be a bit faster). The main benefit for the end user other than reliability is being able to back up/migrate their database alongside their files in Windows without having to input any extra commands or having to interact with the WSL shell much at all really.

  4. And the last thing I’ll put here as a plus over using snap/docker is related to that, it’s just easy. It even guides the user through setting up networking. When coming up with this product I wanted to make something that someone who’s not experienced in networking or maybe someone that’s never used Linux before could get going with, and I think I succeeded.

I have already dealt with this and yes you are right. If you are interested, you can read here. I have currently updated this version to Nextcloud 29 Beta. Runs well too.

Good to know, thank you for the feedback!