Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
CLI Tests / test-cli (push) Failing after 3s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 3s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 2s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Deploy to Testnet / deploy-testnet (push) Successful in 1m12s
Documentation Validation / validate-docs (push) Failing after 8s
Documentation Validation / validate-policies-strict (push) Successful in 3s
Integration Tests / test-service-integration (push) Successful in 2m6s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 2s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 4s
P2P Network Verification / p2p-verification (push) Successful in 4s
Package Tests / Python package - aitbc-agent-sdk (push) Successful in 32s
Package Tests / Python package - aitbc-core (push) Successful in 14s
Package Tests / Python package - aitbc-crypto (push) Successful in 12s
Package Tests / Python package - aitbc-sdk (push) Successful in 9s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 8s
Package Tests / JavaScript package - aitbc-token (push) Successful in 17s
Python Tests / test-python (push) Successful in 15s
Security Scanning / security-scan (push) Successful in 27s
Node Failover Simulation / failover-test (push) Successful in 7s
Multi-Node Stress Testing / stress-test (push) Successful in 6s
Cross-Node Transaction Testing / transaction-test (push) Successful in 4s
- Add SQLCipher encryption for ait-mainnet database with configurable flag - Add db_encryption_enabled and db_encryption_key_path config settings - Implement encryption key loading and PRAGMA key setup via connection events - Add shutdown_db function for proper database cleanup - Export middleware classes in aitbc/__init__.py - Fix import path in sync.py for settings - Remove duplicate agent documentation from docs
4.0 KiB
4.0 KiB
AITBC Setup Guide
Quick Setup (New Host)
Run this single command on any new host to install AITBC:
sudo bash <(curl -sSL https://raw.githubusercontent.com/oib/aitbc/main/setup.sh)
Or clone and run manually:
sudo git clone https://gitea.bubuit.net/oib/aitbc.git /opt/aitbc
cd /opt/aitbc
sudo chmod +x setup.sh
sudo ./setup.sh
What the Setup Script Does
-
Prerequisites Check
- Verifies Python 3.13.5+, pip3, git, systemd
- Checks for root privileges
-
Repository Setup
- Clones AITBC repository to
/opt/aitbc - Handles multiple repository URLs for reliability
- Clones AITBC repository to
-
Virtual Environments
- Creates Python venvs for each service
- Installs dependencies from
requirements.txtwhen available - Falls back to core dependencies if requirements missing
-
Runtime Directories
- Creates standard Linux directories:
/var/lib/aitbc/keystore/- Blockchain keys/var/lib/aitbc/data/- Database files/var/lib/aitbc/logs/- Application logs/etc/aitbc/- Configuration files
- Sets proper permissions and ownership
- Creates standard Linux directories:
-
Systemd Services
- Installs service files to
/etc/systemd/system/ - Enables auto-start on boot
- Provides fallback manual startup
- Installs service files to
-
Service Management
- Creates
/opt/aitbc/start-services.shfor manual control - Creates
/opt/aitbc/health-check.shfor monitoring - Sets up logging to
/var/log/aitbc-*.log
- Creates
Runtime Directories
AITBC uses standard Linux system directories for runtime data:
/var/lib/aitbc/
├── keystore/ # Blockchain private keys (700 permissions)
├── data/ # Database files (.db, .sqlite)
└── logs/ # Application logs
/etc/aitbc/ # Configuration files
/var/log/aitbc/ # System logging (symlink)
Security Notes
- Keystore: Restricted to root/aitbc user only
- Data: Writable by services, readable by admin
- Logs: Rotated automatically by logrotate
Service Endpoints
| Service | Port | Health Endpoint |
|---|---|---|
| Wallet API | 8003 | http://localhost:8003/health |
| Exchange API | 8001 | http://localhost:8001/api/health |
| Coordinator API | 8000 | http://localhost:8000/health |
| Blockchain RPC | 8545 | http://localhost:8545 |
Management Commands
# Check service health
/opt/aitbc/health-check.sh
# Restart all services
/opt/aitbc/start-services.sh
# View logs (new standard locations)
tail -f /var/lib/aitbc/logs/aitbc-wallet.log
tail -f /var/lib/aitbc/logs/aitbc-coordinator.log
tail -f /var/lib/aitbc/logs/aitbc-exchange.log
# Check keystore
ls -la /var/lib/aitbc/keystore/
# Systemd control
systemctl status aitbc-wallet
systemctl restart aitbc-coordinator-api
systemctl stop aitbc-exchange-api
Troubleshooting
Services Not Starting
- Check logs:
tail -f /var/lib/aitbc/logs/aitbc-*.log - Verify ports:
netstat -tlnp | grep ':800' - Check processes:
ps aux | grep python - Verify runtime directories:
ls -la /var/lib/aitbc/
Missing Dependencies
The setup script handles missing requirements.txt files by installing core dependencies:
- fastapi
- uvicorn
- pydantic
- httpx
- python-dotenv
Port Conflicts
Services use these default ports. If conflicts exist:
- Kill conflicting processes:
kill <pid> - Modify service files to use different ports
- Restart services
Development Mode
For development with manual control:
cd /opt/aitbc/apps/wallet
source .venv/bin/activate
python simple_daemon.py
cd /opt/aitbc/apps/exchange
source .venv/bin/activate
python simple_exchange_api.py
cd /opt/aitbc/apps/coordinator-api/src
source ../.venv/bin/activate
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000
Production Considerations
For production deployment:
- Configure proper environment variables
- Set up reverse proxy (nginx)
- Configure SSL certificates
- Set up log rotation
- Configure monitoring and alerts
- Use proper database setup (PostgreSQL/Redis)