Skip to content

Installation

Choose the installation method that best fits your needs.

Installation Options

The CLI provides the fastest way to get started:

npm install -g @switchboard/cli

# Verify installation
switchboard --version

Option B: SDK for Programmatic Use

For integrating Switchboard into your applications:

npm install @switchboard/sdk

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
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

  1. Install Node.js from nodejs.org
  2. Use PowerShell or Windows Terminal
  3. Install Switchboard:
npm install -g @switchboard/cli

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

# Update SDK in your project
npm update @switchboard/sdk

Uninstalling

Remove CLI

npm uninstall -g @switchboard/cli

Remove SDK

npm uninstall @switchboard/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

# Check Node version
node --version

# Use nvm to manage versions
nvm install 20
nvm use 20

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