Skip to content

Deploying SCM Manager

Introduction

SCM Manager is a self-hosted source code management platform that provides a unified interface for managing Git, Mercurial, and Subversion repositories. It offers a modern web interface with powerful features for code collaboration, access control, and repository management without the complexity of larger platforms.

Built with Java and React, SCM Manager delivers enterprise-grade features in a lightweight package. The plugin architecture allows extending functionality while keeping the core installation minimal. Whether you need simple repository hosting or advanced features like pull requests and code review, SCM Manager scales to meet your needs.

Key highlights of SCM Manager:

  • Multi-SCM Support: Native support for Git, Mercurial, and Subversion in a single platform
  • Plugin Architecture: Extend functionality with 50+ available plugins
  • Pull Request Workflow: Built-in pull request and code review capabilities
  • Fine-Grained Permissions: Repository, branch, and path-level access control
  • LDAP/Active Directory: Enterprise authentication integration
  • Repository Mirroring: Mirror external repositories automatically
  • Webhook Support: Trigger external services on repository events
  • Branch Protection: Prevent direct pushes and require reviews
  • Code Search: Full-text search across repository contents
  • API Access: REST API for automation and integration
  • Audit Logging: Track all repository and user actions
  • Anonymous Access: Optionally allow public repository access

This guide walks through deploying SCM Manager on Klutch.sh using Docker, configuring persistent storage for your repositories, and setting up the platform for team collaboration.

Why Deploy SCM Manager on Klutch.sh

Deploying SCM Manager on Klutch.sh provides several advantages for development teams:

Simplified Deployment: Klutch.sh automatically builds your SCM Manager configuration without complex server setup. Push to GitHub for automatic deployment.

Persistent Storage: Attach persistent volumes for your repositories and configuration. Your code and settings survive container restarts.

HTTPS by Default: Klutch.sh provides automatic SSL certificates, ensuring secure access to your repositories and encrypted git operations.

GitHub Integration: Store your deployment configuration in version control. Changes trigger automatic redeployments.

Scalable Resources: Allocate CPU and memory based on repository count and team size.

Environment Variable Management: Securely configure authentication and settings through Klutch.sh’s environment system.

Custom Domains: Assign a professional domain for your source code management platform.

Prerequisites

Before deploying SCM Manager on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your SCM Manager configuration
  • Basic familiarity with Docker and containerization concepts
  • (Optional) LDAP/Active Directory credentials for enterprise authentication
  • (Optional) A custom domain for your SCM Manager instance

Deploying SCM Manager on Klutch.sh

    Create Your Repository

    Create a new GitHub repository for your SCM Manager deployment. Add a Dockerfile:

    FROM scmmanager/scm-manager:2
    ENV SCM_WEBAPP_CONTEXTPATH=/
    EXPOSE 8080
    HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
    CMD wget --no-verbose --tries=1 --spider http://localhost:8080/api/v2 || exit 1

    Push to GitHub

    Commit and push your Dockerfile to your GitHub repository.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “scm-manager” or “source-control”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select your repository.

    Configure HTTP Traffic

    In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 8080

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    JAVA_OPTS-Xmx512m -Xms256m (adjust based on needs)
    SCM_WEBAPP_CONTEXTPATH/

    Attach Persistent Volumes

    Add the following volumes for data persistence:

    Mount PathRecommended SizePurpose
    /var/lib/scm50+ GBRepositories and application data

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will build the container, attach volumes, and provision HTTPS.

    Access SCM Manager

    Once deployment completes, access your SCM Manager instance at the provided URL. The default credentials are:

    • Username: scmadmin
    • Password: scmadmin

    Change the default password immediately after first login.

Initial Configuration

First Login Setup

After logging in with default credentials:

  1. Navigate to Administration > Settings
  2. Update the base URL to match your Klutch.sh domain
  3. Change the admin password
  4. Configure email settings for notifications

Installing Plugins

Extend SCM Manager with plugins:

  1. Go to Administration > Plugins
  2. Browse the available plugins catalog
  3. Install desired plugins (pull requests, code review, etc.)
  4. Restart may be required for some plugins
  • Review Plugin: Pull request and code review workflow
  • SSH Plugin: SSH access to repositories
  • LDAP Plugin: Enterprise directory integration
  • Webhook Plugin: Trigger external services
  • Editor Plugin: In-browser file editing
  • CI Status Plugin: Display CI/CD status

Repository Management

Creating Repositories

Create new repositories through the web interface:

  1. Click Repositories in the navigation
  2. Click Create Repository
  3. Select repository type (Git, Mercurial, or Subversion)
  4. Enter name and optional description
  5. Configure initial settings

Importing Existing Repositories

Import repositories from external sources:

  1. Use the repository import feature
  2. Provide the source URL
  3. Configure authentication if required
  4. SCM Manager clones and hosts the repository

Repository Settings

Configure each repository individually:

  • Permissions: Set user and group access levels
  • Branch Protection: Protect important branches
  • Webhooks: Configure event notifications
  • Mirroring: Set up automatic synchronization

User and Access Management

Creating Users

Add team members to your SCM Manager:

  1. Navigate to Administration > Users
  2. Click Create User
  3. Fill in user details and credentials
  4. Assign to groups as needed

Group Management

Organize users into groups:

  1. Go to Administration > Groups
  2. Create groups for teams or roles
  3. Add users to groups
  4. Apply permissions at group level

Permission Model

SCM Manager supports granular permissions:

LevelScope
GlobalApply to all repositories
RepositoryApply to specific repository
BranchProtect specific branches
PathControl access to paths within repository

LDAP Integration

Connect to enterprise directories:

  1. Install the LDAP plugin
  2. Configure connection settings
  3. Map LDAP groups to SCM Manager groups
  4. Enable LDAP authentication

Pull Request Workflow

Enabling Pull Requests

With the Review plugin installed:

  1. Create a branch for your changes
  2. Push commits to the branch
  3. Open a pull request from the web interface
  4. Request reviews from team members

Code Review Process

  • Comments: Add inline comments on changed files
  • Approvals: Approve or request changes
  • Merge Requirements: Configure required approvals before merge
  • CI Integration: Display build status on pull requests

Best Practices

Security Configuration

  • Change Default Credentials: Update admin password immediately
  • Enable HTTPS: Always use Klutch.sh’s automatic SSL
  • Regular Updates: Keep SCM Manager and plugins updated
  • Access Reviews: Periodically review user permissions

Performance Optimization

  • Memory Allocation: Adjust JAVA_OPTS based on repository count
  • Volume Storage: Ensure adequate storage for repository growth
  • Plugin Selection: Install only needed plugins

Backup Strategy

  • Regular Backups: Back up the /var/lib/scm volume
  • Export Configuration: Export settings before major changes
  • Test Restores: Periodically verify backup integrity

Troubleshooting

Repository Access Issues

  • Verify user permissions on the repository
  • Check group memberships
  • Review authentication settings
  • Examine access logs

Performance Problems

  • Increase Java heap size in JAVA_OPTS
  • Check volume I/O performance
  • Review plugin resource usage
  • Monitor memory consumption

Plugin Conflicts

  • Disable recently installed plugins
  • Check plugin compatibility
  • Review plugin logs for errors

Additional Resources

Conclusion

Deploying SCM Manager on Klutch.sh provides a powerful, self-hosted source code management platform for your team. With support for multiple SCM systems, flexible permissions, and extensible plugin architecture, SCM Manager offers enterprise features in a lightweight package. Combined with Klutch.sh’s automatic HTTPS and persistent storage, you get a reliable, secure platform for managing your source code.