Creating a Repository

Create a repository

There are two ways for creating and managing repositories: either through the Workbench interface, or by using the RDF4J console.

Using the Workbench

To manage your repositories, go to Setup ‣ Repositories. This opens a list of available repositories and their locations.

  1. Click the Create new repository button or create it from a file by using the configuration template that can be found under /configs/templates in the GraphDB distribution.

  2. Select GraphDB repository.

  3. If you have attached remote locations to your GraphDB instance, there will be an additional field for specifying the Location in which you want to create the repository. The default is Local. See more about creating a repository in a remote location a little further below.

  4. Enter the Repository ID (e.g., my_repo) and leave all other optional configuration settings with their default values.


    For repositories with over several tens of millions of statements, see the configuration parameters.

  5. Click the Create button. Your newly created repository appears in the repository list.

Create a repository in a remote location

You can easily create a repository in any remote location attached to your GraphDB instance.

  1. First, connect to the location. For this example, let’s connect http://localhost:7202 (substitute localhost and the 7200 port number as appropriate).

  2. Then, just like with local repositories, go to Setup ‣ Repositories ‣ Create new repository.

  3. In the Location field, the two locations are now visible. Select http://localhost:7202.

  4. Fill in the Repository ID and create the repo.

  5. Both repositories are now created.

  6. If you go to the http://localhost:7202 location, you will see remote_repo created there.

Using the RDF4J console


Use the create command to add new repositories to the location to which the console is connected. This command expects the name of the template that describes the repository’s configuration.

  1. Run the RDF4J console application, which resides in the /bin folder:

    • Windows: console.cmd

    • Unix/Linux: ./console

  2. Connect to the GraphDB server instance using the command:

    connect http://localhost:7200.

  3. Create a repository using the command:

    create graphdb.

    We can also create a repository with enabled SHACL validation through the RDF4J console. To do that, execute:

    create graphdb-shacl.

  4. Fill in the values of the parameters in the console.

  5. Exit the RDF4J console:


Manage repositories

Connect a repository

Click the connect icon in the repository list.


Alternatively, use the dropdown menu in the top right corner. This allows you to easily switch between repositories while running queries or importing and exporting data in other views. Hovering over the respective repository will also display some basic information about it.


Note that when you are connected to a remote repository, its label in the top right corner indicates that:


Make it the default repository

Use the pin to select it as the default repository.


Edit a repository

To copy the repository URL, edit it, download the repository configuration as a Turtle file, restart it, or delete it, use the respective icons next to its name.



Once a repository is deleted, all data contained in it is irrevocably lost.

You can restart a repository without having to restart the entire GraphDB instance. There are two ways to do that:

  • Click the restart icon as shown above. A warning will prompt you to confirm the action.

  • Click the edit icon, which will open the repository configuration. At its bottom, tick the restart box, save, and confirm.



Restarting the repository will shut it down immediately, and all running queries and updates will be cancelled.