Link Search Menu Expand Document
Start for Free

Install Stardog CLI from Zip

This page describes how to install Stardog CLI tools from Zip.


This ZIP contains Stardog CLI tools only. To run a Stardog server, use Docker.


1. Download the Latest CLI Release

Download the latest CLI release.

Or if you have curl installed, execute the following command to download the latest distribution of Stardog CLI into your current working directory.

curl https://downloads.stardog.com/stardog/stardog-cli-latest.zip --output stardog-cli-latest.zip

2. Extract Stardog CLI from the downloaded zip.

Using the command line on unix-like systems:

unzip stardog-cli-latest.zip

Stardog CLI binaries are located in the ./stardog-cli-<version>/bin directory.

3. Setting Your Path

Place the bin/ folder of the Stardog CLI installation on your PATH so stardog and stardog-admin commands can be used regardless of current working directory.

  • We recommend adding to your .bashrc, .zshrc or whichever file you use to configure your shell, though you can also set it temporarily.

    export PATH="$PATH:/path/to/stardog-cli-<version>/bin"
    
  • Be sure to provide the actual path to your Stardog installation.

    setx PATH=%PATH%;%USERPROFILE%\path\to\stardog-cli-<version>\bin
    

    You may need to open a new command prompt session in order for the environment variable to take effect.

4. Using the CLI

You can now use the stardog and stardog-admin commands to connect to remote Stardog servers:

# Query a remote server
$ stardog query -s http://my-stardog-server:5820 mydb "SELECT * WHERE { ?s ?p ?o } LIMIT 10"

# Check server status
$ stardog-admin --server http://my-stardog-server:5820 server status

Running a Stardog Server

To run a Stardog server, use Docker:

$ docker pull stardog/stardog
$ docker run -d -p 5820:5820 -v stardog-home:/var/opt/stardog stardog/stardog

For detailed Docker installation instructions, see the Docker Installation Guide.

By default, the Stardog server will become available at http://localhost:5820.

If you visit http://localhost:5820 while your Stardog server is running, you will be prompted for credentials and redirected to cloud.stardog.com.

What’s Next?

Get Started with Stardog Cloud, our complete Enterprise Knowledge Graph Platform, and connect to your running Stardog server.

Check out our additional Getting Started Resources for some introductory blog posts, tutorials, video trainings and more.