Self-Hosted Setup
Deploy your own FiberWise instance with full control and customization. Perfect for teams, organizations, and production deployments.
Setup Time: 15-30 minutes
Complete deployment with web interface and API access
Full Control
Your own instance with complete administrative access and customization
Team Ready
Multi-user support with authentication and API key management
Installation Steps
Clone the FiberWise Core Repository
Get the FiberWise Core Web repository and navigate to the project:
# Clone the repository
git clone https://github.com/fiberwise-ai/fiberwise-core-web.git
cd fiberwise-core-web
# Verify you have the correct structure
ls -la
Environment Configuration
Set up your environment variables for production deployment:
# Copy the example environment file
cp .env.example .env
# Edit the configuration
nano .env # or use your preferred editor
Production Configuration Variables:
# Database Configuration
DATABASE_URL=sqlite:///./fiberwise.db
# Security (IMPORTANT: Change these!)
SECRET_KEY=your-secure-secret-key-here
ALLOWED_HOSTS=localhost,127.0.0.1,yourdomain.com
# Storage Configuration
STORAGE_PROVIDER=local
LOCAL_STORAGE_PATH=./storage
# Server Settings
HOST=0.0.0.0
PORT=8000
ENVIRONMENT=production
DEBUG=false
LOG_LEVEL=info
# Optional: LLM Provider Configuration
# OPENAI_API_KEY=your-openai-key
# ANTHROPIC_API_KEY=your-anthropic-key
# GOOGLE_API_KEY=your-google-key
Install Backend Dependencies
Install Python dependencies for the platform:
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Create storage directory
mkdir -p storage
Backend Dependencies Installed:
✅ FastAPI - Web framework and API
✅ SQLAlchemy - Database ORM
✅ Pydantic - Data validation
✅ Uvicorn - ASGI server
✅ Authentication & Security libraries
✅ File handling & storage utilities
Install Frontend Dependencies
Set up the web interface and build the frontend assets:
# Install root dependencies
npm install
# Navigate to frontend directory and install
cd fiberwise_core
npm install
# Build the frontend for production
npm run build
# Return to root directory
cd ..
Frontend Build Complete:
✅ Vue.js - Frontend framework
✅ Vite - Build tool and dev server
✅ Component libraries
✅ Static assets compiled
✅ Production build ready
Initialize Database
Set up the database schema and create initial data:
# Initialize database with migrations
python -m alembic upgrade head
# Create initial admin user and organization
python scripts/init_admin.py
Database Setup Complete:
- ✅ User management and authentication
- ✅ API key system
- ✅ Agent and function storage
- ✅ Pipeline execution tracking
- ✅ File upload and storage metadata
- ✅ Activity and audit logging
Start the Platform
Launch your FiberWise instance:
🌐 Production Server
# Start the production server
python main.py
# Or use uvicorn directly
uvicorn main:app --host 0.0.0.0 --port 8000
This starts the complete platform with web interface and API.
🚀 Production Deployment
For production use with process management:
# Using systemd (recommended)
sudo systemctl start fiberwise
sudo systemctl enable fiberwise
# Or run in background with nohup
nohup python main.py > server.log 2>&1 &
# Check if server is running
curl http://localhost:8000/health
Access the Web Interface
Open your browser and complete the initial setup:
1. Open the Web Interface
Navigate to http://localhost:8000 (or your server's IP/domain)
2. Create Your Account
Follow the setup wizard to create your administrator account and organization
3. Generate API Key
After logging in, go to Settings → API Keys and generate your first API key
- Click on your profile menu in the top right
- Select "Settings" from the dropdown
- Navigate to "API Keys" in the settings sidebar
- Click "Generate New API Key"
- Give it a name (e.g., "CLI Access" or "Development")
- Copy and save the generated key securely
🎉 Setup Complete!
- ✅ Web interface accessible at http://localhost:8000
- ✅ Administrator account created
- ✅ API key generated for programmatic access
- ✅ Ready for agent and application deployment
Configure CLI Connection
Connect your local FiberWise CLI to your self-hosted instance:
# Install FiberWise CLI (if not already installed)
pip install fiberwise
# Add your self-hosted instance configuration
fiber account add-config \
--name "my-server" \
--api-key "YOUR_API_KEY_FROM_STEP_7" \
--base-url "http://localhost:8000" \
--set-default
# Test the connection
fiber account list-configs
Verify CLI Connection:
# Test API connectivity
curl -H "Authorization: Bearer YOUR_API_KEY" \
http://localhost:8000/api/v1/health
# List agents (should be empty initially)
fiber functions list --to-instance my-server
# You're ready to deploy agents and applications!
Self-Hosted Features
SQLite Database
Simple, reliable, and portable database - no setup required
Local File Storage
Store files directly on your server filesystem
Function Execution
Execute Python functions with input/output handling
REST API
Complete REST API for integration and automation
Web Interface
Built-in web UI for managing functions and data
API Authentication
Secure API access with API key authentication
Backup & Portability
Configuration Options
🔧 Basic Settings
# Environment variables in .env file
DEBUG=false
LOG_LEVEL=info
SECRET_KEY=your-secret-key-here
ALLOWED_HOSTS=localhost,127.0.0.1,yourdomain.com
🤖 LLM Providers
# Add LLM API keys to .env file
OPENAI_API_KEY=your-openai-key
ANTHROPIC_API_KEY=your-anthropic-key
GOOGLE_API_KEY=your-google-key
💾 Storage Path
# Configure storage location
LOCAL_STORAGE_PATH=./storage
# Or use absolute path
LOCAL_STORAGE_PATH=/home/user/fiberwise-storage
Security & Best Practices
File Permissions
Secure your database and storage files with proper permissions
API Key Security
Keep your API keys secure and rotate them regularly
Environment Variables
Use .env files for configuration, never commit secrets to git
Network Access
Use firewall rules to restrict access to your server
Regular Backups
Backup your database and storage files regularly
Monitoring & Maintenance
📊 Basic Monitoring
Monitor your instance with simple tools:
- Check server logs for errors
- Monitor disk space usage
- Test API endpoints regularly
- Backup database periodically
📝 Log Files
Check application logs:
# View recent logs
tail -f server.log
# Check for errors
grep ERROR server.log
🔔 Health Checks
Use the built-in health check:
# Simple health check
curl http://localhost:8080/health
# Check database connectivity
curl http://localhost:8080/api/functions
Platform Architecture
Fiberwise employs a modular, service-oriented architecture designed for scalability, security, and developer productivity.
🎯 Application Layer
Frontend⚡ Processing Layer
Runtime🔧 Service Layer
APIs🗄️ Infrastructure Layer
FoundationKey Architectural Principles
� Simple Usage Examples
Basic Function
# Simple function example
def main(input_data):
name = input_data.get('name', 'World')
return {
'message': f'Hello, {name}!',
'timestamp': str(datetime.now()),
'status': 'success'
}
Data Processing
# Process and store data
def main(input_data):
items = input_data.get('items', [])
processed = []
for item in items:
processed.append({
'id': item['id'],
'processed_at': str(datetime.now()),
'result': item['value'] * 2
})
return {
'processed_count': len(processed),
'results': processed
}
🔧 Basic Configuration
# Simple .env configuration
DATABASE_URL=sqlite:///./fiberwise.db
LOCAL_STORAGE_PATH=./storage
SECRET_KEY=your-secret-key-here
DEBUG=false
LOG_LEVEL=info
# Create and execute functions via API
curl -X POST http://localhost:8080/api/functions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "hello", "code": "def main(input_data): return {\"hello\": \"world\"}"}'
curl -X POST http://localhost:8080/api/functions/1/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input_data": {"name": "Fiberwise"}}'
📈 Best Practices for Self-Hosting
File Management
- Keep database and storage in the same directory
- Create regular backups of fiberwise.db
- Monitor disk space usage
- Use symbolic links for large storage directories
Security
- Set proper file permissions (600 for .env, 644 for db)
- Use strong SECRET_KEY values
- Keep API keys secure and rotate regularly
- Use firewall rules to restrict network access
Maintenance
- Monitor server logs for errors
- Test API endpoints regularly
- Keep application updated
- Plan for data migration and scaling
Troubleshooting
🗃️ Database Issues
python manage.py init_db
to recreate