Backlinks
Requirements and configuration for alternative SPARQL backends
LinkedDataHub is designed to work with any SPARQL 1.1-compatible triplestore that supports the required protocols. While Apache Jena Fuseki is the default backend, you can use alternative triplestores by adding them as services in docker-compose.override.yml (without modifying the default docker-compose.yml).
Requirements
For a triplestore to work with LinkedDataHub, it must support the following:
| Feature | Required | Description |
|---|---|---|
| SPARQL 1.1 Query | Yes | The triplestore must implement the SPARQL 1.1 Query specification. |
| SPARQL 1.1 Update | Yes | The triplestore must implement the SPARQL 1.1 Update specification for data modifications. |
| Graph Store Protocol (GSP) | Yes | The triplestore must support the SPARQL 1.1 Graph Store HTTP Protocol for graph-scoped operations. |
| Dataset-level CRUD protocol | No | Support for RDF dataset-scoped CRUD operations, supported by stores such as Fuseki. If not available, LinkedDataHub will fall back to graph-scoped GSP operations (slower but functional). |
| Authentication | No | Either HTTP Basic authentication or Bearer token authentication (or both). See authentication below for configuration details. |
Service configuration
Services are configured in config/system.trig using three key properties. See the dataspace reference for the full list of service properties and the default Fuseki service declaration — the configuration you start with. The sections below walk through configuring an alternative backend (QLever) instead.
| Property | Endpoint | Required | Example |
|---|---|---|---|
sd:endpoint |
SPARQL Protocol, for Query and Update | Yes | <http://qlever-host:7001/> |
a:graphStore |
Graph Store Protocol, for graph-scoped CRUD | Yes | <http://qlever-host:7001/> — QLever serves both protocols on the same URL |
a:quadStore |
Quad store, for dataset-level CRUD | No — omitting it falls back to graph-scoped GSP | <http://fuseki:3030/end-user/>, which is Fuseki-specific |
When a:quadStore is not provided, LinkedDataHub automatically uses graph-scoped Graph Store Protocol
operations instead. This mode:
- Works with triplestores that do not support dataset-level TriG/N-Quads uploads
- Loads data graph-by-graph rather than as a complete dataset
- Takes longer during bootstrap (more HTTP requests) but is functionally equivalent
- Is required for QLever, Tentris, and other GSP-only triplestores
Authentication
LinkedDataHub supports two authentication methods for SPARQL services, both configured
in secrets/credentials.trig. The file is mounted as a Docker secret and is not committed to version control (the
/secrets folder is gitignored). See the configuration reference for the credentials secret entry.
Configure username and password using the a:authUser and a:authPwd properties:
@prefix a: <https://w3id.org/atomgraph/core#> .
<urn:linkeddatahub:services/end-user>
{
<urn:linkeddatahub:services/end-user> a:authUser "username" ;
a:authPwd "password" .
}
<urn:linkeddatahub:services/admin>
{
<urn:linkeddatahub:services/admin> a:authUser "username" ;
a:authPwd "password" .
}For triplestores that require Bearer token authentication (like QLever), configure
the token using the a:authToken property:
@prefix a: <https://w3id.org/atomgraph/core#> .
<urn:linkeddatahub:services/end-user>
{
<urn:linkeddatahub:services/end-user> a:authToken "your-bearer-token" .
}
<urn:linkeddatahub:services/admin>
{
<urn:linkeddatahub:services/admin> a:authToken "your-bearer-token" .
}QLever configuration example
QLever is a high-performance triplestore optimized for text search. To configure LinkedDataHub to use QLever:
-
Update config/system.trig to point to your QLever instance:
@prefix lds: <https://w3id.org/atomgraph/linkeddatahub/dataspaces#> . @prefix a: <https://w3id.org/atomgraph/core#> . @prefix sd: <http://www.w3.org/ns/sparql-service-description#> . @prefix dct: <http://purl.org/dc/terms/> . # Admin app: type and service binding <urn:linkeddatahub:apps/admin> { <urn:linkeddatahub:apps/admin> a lds:AdminDataspace ; lds:service <urn:linkeddatahub:services/admin> . } # Admin service: QLever <urn:linkeddatahub:services/admin> { <urn:linkeddatahub:services/admin> a sd:Service ; dct:title "LinkedDataHub admin service (QLever)" ; sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ; sd:endpoint <http://qlever-host:7001/> ; # a:quadStore omitted: QLever uses GSP fallback mode a:graphStore <http://qlever-host:7001/> . } # End-user app: type and service binding <urn:linkeddatahub:apps/end-user> { <urn:linkeddatahub:apps/end-user> a lds:EndUserDataspace ; lds:service <urn:linkeddatahub:services/end-user> . } # End-user service: QLever <urn:linkeddatahub:services/end-user> { <urn:linkeddatahub:services/end-user> a sd:Service ; dct:title "LinkedDataHub service (QLever)" ; sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ; sd:endpoint <http://qlever-host:7001/> ; # a:quadStore omitted: QLever uses GSP fallback mode a:graphStore <http://qlever-host:7001/> . }The
a:quadStoreproperty is omitted because QLever does not support dataset-level TriG/N-Quads uploads. LinkedDataHub will automatically fall back to using graph-scoped Graph Store Protocol operations (see service configuration). -
Configure Bearer token authentication (QLever requires this for write operations):
Create secrets/credentials.trig with your QLever access token:
@prefix a: <https://w3id.org/atomgraph/core#> . <urn:linkeddatahub:services/end-user> { <urn:linkeddatahub:services/end-user> a:authToken "your-qlever-bearer-token" . } <urn:linkeddatahub:services/admin> { <urn:linkeddatahub:services/admin> a:authToken "your-qlever-bearer-token" . }See bearer token authentication for details.
-
Uncomment the credentials secret in docker-compose.yml:
services: linkeddatahub: secrets: # ... other secrets ... # - credentials # uncomment this line -
Start LinkedDataHub:
make up -- --build
The -- makes make forward the flags that follow it to docker-compose.
During bootstrap, LinkedDataHub will load the default datasets using graph-scoped GSP operations. This takes longer than quad store mode but is functionally equivalent.
Troubleshooting
- Bootstrap fails with HTTP 400 "application/trig not supported"
- Your triplestore does not support dataset-level uploads. Remove the
a:quadStoreproperty from your service configuration to use GSP fallback mode. - Bootstrap fails with HTTP 401 or 403
- Check your authentication configuration. Both Bearer token and HTTP Basic auth are configured in secrets/credentials.trig. See authentication for details.
- Queries work but data import fails
- Ensure your triplestore supports SPARQL 1.1 Update and Graph Store Protocol, not just Query. Check the triplestore requirements.
- Connection refused errors
- Check that the endpoint URLs are reachable from the LinkedDataHub Docker container. If running QLever in Kubernetes, use port-forwarding or set up proper networking.
For background discussion of the QLever integration, see GitHub issue #272.
Browse available triplestore products at kgdev.net/products/.
To create dataspaces on your chosen backend, follow the Manage dataspaces guide.