Wiki JS Runtime Host on Windows

How to Host Wiki JS as a Service on a Windows VM, so that it automatically starts along with the system.

Wiki JS Runtime Host on Windows

The problem I had here was to easily configure the runtime host for WikiJS on a Windows VM, so that it runs in the background and starts automatically with the system.

First of all, installing WikiJS on Windows is pretty well documented; I managed to have it up and running quite easily, ~30 mins: https://docs.requarks.io/install/windows.

But, setting it up to run as a service (https://docs.requarks.io/install/windows#run-as-service) was practically impossible. It's not actually documented, it simply presents some references to utilities that can potentially run any node app as a service. I, for one, did not manage to set up any of those on a Windows Server VM.

So... the solution I found, which is not documented anywhere: Task Scheduler.

Basically, open up the Windows Task Scheduler (run: taskschd.msc) and create a new Scheduled Task with the settings described below.

Here are the settings:

User Account running it must be an Administrator
Only required trigger is at System Startup
Action to run is Start a Program: nodejs.exe server
running in the WikiJS root directory
No running conditions
And a few run settings

That's it.