Docker (Recommended)
The fastest way to get started is using the official Docker image.Pull and Run
GET /health- Health checkGET /query?target=ID- Query node statusPOST /report- Submit witness reportPOST /witnesses- Register witness
Custom Port
Docker Compose
Create adocker-compose.yml:
Health Check
The Docker image includes a built-in health check:Go Install
Install the Styx CLI and server using Go’s package manager.Prerequisites
- Go 1.21 or later
$GOPATH/binin yourPATH
Install Server
Install CLI
Usage
source/cmd/styx/main.go:54-65 for full CLI usage.
Build from Source
For development or customization, build Styx from source.Prerequisites
Build the Server
Build the CLI
Run from Source (Development)
Run Tests
Build Docker Image Locally
Build your own Docker image from source.Build the image
From the repository root:The Dockerfile uses a multi-stage build (see
source/Dockerfile:1-37):Kubernetes Deployment
Deploy Styx to Kubernetes:styx-deployment.yaml
Binary Releases
Pre-built binaries are not currently available. Use one of these methods:- Docker (recommended for production)
go install(easiest for CLI)- Build from source (for development)
System Requirements
Server
- CPU: 1 core minimum, 2+ cores recommended
- Memory: 128 MB minimum, 512 MB recommended
- Disk: 50 MB for binary
- Network: Inbound port 8080 (or custom)
Dependencies
- Go: 1.21 or later (for building from source)
- Docker: 20.10+ (for container deployment)
- OS: Linux, macOS, or Windows
Verification
After installation, verify Styx is working:Troubleshooting
Port Already in Use
If port 8080 is taken:Module Download Fails
Ifgo mod download fails:
Docker Build Fails
Ensure you’re in the correct directory:Configuration
Styx currently has minimal configuration. The server:- Listens on port 8080 by default (configurable via CLI argument)
- Creates Oracle with node ID 1 (see
source/cmd/styx-server/main.go:17) - Uses default confidence thresholds (see
source/oracle/oracle.go:40-44)
Next Steps
Quick Start
Get hands-on with Styx in 5 minutes
API Reference
Explore all endpoints and request formats
Deployment Guide
Production deployment best practices
Contributing
Help improve Styx