Migrations - Moving to Self-Hosted Infrastructure

Status: Active
Last Updated: 2026-01-30
Category: Migration Guides
Prerequisites: All relevant KB sections
Tags: migration, docker-hub, github, gitlab, forgejo, harbor, self-hosted, cloud-exit

Summary

Complete migration guides for moving from commercial services to self-hosted alternatives. Practical step-by-step instructions for Docker Hub โ†’ Harbor, GitHub โ†’ Forgejo, AWS โ†’ MinIO, and more.

๐ŸŽฏ Learning Philosophy

Take Back Control:

Commercial Lock-in โ†’ Self-Hosted Freedom โ†’ Data Sovereignty
(Monthly fees)      (One-time setup)      (Your rules)

This directory provides battle-tested migration paths from commercial services to self-hosted alternatives. Each guide includes planning, execution, rollback strategies, and gotchas to avoid.

๐Ÿ“š Learning Path

Prerequisites: Existing commercial service usage
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 1: Planning & Assessment        โ”‚
โ”‚  โ”œโ”€ Why migrate?                       โ”‚
โ”‚  โ”œโ”€ Risk assessment                    โ”‚
โ”‚  โ”œโ”€ Resource requirements              โ”‚
โ”‚  โ”œโ”€ Downtime planning                  โ”‚
โ”‚  โ””โ”€ Rollback strategies                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 2: Container Registries         โ”‚
โ”‚  โ”œโ”€ Docker Hub โ†’ Harbor migration      โ”‚
โ”‚  โ”œโ”€ GitHub Packages โ†’ Harbor           โ”‚
โ”‚  โ”œโ”€ Image inventory and tagging        โ”‚
โ”‚  โ”œโ”€ CI/CD pipeline updates             โ”‚
โ”‚  โ””โ”€ Registry cleanup                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 3: Version Control & CI/CD      โ”‚
โ”‚  โ”œโ”€ GitHub โ†’ Forgejo migration         โ”‚
โ”‚  โ”œโ”€ GitLab โ†’ Forgejo                   โ”‚
โ”‚  โ”œโ”€ Repository structure                โ”‚
โ”‚  โ”œโ”€ GitHub Actions โ†’ Woodpecker CI     โ”‚
โ”‚  โ”œโ”€ Webhook migrations                 โ”‚
โ”‚  โ””โ”€ User/team migration                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 4: Cloud Storage & Services     โ”‚
โ”‚  โ”œโ”€ Dropbox โ†’ Nextcloud                โ”‚
โ”‚  โ”œโ”€ Google Drive โ†’ Nextcloud           โ”‚
โ”‚  โ”œโ”€ AWS S3 โ†’ MinIO                     โ”‚
โ”‚  โ”œโ”€ Data transfer strategies           โ”‚
โ”‚  โ””โ”€ Sync cutover                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 5: Complete Infrastructure      โ”‚
โ”‚  โ”œโ”€ Cloud VM โ†’ Bare metal/Proxmox      โ”‚
โ”‚  โ”œโ”€ AWS/GCP โ†’ Self-hosted k0s          โ”‚
โ”‚  โ”œโ”€ Multi-service migrations           โ”‚
โ”‚  โ”œโ”€ DNS and routing updates            โ”‚
โ”‚  โ””โ”€ Post-migration validation          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“– Articles in This Directory

๐ŸŸข Phase 1: Planning & Assessment (Start Here)

Before You Migrate:

  1. migration-planning - Strategic planning

    • Why self-host?
    • Cost-benefit analysis
    • Risk assessment
    • Team readiness
    • Success criteria
    • Prerequisites: None
    • Time: 2-4 hours
    • Resources: [โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 20% - Planning only
  2. migration-risks - Understanding risks

    • Data loss scenarios
    • Downtime impact
    • Compliance considerations
    • Skill gaps
    • Mitigation strategies
    • Prerequisites: Planning basics
    • Time: 2 hours
    • Resources: [โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 20%
  3. rollback-strategies - Plan B

    • When to rollback
    • Rollback procedures
    • Parallel running
    • Testing rollbacks
    • Prerequisites: Migration planning
    • Time: 2 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 30%

๐ŸŸก Phase 2: Container Registries (Docker Images)

  1. docker-hub-to-harbor - Registry migration

    • Pre-migration checklist
    • Harbor setup for migration
    • Image inventory
    • Bulk image transfer
    • Tag preservation
    • Update image references
    • CI/CD pipeline updates
    • Verification testing
    • Gradual cutover
    • Prerequisites: Harbor running, Docker Hub account
    • Time: 4-6 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘] 60% - Storage for images
  2. github-packages-to-harbor - GitHub Container Registry

    • GHCR authentication
    • Package listing
    • Automated migration script
    • GitHub Actions updates
    • Prerequisites: Harbor, GitHub account
    • Time: 3-4 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘] 50%
  3. registry-cleanup - Post-migration cleanup

    • Identifying unused images
    • Tag cleanup
    • Storage optimization
    • Garbage collection
    • Prerequisites: Completed migration
    • Time: 2-3 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 30%

๐ŸŸ  Phase 3: Version Control & CI/CD (Git & Pipelines)

  1. github-to-forgejo - Git hosting migration

    • Repository export from GitHub
    • Forgejo setup
    • Import process
    • User/org migration
    • SSH keys and tokens
    • Webhook recreation
    • GitHub โ†’ Forgejo URL updates
    • Issues and PRs migration
    • Wiki migration
    • Release artifacts
    • Prerequisites: Forgejo installed, GitHub org admin
    • Time: 6-8 hours (per org)
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘] 70% - Storage for repos
  2. gitlab-to-forgejo - GitLab alternative

    • GitLab export
    • API-based migration
    • CI/CD variable migration
    • Runner configuration
    • Prerequisites: Forgejo, GitLab access
    • Time: 6-8 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘] 70%
  3. github-actions-to-woodpecker - CI/CD pipeline migration

    • Workflow syntax comparison
    • Converting .github/workflows to .woodpecker.yml
    • Secret management
    • Matrix builds
    • Caching strategies
    • Docker-in-Docker
    • Testing pipelines
    • Prerequisites: Woodpecker CI running, Forgejo repos
    • Time: 4-6 hours per workflow
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘] 60%
  4. gitlab-ci-to-woodpecker - GitLab CI conversion

    • .gitlab-ci.yml conversion
    • Variable mapping
    • Service containers
    • Artifacts handling
    • Prerequisites: Woodpecker CI, pipeline knowledge
    • Time: 4-6 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘] 60%

๐Ÿ”ด Phase 4: Cloud Storage & Services (Data Migration)

  1. dropbox-to-nextcloud - File sync migration

    • Dropbox data export
    • Nextcloud preparation
    • Bulk file upload
    • Folder structure mapping
    • Share link recreation
    • Client reconfiguration
    • Gradual user migration
    • Verification
    • Prerequisites: Nextcloud installed, Dropbox account
    • Time: 4-8 hours + transfer time
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘] 70% - Storage for files
  2. google-drive-to-nextcloud - Google Workspace exit

    • Google Takeout
    • rclone for transfer
    • Docs/Sheets conversion
    • Shared drives
    • Team migration
    • Prerequisites: Nextcloud, Google account
    • Time: 6-10 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘] 80%
  3. aws-s3-to-minio - Object storage migration

    • Bucket inventory
    • MinIO setup with S3 gateway
    • rclone for data transfer
    • IAM policy conversion
    • Application endpoint updates
    • Lifecycle policy migration
    • Testing object access
    • DNS cutover
    • Prerequisites: MinIO running, AWS access
    • Time: 4-6 hours + transfer
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘] 70% - Storage space
  4. notion-to-obsidian - Note-taking migration

    • Notion export
    • Markdown conversion
    • File attachment handling
    • Obsidian vault setup
    • Link restructuring
    • Prerequisites: Notion account
    • Time: 3-4 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 40%

โšซ Phase 5: Complete Infrastructure (Full Cloud Exit)

  1. cloud-vm-to-proxmox - VM migration

    • VM inventory and sizing
    • Proxmox preparation
    • Image export from cloud
    • Proxmox import
    • Network reconfiguration
    • Storage migration
    • Testing and validation
    • DNS updates
    • Prerequisites: Proxmox cluster, cloud VMs
    • Time: 1-2 days
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘] 90% - Full cluster
  2. aws-to-self-hosted - AWS exit strategy

    • Service inventory (EC2, RDS, S3, etc.)
    • Self-hosted mapping
    • Data export procedures
    • Networking changes
    • Phased migration
    • Cost comparison
    • Prerequisites: Infrastructure ready
    • Time: 1-4 weeks
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ] 100%
  3. kubernetes-to-k0s - Managed k8s โ†’ k0s

    • Workload inventory
    • Manifest export
    • LoadBalancer โ†’ Traefik
    • Storage class migration
    • Secrets migration
    • Helm chart adjustments
    • Testing deployments
    • Prerequisites: k0s cluster, k8s knowledge
    • Time: 2-3 days
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘] 80%
  4. heroku-to-self-hosted - PaaS to self-hosted

    • Buildpack to Dockerfile
    • Database migration
    • Addon alternatives
    • Environment variables
    • Deployment automation
    • Prerequisites: App understanding
    • Time: 1-2 days per app
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘] 70%
  5. dns-migration - DNS provider migration

    • Zone export
    • Record verification
    • TTL reduction
    • Parallel DNS testing
    • Cutover procedure
    • Rollback DNS
    • Prerequisites: Domain ownership
    • Time: 2-4 hours + propagation
    • Resources: [โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 30%
  6. email-migration - Self-hosted email

    • Email backup (IMAP)
    • Mail server setup
    • Account migration
    • DNS records (MX, SPF, DKIM)
    • Testing mail flow
    • Client reconfiguration
    • Prerequisites: Mail server (complex!)
    • Time: 1-2 days
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘] 80%
  7. monitoring-migration - Observability stack

    • Datadog โ†’ Prometheus/Grafana
    • Dashboard conversion
    • Alert rule migration
    • Agent reconfiguration
    • Retention strategy
    • Prerequisites: Observability knowledge
    • Time: 1-2 days
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘] 60%
  8. multi-service-migration - Complex migrations

    • Dependency mapping
    • Migration order
    • Parallel vs sequential
    • Integration testing
    • Rollback coordination
    • Prerequisites: Multiple completed migrations
    • Time: 1-4 weeks
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ] 100%
  9. post-migration-validation - Verification

    • Functionality testing
    • Performance comparison
    • Data integrity checks
    • User acceptance testing
    • Documentation updates
    • Prerequisites: Completed migration
    • Time: 1-2 days
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘] 50%
  10. decommissioning-commercial - Cleanup

    • Service termination checklist
    • Data deletion verification
    • Subscription cancellation
    • Cost savings tracking
    • Lessons learned
    • Prerequisites: Stable self-hosted
    • Time: 2-4 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 30%

๐Ÿ”— What Comes Next?

After migration:

Maintain Your Infrastructure:

Optimize:

๐Ÿ“Š Resource Requirements

Registry Migration:

Git Migration:

Storage Migration:

Time Investment:

๐Ÿ› ๏ธ Essential Migration Tools

Data Transfer:

API Tools:

Version Control:

Automation:

๐Ÿ’ก Pro Tips for Migrations

  1. Test Everything: Dry-run migrations in staging first
  2. Document the Process: You'll need it for rollback
  3. Parallel Run: Keep old service running during validation
  4. Low-TTL DNS: Reduce DNS TTL before migration
  5. Off-Hours: Schedule during low-traffic windows
  6. Incremental: Migrate in phases, not all at once
  7. Backup First: Before touching anything
  8. User Communication: Warn users early and often
  9. Monitor Closely: First 48 hours are critical
  10. Celebrate: Migrations are hard - recognize success!

๐Ÿ”„ Common Migration Pitfalls

Pitfall 1: No Rollback Plan

Pitfall 2: Underestimating Time

Pitfall 3: Forgetting Webhooks

Pitfall 4: Data Loss

Pitfall 5: No Testing

Pitfall 6: DNS Propagation

Pitfall 7: Forgotten Secrets

Pitfall 8: User Surprise

๐Ÿ”— Related KB Sections

๐Ÿ“ Change Log

2026-01-30


๐Ÿš€ Remember: Migrations are risky but rewarding! Plan thoroughly, test extensively, communicate clearly. Start with low-risk services (container registry) before tackling high-risk ones (email, DNS). Keep commercial services running in parallel until you're confident. Document everything - you'll thank yourself later!

Choose Theme

Your selection is saved locally.

Neural Cacophony
Aperture v2
Flux v1
Mosaic Chaos
Nexus v1
Nexus Zest
Prism v2
Synapse