Documentation Index
Fetch the complete documentation index at: https://o1.network/docs/llms.txt
Use this file to discover all available pages before exploring further.
Getting Started with O1
This guide will help you set up and start using O1 Universal Remote to manage your infrastructure.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js 16.x or later
- Docker and Docker Compose
- Ansible 2.9 or later
- Git
- SSH access to target nodes
Installation
1. Clone the Repository
git clone https://github.com/zer0ne-io/homelab.git
cd homelab
2. Environment Setup
Copy the example environment file and configure your settings:
cp .env.example .env
# Edit .env with your preferred settings
3. Install Dependencies
# Install Node.js dependencies
npm install
# Initialize the database
npm run db:migrate
4. Start the Services
# Start all services with Docker Compose
docker-compose up -d
# Or run individual services
npm run start:backend # Backend API server
npm run start:frontend # Web dashboard (optional)
5. Verify Installation
Check that all services are running:
# Check service status
docker-compose ps
# Test the API
curl http://localhost:3000/health
You should see a response like:
{
"status": "healthy",
"timestamp": "2024-01-15T10:30:00Z",
"version": "0.1.0"
}
First Steps
1. Access the Dashboard
Open your browser to http://localhost:3000 to access the O1 dashboard.
2. Add Your First Node
# Using the API
curl -X POST http://localhost:3000/api/nodes/add \
-H "Content-Type: multipart/form-data" \
-F "name=my-first-node" \
-F "host=192.168.1.100" \
-F "user=ubuntu"
3. Test Node Connection
# Verify the node connection
curl -X POST http://localhost:3000/api/nodes/verify \
-H "Content-Type: application/json" \
-d '{"name": "my-first-node"}'
4. Deploy Your First Application
# Deploy a sample application
curl -X POST http://localhost:3000/api/applications/deploy \
-H "Content-Type: application/json" \
-d '{
"applicationName": "Anvil",
"nodeName": "my-first-node",
"version": "1.0.0",
"deploymentMode": "binary"
}'
Configuration
SSH Key Management
O1 uses SSH keys for secure node access. Add your SSH keys:
# Add an SSH key
curl -X POST http://localhost:3000/api/nodes/ssh-keys \
-H "Content-Type: multipart/form-data" \
-F "name=my-key" \
-F "privateKeyContent=$(cat ~/.ssh/id_rsa)"
Cloud Provider Setup
Configure cloud provider credentials for automated provisioning:
# Add AWS credentials
curl -X POST http://localhost:3000/api/nodes/credentials/save \
-H "Content-Type: application/json" \
-d '{
"provider": "AWS",
"name": "production-aws",
"region": "us-east-1",
"accessKeyId": "your-access-key",
"secretAccessKey": "your-secret-key"
}'
Quick Examples
Launch a Cloud Instance
curl -X POST http://localhost:3000/api/nodes/launch-instance \
-H "Content-Type: application/json" \
-d '{
"credentialName": "production-aws",
"provider": "AWS",
"region": "us-east-1",
"instanceType": "t2.micro",
"name": "web-server-01"
}'
Monitor Application Health
# Get application logs
curl -X POST http://localhost:3000/api/monitoring/logs \
-H "Content-Type: application/json" \
-d '{
"host": "my-first-node",
"application": "Anvil",
"timespan": "1h"
}'
# Monitor real-time metrics
curl -X POST http://localhost:3000/api/monitoring/metrics/stream \
-H "Content-Type: application/json" \
-d '{
"host": "my-first-node",
"application": "Anvil",
"metrics": ["cpu", "memory", "disk"],
"interval": 1
}'
Troubleshooting
Common Issues
Service Not Starting
- Check Docker is running:
docker ps
- Verify ports are available:
netstat -tulpn | grep :3000
- Check logs:
docker-compose logs backend
SSH Connection Issues
- Verify SSH keys are added correctly
- Check firewall rules on target nodes
- Test SSH manually:
ssh user@host
API Connection Issues
- Verify CORS settings in
.env
- Check API endpoint:
curl http://localhost:3000/health
- Review backend logs for errors
Getting Help
Next Steps
Congratulations! You’ve successfully set up O1 and are ready to start managing your infrastructure with powerful, AI-assisted operations.