Linux Installation
This page describes how to install Stardog CLI tools on different flavors of Linux.
Page Contents
Linux packages install Stardog CLI tools only. To run a Stardog server, use Docker. The CLI tools can be used to connect to and manage remote Stardog servers.
The package-signing key changed on 2026-11-16. Packages and repository metadata at packages.stardog.com are now signed with a new key, fingerprint D43A C7B5 598C 57EA 6E98 482B 5E36 27E2 C44C 0E1C. If you added the Stardog repository before that date, apt-get update or yum install fails with a signature error until you update the signing key. Docker images and the ZIP distribution are not affected.
Debian Based Systems
To install Stardog CLI using apt-get run the following commands:
$ sudo apt update
$ sudo apt install -y curl gnupg
$ curl -fsSL http://packages.stardog.com/stardog.gpg.pub -o stardog.gpg.pub
$ gpg --show-keys --with-fingerprint stardog.gpg.pub
$ sudo gpg --dearmor --yes -o /usr/share/keyrings/stardog.gpg stardog.gpg.pub
$ echo "deb [signed-by=/usr/share/keyrings/stardog.gpg] http://packages.stardog.com/deb/ stable main" | sudo tee /etc/apt/sources.list.d/stardog.list
$ sudo apt-get update
$ sudo apt-get install -y stardog-cli=<version>
Before you continue past gpg --show-keys, check that it prints the fingerprint D43A C7B5 598C 57EA 6E98 482B 5E36 27E2 C44C 0E1C. The key is then stored in its own keyring and trusted only for the Stardog repository, rather than for every repository on the system.
Stardog CLI binaries should now be in the /opt/stardog/bin directory.
RPM Based systems
To install Stardog CLI using yum run the following commands:
$ curl -fsSL http://packages.stardog.com/stardog.gpg.pub -o stardog.gpg.pub
$ gpg --show-keys --with-fingerprint stardog.gpg.pub
$ sudo rpm --import stardog.gpg.pub
$ curl http://packages.stardog.com/rpms/stardog.repo | sudo tee /etc/yum.repos.d/stardog.repo
$ sudo yum install -y stardog-cli-<version>
Check that gpg --show-keys prints the fingerprint D43A C7B5 598C 57EA 6E98 482B 5E36 27E2 C44C 0E1C before you import the key.
Stardog CLI binaries should now be in the /opt/stardog/bin directory.
Amazon EC2
Certain Amazon EC2 instances do not let you redirect output into /etc/yum.repos.d as specified above. On such instances you can install Stardog CLI like so:
$ sudo yum-config-manager --add-repo http://packages.stardog.com/rpms/stardog.repo
$ sudo yum-config-manager --enable stardog
$ sudo yum install -y stardog-cli-<version>
Stardog CLI binaries should now be in the /opt/stardog/bin directory.
Update the signing key
On 2026-11-16 Stardog replaced the key that signs the CLI packages. The old key (ID 835EC48634B532F2, fingerprint 4BCD 93EB 5C5A EEF2 A837 9D59 835E C486 34B5 32F2) is no longer used and should no longer be trusted. If you added the Stardog repository before that date, remove the old key and import the new one.
Debian based systems
$ sudo apt-key del 34B532F2
$ curl -fsSL http://packages.stardog.com/stardog.gpg.pub -o stardog.gpg.pub
$ gpg --show-keys --with-fingerprint stardog.gpg.pub
$ sudo gpg --dearmor --yes -o /usr/share/keyrings/stardog.gpg stardog.gpg.pub
$ sudo sed -i '\|packages.stardog.com/deb|d' /etc/apt/sources.list
$ echo "deb [signed-by=/usr/share/keyrings/stardog.gpg] http://packages.stardog.com/deb/ stable main" | sudo tee /etc/apt/sources.list.d/stardog.list
$ sudo apt-get update
Skip apt-key del if your system has no apt-key command (Debian 13 and later). The sed command removes the old repository line that earlier versions of this page added to /etc/apt/sources.list; the repository is now configured in /etc/apt/sources.list.d/stardog.list.
RPM based systems
$ sudo rpm -e gpg-pubkey-34b532f2
$ curl -fsSL http://packages.stardog.com/stardog.gpg.pub -o stardog.gpg.pub
$ gpg --show-keys --with-fingerprint stardog.gpg.pub
$ sudo rpm --import stardog.gpg.pub
$ sudo yum clean metadata
$ sudo yum install -y stardog-cli
rpm -e reports that the package is not installed if the old key was never imported (for example on RHEL 9, which rejected it). That’s fine; continue with the next command.
In both cases, check that gpg --show-keys prints the new fingerprint D43A C7B5 598C 57EA 6E98 482B 5E36 27E2 C44C 0E1C.
Using the CLI
After installation, add the Stardog bin directory to your PATH:
$ export PATH=$PATH:/opt/stardog/bin
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
What’s Next?
Get Started with Stardog Cloud, our complete Enterprise Knowledge Graph Platform.
Check out our additional Getting Started Resources for some introductory blog posts, tutorials, video trainings and more.