- Ubuntu 24.04 LTS (minimal or server)
- Root access
- Internet connection
cd /root
unzip codehero-2.83.5.zip
cd codeheronano install.confDefault credentials (change after installation):
| Setting | Default |
|---|---|
| ADMIN_USER | admin |
| ADMIN_PASSWORD | admin123 |
| DB_PASSWORD | claudepass123 |
| MYSQL_ROOT_PASSWORD | rootpass123 |
chmod +x setup.sh
./setup.shThis installs:
- MySQL database
- Nginx web server with PHP-FPM
- Python/Flask web application
- Claude Code CLI
- Claude daemon service
- System user
claude
su - claude
claudeFollow the prompts to login with:
- API Key - For developers with Anthropic API access
- Max Subscription - For Claude Max subscribers
Run these scripts based on what you need:
| Script | Purpose | What it installs |
|---|---|---|
setup_devtools.sh |
Development tools | Node.js 22, Java (GraalVM 24), multimedia (ffmpeg, ImageMagick, tesseract) |
setup_android.sh |
Android development | Docker, Redroid emulator, ws-scrcpy, ADB, Flutter, Gradle |
setup_windows.sh |
Windows/.NET development | .NET 8 SDK, PowerShell 7, Wine, Mono, NuGet |
setup_lsp.sh |
Code Editor LSP | Language servers for Python, JS/TS, PHP, Java, C#, Kotlin, HTML/CSS |
# Development tools (Node.js, Java, multimedia)
sudo /opt/codehero/scripts/setup_devtools.sh
# Android development (emulator + mobile frameworks)
sudo /opt/codehero/scripts/setup_android.sh
# Windows/.NET development
sudo /opt/codehero/scripts/setup_windows.sh
# Code Editor LSP (optional - for autocomplete, hover docs, etc.)
sudo /opt/codehero/scripts/setup_lsp.shAndroid Emulator: After running setup_android.sh, access at https://YOUR_IP:8443
After installation:
| Service | URL |
|---|---|
| Admin Panel | https://YOUR_IP:9453 |
| Web Projects | https://YOUR_IP:9867 |
sudo /opt/codehero/scripts/change-passwords.shsystemctl status codehero-web codehero-daemon mysql nginx php8.3-fpmsudo systemctl restart codehero-web codehero-daemon- Open Dashboard in browser
- Click the green "Update Available" badge when shown
- Click "Install Update"
- Watch real-time console output
- Page reloads automatically on success
If upgrade fails: Click "Ask AI to fix the problem" - AI will analyze the error and suggest fixes with one-click execution.
# Download and extract new version
cd /root
wget https://github.com/fotsakir/codehero/releases/latest/download/codehero-2.83.5.zip
unzip codehero-2.83.5.zip
cd codehero
# Preview what will change (recommended)
sudo ./upgrade.sh --dry-run
# Run the upgrade
sudo ./upgrade.sh
# Or skip confirmation prompts
sudo ./upgrade.sh -y- Backup: Creates automatic backup in
/var/backups/codehero/ - Stop services: Safely stops daemon service
- Copy files: Updates web, scripts, docs, and upgrades
- Version upgrades: Runs pending scripts from
upgrades/folder- Only runs scripts for versions between current and new
- Tracks applied upgrades (won't run twice)
- Database migrations: Applies pending SQL migrations
- Restart services: Restarts all services and reloads nginx
- Verify: Checks services are running
- Changelog: Shows what changed in the new version
| Option | Description |
|---|---|
--dry-run |
Preview changes without applying |
-y, --yes |
Auto-confirm all prompts |
-h, --help |
Show help message |
The upgrade system uses individual scripts for each version:
upgrades/
├── 2.42.0.sh # Multimedia tools
├── 2.60.4.sh # Permission fixes
├── 2.61.0.sh # Claude CLI install
├── 2.61.2.sh # Systemd service fixes
├── 2.63.0.sh # OpenLiteSpeed → Nginx migration
├── 2.65.0.sh # phpMyAdmin integration
└── _always.sh # Runs every upgrade (permissions)
When upgrading from 2.60.0 to 2.72.7, the system automatically runs: 2.60.4.sh → 2.61.0.sh → 2.61.2.sh → 2.63.0.sh → 2.65.0.sh
For version X.Y.Z, create upgrades/X.Y.Z.sh:
#!/bin/bash
log_info() { echo -e "\033[0;36m[X.Y.Z]\033[0m $1"; }
log_info "Installing new package..."
apt-get install -y some-package || truecd /root/codehero
chmod +x uninstall.sh
./uninstall.shjournalctl -u codehero-web -n 50
journalctl -u codehero-daemon -n 50mysql -u claude_user -p claude_knowledgesu - claude
which claude
# If not found, reinstall:
curl -fsSL https://claude.ai/install.sh | shVersion: 2.81.0