Getting Started
Installation Docker
Install and configure open-rcode platform.
Docker Compose Installation
Download Docker Compose Configuration
Download the official Docker Compose configuration from the repository:
Terminal
wget https://raw.githubusercontent.com/aidalinfo/open-rcode/refs/heads/dev/setup/docker-compose.yaml
Configure Environment Variables
Create a .env
file in the same directory with the required configuration:
Terminal
# Generate secure passwords and encryption key
openssl rand -hex 32
openssl rand -hex 16
Create a .env
file with the generated values:
.env
# Database Configuration
MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=your_generated_16_char_password
# GitHub Integration (REQUIRED) - Choose one of the two private key options
GITHUB_APP_ID=your_github_app_id
GITHUB_APP_NAME=your_github_app_name
# Option 1: Private key as environment variable (recommended for Docker)
GITHUB_APP_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQ...\n-----END RSA PRIVATE KEY-----
# Option 2: Private key file path (alternative)
# GITHUB_APP_PRIVATE_KEY_PATH=/path/to/your/private-key.pem
GITHUB_CLIENT_ID=your_github_oauth_client_id
GITHUB_CLIENT_SECRET=your_github_oauth_client_secret
GITHUB_REDIRECT_URI=http://localhost:8080/api/auth/github
# Encryption (REQUIRED)
ENCRYPTION_KEY=your_generated_32_char_encryption_key
# Optional: Container Mode (default: docker)
CONTAINER_MODE=docker
# Optional: Admin Google API Key for PR title suggestions
ADMIN_GOOGLE_API_KEY=your_google_api_key
Configure GitHub Integration
You need to create a GitHub App and OAuth App for open-rcode integration:
GitHub App Creation
- Go to GitHub Apps settings
- Click "New GitHub App"
- Fill in the app details:
- App name:
open-rcode-yourname
- Homepage URL:
http://localhost:8080
- Webhook URL:
http://localhost:8080/api/webhooks/github
- App name:
- Set permissions:
- Repository permissions: Contents (Read & Write), Pull requests (Write), Metadata (Read)
- Generate and download the private key
- Note down the App ID
GitHub OAuth App Creation
- Go to OAuth Apps settings
- Click "New OAuth App"
- Fill in:
- Application name:
open-rcode-oauth-yourname
- Homepage URL:
http://localhost:8080
- Authorization callback URL:
http://localhost:8080/api/auth/github
- Application name:
- Note down Client ID and Client Secret
Start the Platform
Start all services with Docker Compose:
Terminal
docker compose up -d
Verify Installation
Check that all services are running:
Terminal
# Check container status
docker compose ps
# Check logs
docker compose logs open-rcode
docker compose logs mongodb
Access the Platform
Open your browser and navigate to http://localhost:8080
You should see the open-rcode login page. Click "Login with GitHub" to authenticate.
Environment Variables Reference
Required Variables
Variable | Description | Where to Find |
---|---|---|
GITHUB_APP_ID | GitHub App ID | GitHub App settings page |
GITHUB_APP_NAME | GitHub App name | Your chosen app name |
GITHUB_APP_PRIVATE_KEY | GitHub App private key content | Downloaded .pem file content |
GITHUB_APP_PRIVATE_KEY_PATH | GitHub App private key file path | Alternative to GITHUB_APP_PRIVATE_KEY |
GITHUB_CLIENT_ID | OAuth App Client ID | GitHub OAuth App settings |
GITHUB_CLIENT_SECRET | OAuth App Client Secret | GitHub OAuth App settings |
ENCRYPTION_KEY | 32-character encryption key | Generate with openssl rand -hex 32 |
Optional Variables
Variable | Default | Description |
---|---|---|
MONGO_INITDB_ROOT_PASSWORD | password | MongoDB root password |
CONTAINER_MODE | docker | Container orchestration mode |
ADMIN_GOOGLE_API_KEY | - | Google API key for PR title suggestions |
BASE_ROLE | basic | Default user role |
Troubleshooting
Container Issues
Terminal
# View detailed logs
docker compose logs -f open-rcode
# Restart services
docker compose restart
# Clean restart
docker compose down && docker compose up -d
Database Connection Issues
Terminal
# Check MongoDB status
docker compose exec mongodb mongosh --eval "db.adminCommand('ping')"
GitHub Integration Issues
- Verify GitHub App is installed on your repositories
- Check that webhook URL is accessible
- Ensure private key format is correct (include
-----BEGIN RSA PRIVATE KEY-----
headers)