Start and query a server

The gRPC examples require the downloadable API definitions and SHRIKEDB_API_DIR setup. This walkthrough uses a supplied shrikedb executable, Bash, curl, and grpcurl. Install the executable on your command path first. For container setup, follow Install and persist data and return to the health and query steps below.

1. Create a configuration

Choose an empty directory for this example. The commands below keep the server on loopback and store data under your home directory.

mkdir -p "$HOME/.shrikedb/data"
cat > "$HOME/.shrikedb/guide.yaml" <<EOF
server:
  name: guide-local
network:
  grpc_bind: "127.0.0.1:50251"
  http_bind: "127.0.0.1:8182"
  admin_bind: "127.0.0.1:9190"
storage:
  data_dir: "$HOME/.shrikedb/data"
EOF

The shell expands $HOME while creating this file, so data_dir contains an absolute path.

2. Start the server

Run this in a terminal that you can leave open:

shrikedb --config "$HOME/.shrikedb/guide.yaml" --no-startup-ui

Startup logs identify the listening addresses and storage directory. If a port is already occupied, stop the conflicting process or change that port in the configuration and subsequent commands.

3. Check readiness

In a second terminal, run:

curl --fail-with-body http://127.0.0.1:9190/health/live
curl --fail-with-body http://127.0.0.1:9190/health/ready

Wait for readiness to return a successful HTTP status before sending queries. If it keeps failing, inspect the startup log and confirm that the server can write to the configured data directory.

4. Run a query with a known answer

This query needs no loaded data:

grpcurl -plaintext \
  -import-path "$SHRIKEDB_API_DIR" -proto shrikedb.v2.proto \
  -d '{"query":"RETURN 1 AS ready"}' \
  127.0.0.1:50251 shrikedb.v2.ShrikeDbService/ExecuteCypher

The response contains one row with a ready value of 1, encoded using the API’s typed result fields. This verifies query execution as well as connectivity.

5. Load your first dataset

Continue to your first multimodal dataset to write a product payload, insert its vector, connect it to a brand, and query across all three.

Stop the foreground server with Ctrl+C when finished. Restart with the same configuration to reopen its data. See Start, stop, and restart for repeatable restart checks and Connect To ShrikeDB for authenticated connections.