---
title: Installation
description: How to install XBP on your system
---
# Installation
## Prerequisites
- **Rust**: 1.72 or higher
- **Cargo**: Latest version
- **Operating System**: Linux, macOS, or Windows
## Standard Installation
### From Crates.io
```bash
cargo install xbp
```
This installs XBP without Kafka support.
### With Kafka Support
```bash
cargo install xbp --features kafka
```
This enables Kafka log shipping and consumption.
## Building from Source
### Clone Repository
```bash
git clone https://github.com/your-org/xbp.git
cd xbp
```
### Build Release Binary
```bash
# Standard build
cargo build --release
# With Kafka support
cargo build --release --features kafka
```
The binary will be at `./target/release/xbp`.
### Install Locally
```bash
cargo install --path . --features kafka
```
## Verify Installation
```bash
xbp --version
```
Expected output:
```
xbp 0.8.0
```
## System Requirements
### Minimum
- **CPU**: 1 core
- **RAM**: 512 MB
- **Disk**: 50 MB
### Recommended
- **CPU**: 2+ cores
- **RAM**: 1 GB+
- **Disk**: 100 MB+
## Optional Dependencies
### For Full Functionality
```bash
# Nginx (for reverse proxy management)
sudo apt install nginx # Ubuntu/Debian
brew install nginx # macOS
# PM2 (for process management)
npm install -g pm2
# Systemctl (usually pre-installed on Linux)
# For service management
```
### For Kafka Support
```bash
# Kafka broker (if using log shipping)
# See Kafka documentation for installation
```
## Platform-Specific Notes
### Linux
```bash
# Ubuntu/Debian
sudo apt update
sudo apt install build-essential pkg-config libssl-dev
# Install XBP
cargo install xbp --features kafka
```
### macOS
```bash
# Install Rust if needed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install XBP
cargo install xbp --features kafka
```
### Windows
```powershell
# Install Rust from rustup.rs
# Then install XBP
cargo install xbp --features kafka
```
## Post-Installation
### Add to PATH
If `cargo install` doesn't add to PATH automatically:
```bash
# Linux/macOS
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Or for zsh
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```
### Verify All Features
```bash
# Check diagnostics
xbp diag
# Check monitoring
xbp monitor --help
# Check logging
xbp tail --help
```
## Updating
### From Crates.io
```bash
cargo install xbp --force
```
### From Source
```bash
cd xbp
git pull
cargo install --path . --force --features kafka
```
## Uninstallation
```bash
cargo uninstall xbp
```
## Troubleshooting
### Build Errors
**Issue**: OpenSSL not found
```bash
# Ubuntu/Debian
sudo apt install libssl-dev pkg-config
# macOS
brew install openssl
export OPENSSL_DIR=$(brew --prefix openssl)
```
**Issue**: Kafka build fails
```bash
# Install cmake
sudo apt install cmake # Linux
brew install cmake # macOS
```
### Runtime Errors
**Issue**: Command not found
```bash
# Verify installation
which xbp
# Add to PATH if needed
export PATH="$HOME/.cargo/bin:$PATH"
```
**Issue**: Permission denied
```bash
# Linux/macOS - some commands need sudo
sudo xbp nginx setup --domain example.com --port 3000
```
## Next Steps
- [Configure your project](/docs/configuration)
- [Run your first diagnostic](/docs/commands/diag)
- [Set up monitoring](/docs/guides/monitoring)