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

  1. Go to GitHub Apps settings
  2. Click "New GitHub App"
  3. Fill in the app details:
    • App name: open-rcode-yourname
    • Homepage URL: http://localhost:8080
    • Webhook URL: http://localhost:8080/api/webhooks/github
  4. Set permissions:
    • Repository permissions: Contents (Read & Write), Pull requests (Write), Metadata (Read)
  5. Generate and download the private key
  6. Note down the App ID

GitHub OAuth App Creation

  1. Go to OAuth Apps settings
  2. Click "New OAuth App"
  3. Fill in:
    • Application name: open-rcode-oauth-yourname
    • Homepage URL: http://localhost:8080
    • Authorization callback URL: http://localhost:8080/api/auth/github
  4. 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

VariableDescriptionWhere to Find
GITHUB_APP_IDGitHub App IDGitHub App settings page
GITHUB_APP_NAMEGitHub App nameYour chosen app name
GITHUB_APP_PRIVATE_KEYGitHub App private key contentDownloaded .pem file content
GITHUB_APP_PRIVATE_KEY_PATHGitHub App private key file pathAlternative to GITHUB_APP_PRIVATE_KEY
GITHUB_CLIENT_IDOAuth App Client IDGitHub OAuth App settings
GITHUB_CLIENT_SECRETOAuth App Client SecretGitHub OAuth App settings
ENCRYPTION_KEY32-character encryption keyGenerate with openssl rand -hex 32

Optional Variables

VariableDefaultDescription
MONGO_INITDB_ROOT_PASSWORDpasswordMongoDB root password
CONTAINER_MODEdockerContainer orchestration mode
ADMIN_GOOGLE_API_KEY-Google API key for PR title suggestions
BASE_ROLEbasicDefault 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)