Getting Started
Based on the source at commit
73215a39(nearv1.15.1). Commands assume a Linux or macOS host with Go and a shell. The join-token flow below runs server and agent on one machine.
Prerequisites
- Go (the module targets
go 1.26.4,go.mod:3), or a prebuilt release tarball. - A POSIX host where the server and agent can share a directory for the agent socket.
Install
Build the two binaries from source:
make buildThis produces bin/spire-server and bin/spire-agent (Makefile:256, build: tidy $(addprefix bin/,$(binaries))). Alternatively, download a release tarball from the releases page.
A first working setup
Start the server with the sample config.
conf/server/server.confsetstrust_domain,data_dir, and theDataStore,KeyManager, andNodeAttestorplugins;conf/server/server_full.confdocuments every option.bashbin/spire-server run -config conf/server/server.confGenerate a join token for the agent. The token is the agent's bootstrap credential for node attestation.
bashbin/spire-server token generate -spiffeID spiffe://example.org/myagentStart the agent with that token, using the sample agent config
conf/agent/agent.conf.bashbin/spire-agent run -config conf/agent/agent.conf -joinToken <token>Create a registration entry. This says: a workload running as uid 1000 under the agent's SPIFFE ID is issued
spiffe://example.org/myworkload.bashbin/spire-server entry create \ -parentID spiffe://example.org/myagent \ -spiffeID spiffe://example.org/myworkload \ -selector unix:uid:1000
Verify it works
Fetch an SVID through the Workload API as the matching uid. Point -socketPath at the agent's configured socket (the sample config uses a path under a temp directory).
bin/spire-agent api fetch x509 -socketPath <agent-socket-path>A healthy setup prints the SPIFFE ID, the SVID certificate, and its bundle. No credential is presented on the call; the agent reads the caller's uid from the socket peer credential.
Where to go next
For production concerns such as choosing a real node attestor (Kubernetes, AWS, GCP, TPM), persistent datastores, HA, and federation between trust domains, see the SPIFFE Kubernetes quickstart and the doc/ directory in the repository. This page covers only the local join-token path.