Installation¶
Choose the installation method that best fits your needs.
Installation Options¶
Option A: CLI Only (Recommended for Beginners)¶
The CLI provides the fastest way to get started:
Option B: SDK for Programmatic Use¶
For integrating Switchboard into your applications:
Option C: Full Development Setup¶
For contributing to Switchboard or running the full platform:
# Clone the repository
git clone https://github.com/switchboard/switchboard
cd switchboard
# Install dependencies
npm install
# Build all packages
npm run build
System Requirements¶
Minimum Requirements¶
| Component | Requirement |
|---|---|
| Node.js | 18+ |
| npm | 8+ |
| RAM | 4GB |
| Disk Space | 10GB |
| OS | Linux, macOS, Windows |
Recommended for Development¶
| Component | Recommendation |
|---|---|
| Node.js | 20 LTS |
| RAM | 8GB+ |
| Disk Space | 20GB+ |
| Docker | For local blockchain testing |
Verifying Installation¶
CLI Verification¶
# Check version
switchboard --version
# View available commands
switchboard --help
# Check system configuration
switchboard doctor
SDK Verification¶
import { Switchboard } from '@switchboard/sdk';
// Initialize the SDK
const switchboard = new Switchboard({
solana: {
rpcUrl: process.env.SOLANA_RPC_URL,
},
});
// Verify connection
const status = await switchboard.getStatus();
console.log('Switchboard Status:', status);
Docker Installation¶
For running Switchboard services locally:
# Clone repository
git clone https://github.com/switchboard/switchboard
cd switchboard
# Copy environment configuration
cp .env.example .env
# Start services with MongoDB (default)
docker-compose up -d
# Or start with PostgreSQL
DATABASE_TYPE=postgresql docker-compose --profile postgres up -d
Verify services are running:
# Check Customer API
curl http://localhost:3000/health
# Check Core Engine
curl http://localhost:3001/health
Platform-Specific Notes¶
Linux¶
No special requirements. Ensure Node.js is installed via nvm or your package manager.
macOS¶
# Install Node.js via Homebrew
brew install node
# Install Switchboard CLI
npm install -g @switchboard/cli
Windows¶
- Install Node.js from nodejs.org
- Use PowerShell or Windows Terminal
- Install Switchboard:
Windows Subsystem for Linux
For the best experience on Windows, consider using WSL2.
Updating Switchboard¶
CLI Updates¶
# Update to latest version
npm update -g @switchboard/cli
# Check for updates
switchboard update:check
SDK Updates¶
Uninstalling¶
Remove CLI¶
Remove SDK¶
Troubleshooting Installation¶
Permission Errors¶
If you encounter EACCES errors:
# Fix npm permissions (Linux/macOS)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Node Version Issues¶
Network Issues¶
# Use a different npm registry if needed
npm config set registry https://registry.npmjs.org/
# Clear npm cache
npm cache clean --force
Next Steps¶
- Continue to First Deployment
- Learn about the Architecture
- Explore Configuration Options