Installation and Deployment
iForge supports multiple deployment methods, Docker is recommended for production deployment.
Deployment Method Comparison
| Method | Applicable Scenarios | Complexity |
|---|---|---|
| Docker Compose | Production environment, self-hosted | ⭐ Recommended |
| Manual Build | Development, customization needs | ⭐⭐ |
| Run from Source | Local development | ⭐⭐⭐ |
Prerequisites
Docker Deployment
- Docker 20+
- Docker Compose V2 (
docker composecommand)
Manual Deployment
- Go 1.26+
- Node.js 18+
- Git
Port Planning
Docker Environment (Production Deployment)
| Host Port | Container Port | Service | Purpose |
|---|---|---|---|
| 3000 | 3001 | web | Frontend pages |
| 8080 | 8081 | server | HTTP API + Git HTTP protocol |
| 22 | 2022 | server | SSH Git protocol |
Local Development Environment
| Port | Service | Purpose |
|---|---|---|
| 3001 | web | Frontend pages |
| 8081 | server | HTTP API + Git HTTP protocol |
| 2022 | server | SSH Git protocol |
Port Conflicts
If ports are occupied, modify in .env:
IFORGE_HTTP_PORT=8090
IFORGE_SSH_PORT=2222
Data Directory
All runtime data is stored in IFORGE_HOME (default ./data):
data/
├── iforge.db # SQLite database
├── logs/ # Runtime logs
└── repositories/ # Git repository bare storage
Simply package the entire data/ directory for backup.
Security Recommendations
Pay attention to the following security configurations during production deployment:
- Disable Shell Executor: Keep
IFORGE_CI_ALLOW_SHELL_EXECUTOR=false(default value) - Docker Resource Limits: CI/CD Job containers are limited to 2GB memory, 2 CPU cores, 256 processes by default
- Network Isolation: Job containers have network access disabled by default (
--network=none) - Working Directory Cleanup: Working directories are automatically cleaned up after Job completion
See CI/CD Pipeline - Security Mechanism for details.
Choose deployment method: Docker Deployment | Manual Deployment