Repository navigation
Home
wildfirebill edited this page Jul 20, 2026
·
2 revisions
Bidirectional GitHub ↔ GitLab repository sync service
hub2lab is a self-hosted HTTP service that listens for webhooks from GitHub and GitLab and mirrors repository events between them. It handles pushes, branch and tag creation/deletion, and repository lifecycle events with built-in loop prevention and safety guarantees.
- Bidirectional sync — pushes, branches, tags, and repo events flow both ways between platforms
- Loop prevention — commits from hub2lab include a marker string; webhooks containing that marker are silently dropped
-
Auto-sync mode — omit
reposinmapping.jsonto sync every repo in an org/group - Explicit mapping — per-repo control when names differ between sides
-
Dockerized —
docker pull ghcr.io/wildfirebill-docker/hub2labwith healthcheck - Unraid ready — community app template included
- Self-hosted — deploy on any VPS, NAS, or homelab with Node.js ≥ 20
- Webhook security — HMAC-SHA256 (GitHub) and shared secret (GitLab) verification
- File logging — configurable Winston logger with rotation, 10 MB per file, 5 retained
- Repository lifecycle — auto-create repos on GitLab when created on GitHub
# Pull the Docker image
docker pull ghcr.io/wildfirebill-docker/hub2lab:latest
# Create config files
mkdir -p /opt/hub2lab
cp mapping.example.json /opt/hub2lab/mapping.json
# Edit mapping.json and set up .env
# Run
docker run -d \
--name hub2lab \
-p 3000:3000 \
-v /opt/hub2lab/.env:/app/.env \
-v /opt/hub2lab/mapping.json:/app/mapping.json \
ghcr.io/wildfirebill-docker/hub2lab:latestGitHub push → hub2lab → GitLab API (create branch, push files, etc.)
GitLab push → hub2lab → GitHub API (create branch, push files, etc.)
hub2lab runs as an Express HTTP server with three endpoints:
-
POST /webhook/github— receives GitHub webhook events -
POST /webhook/gitlab— receives GitLab webhook events -
GET /health— health check
See the Architecture page for details.
- GitHub: https://github.com/wildfirebill-docker/hub2lab
- Container:
ghcr.io/wildfirebill-docker/hub2lab:latest - License: MIT