Install Gruxi as a Windows service
Installing Gruxi as a Windows service provides the best performance and reliability on Windows servers. This method ensures that Gruxi starts automatically with the system and runs in the background without requiring a user to be logged in. It is ideal for production environments where you want Gruxi to be always available and managed by the Windows Service Control Manager.
When using the prebuilt binaries, Gruxi only writes data relative to the directory it is run from, so you can easily manage persistence by running it from a specific location. Logs are kept in the logs directory, and the database is stored in the db directory. You can also place your web content in the www-default directory or configure additional sites via the admin portal.
1. Download the release
You can download the latest Windows release from GitHub Releases.
2. Extract and run
First, you need to extract the downloaded archive. On Windows, you can use built-in extraction tools or third-party software like 7-Zip
Make sure to place the extracted files in a directory where the service will have appropriate permissions to read/write data and in a location where you want the service to run after installation. This is important, as this location will be used for the service's working directory, and Gruxi will write logs and database files relative to this location.
Run the Command Prompt as Administrator and navigate to the extracted directory. Then, run the following command to install Gruxi as a service:
gruxi.exe --install-serviceThe command will run and exit immediately, and the service will be installed. You can verify that the service is installed by opening the Services management console (services.msc) and looking for a service named "Gruxi".
It will be set to start automatically on next restart, but you can start it immediately from the Services management console.
TIP
If you need to remove the service, you can run the following command:
gruxi.exe --remove-service3. Verify installation
Open http://localhost to see the default Gruxi page.
4. Configure installation
Open https://localhost:8000 and log in with the user admin and the password printed to the server log on first run, which can be found in logs\gruxi.log. Save the password, as it will not be printed again in the logs.
Next step
You now have a working Gruxi instance running on your system or server.
Next, learn how to configure Gruxi.