Windows (Deprecated)
This page describes how to install Stardog on Windows.
Page Contents
Overview
As of Stardog 10.1.0, running Stardog directly on Windows is deprecated, and support for doing so will be removed in a future version. If you choose to install Stardog directly on Windows, please note that Stardog will not support issues that may arise.
Windows users should install Stardog using Docker.
Before continuing with the installation guide, please review the System Requirements for running Stardog.
Install as a Windows Service
-
Install Java if you have not already.
Stardog supports Java version 11.
-
Download the distribution.
-
Unzip the file and place it in your desired installation location.
We will place our installation in a new folder called
stardogs
for our user. In this tutorial, our user is namedstardog
, so the directory isD:\Users\stardog\stardogs
. -
Set up
STARDOG_HOME
.The most important piece of configuration to complete before you start the Stardog server is setting the
STARDOG_HOME
environment variable. This is the directory where all the Stardog databases and other files will be stored. IfSTARDOG_HOME
is not defined, Stardog will use the Javauser.dir
property value.You can set
STARDOG_HOME
to any directory, but this directory should be kept separate from the Stardog distribution.-
Create your
STARDOG_HOME
directory in the Command Prompt.The directory can be created with the following command:
-
Set the
STARDOG_HOME
environment variable to the directory we just created:We will do this by setting it in Control Panel. Launch “Control Panel” > “System and Security” > “System” > “Advanced system settings” > Switch to “Advanced” tab > “Environment variables…” > Choose “New” > Enter
STARDOG_HOME
for the variable and provide the path to the newly created directory as the value.You can also set the environment variable via Command Prompt, however this will only persist as long as the command prompt session. This can be done with the following command:
-
-
Copy your Stardog license into the STARDOG_HOME directory:
If you do not have a license, you can obtain one on the Stardog website:
Once you have a license, copy or move your license key to your
STARDOG_HOME
directory created in the previous step.By default, Stardog will recognize your license key if its name follows the pattern
stardog*.bin
(i.e.,stardog
, followed by anything, and ending with.bin
) and it resides in your home directory. You can specify a different location for the license file or a name that uses a different pattern by setting the environment variableSTARDOG_LICENSE_PATH
. -
Optionally, place the
bin
folder of the unzipped Stardog distribution on yourPATH
so thestardog.bat
andstardog-admin.bat
scripts can be used regardless of the current working directory.Launch “Control Panel” > “System” > “Advanced system settings” > Switch to “Advanced” tab > “Environment variables” > Select the entry containing
Path
, Choose “Edit”:Choose “New” and enter the full path to the
bin
directory within the unzipped Stardog distribution as a new entry on thePath
.or set an environment variable through the command line.
Like setting the environment variable for
STARDOG_HOME
, you can set a temporary environment variable from the command line, but it will only last as long as your command prompt session. The command is:We now can use the
stardog
andstardog-admin
CLI commands regardless of our current working directory. -
Set up
JAVA_HOME
.Setting the
JAVA_HOME
environment variable is necessary to run Stardog as a Windows service (covered in the next step).-
You must set it to the directory where you installed Java. For example, if you installed Microsoft OpenJDK 11 in
C:\Program Files\Microsoft\jdk-11.0.18.10-hotspot
, you would setJAVA_HOME=C:\Program Files\Microsoft\jdk-11.0.18.10-hotspot\
. -
You can follow the same process you took to make
STARDOG_HOME
an environment variable (see step 4b).
-
-
Execute the provided batch script
install-service.bat
in thebin
directory to install Stardog as a Windows service.You should see output in your prompt indicating the service was successfully installed:
At this point you can control Stardog via the Windows Services App.
Troubleshooting
If the service does not successfully install or startup, you should inspect the stderr logs in the logs
directory within the Stardog distribution.
Insufficient Permissions
The service may fail to install if the current Windows user does not have sufficient permissions to install a service. You may see the following in your command prompt after executing the install-service.bat
script:
In the stderr log within the logs
directory (as shown in the above output) you should see the error:
In order to work around this, you may need to contact your system administrator with “Administrator” privileges, or if you’re able to, start up a new Command Prompt session as an Administrator. See below for how to access this option from “Control Panel”:
After opening this command prompt as an Administrator, proceed to re-install the service in step 5.
Unable to find a valid license
The service may fail to start up if you do not have a valid license. In the stderr logs in <stardog-distribution>\logs
directory you would see a message like so:
If you have a valid license, copy or move the license to your STARDOG_HOME
directory.
If you do not have a license, you can obtain one by speaking with a Stardog sales representative. If you do not want to manage your own Stardog license, you can simply sign up for a free account with Stardog Cloud.
Once you’ve obtained a valid license, try starting up the Stardog service as shown in step 8.
What’s Next?
Access your server through the CLI or the Stardog Applications (Stardog Studio, Stardog Explorer, and Stardog Designer).
Check out our additional Getting Started Resources for some introductory blog posts, tutorials, video trainings, and more.