Skip to main content

Installation and Deployment

iForge supports multiple deployment methods, Docker is recommended for production deployment.

Deployment Method Comparison​

MethodApplicable ScenariosComplexity
Docker ComposeProduction environment, self-hosted⭐ Recommended
Manual BuildDevelopment, customization needs⭐⭐
Run from SourceLocal development⭐⭐⭐

Prerequisites​

Docker Deployment​

  • Docker 20+
  • Docker Compose V2 (docker compose command)

Manual Deployment​

  • Go 1.26+
  • Node.js 18+
  • Git

Port Planning​

Docker Environment (Production Deployment)​

Host PortContainer PortServicePurpose
30003001webFrontend pages
80808081serverHTTP API + Git HTTP protocol
222022serverSSH Git protocol

Local Development Environment​

PortServicePurpose
3001webFrontend pages
8081serverHTTP API + Git HTTP protocol
2022serverSSH 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:

  1. Disable Shell Executor: Keep IFORGE_CI_ALLOW_SHELL_EXECUTOR=false (default value)
  2. Docker Resource Limits: CI/CD Job containers are limited to 2GB memory, 2 CPU cores, 256 processes by default
  3. Network Isolation: Job containers have network access disabled by default (--network=none)
  4. 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