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:
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
migration-risks - Understanding risks
- Data loss scenarios
- Downtime impact
- Compliance considerations
- Skill gaps
- Mitigation strategies
- Prerequisites: Planning basics
- Time: 2 hours
- Resources:
[โโโโโโโโโโ]20%
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)
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
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%
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)
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
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%
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%
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)
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
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%
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
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)
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
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%
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%
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%
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%
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%
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%
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%
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%
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:
- kb/observability/ - Monitor everything
- kb/security/ - Harden your systems
- kb/cloud/backup-strategies - Backup religiously
Optimize:
- kb/infrastructure/automation - Automate ops
- kb/containers/k0s-production - Scale up
๐ Resource Requirements
Registry Migration:
- Small (< 100 images): 50GB storage
[โโโโโโโโโโ]30% - Large (1000+ images): 500GB+ storage
[โโโโโโโโโโ]80%
Git Migration:
- Small Org (< 50 repos): 10GB storage
[โโโโโโโโโโ]30% - Large Org (500+ repos): 100GB+ storage
[โโโโโโโโโโ]70%
Storage Migration:
- Personal (< 1TB): 1TB+ storage
[โโโโโโโโโโ]50% - Team (10TB+): 20TB+ storage
[โโโโโโโโโโ]90%
Time Investment:
- Single Service: 1-2 days
[โโโโโโโโโโ]40% - Complete Stack: 2-4 weeks
[โโโโโโโโโโ]80% - Enterprise: 2-6 months
[โโโโโโโโโโ]100%
๐ ๏ธ Essential Migration Tools
Data Transfer:
- rclone
[โโโโโโโโโโ]Required - Universal sync - rsync
[โโโโโโโโโโ]90% - File sync - skopeo
[โโโโโโโโโโ]80% - Container images
API Tools:
- curl/wget
[โโโโโโโโโโ]90% - HTTP transfers - jq
[โโโโโโโโโโ]80% - JSON processing - yq
[โโโโโโโโโโ]70% - YAML processing
Version Control:
- git
[โโโโโโโโโโ]Required - Repo migration - gh (GitHub CLI)
[โโโโโโโโโโ]80% - GitHub automation - glab (GitLab CLI)
[โโโโโโโโโโ]70% - GitLab automation
Automation:
- Ansible
[โโโโโโโโโโ]80% - Config management - Python scripts
[โโโโโโโโโโ]90% - Custom migration - Bash scripts
[โโโโโโโโโโ]80% - Glue logic
๐ก Pro Tips for Migrations
- Test Everything: Dry-run migrations in staging first
- Document the Process: You'll need it for rollback
- Parallel Run: Keep old service running during validation
- Low-TTL DNS: Reduce DNS TTL before migration
- Off-Hours: Schedule during low-traffic windows
- Incremental: Migrate in phases, not all at once
- Backup First: Before touching anything
- User Communication: Warn users early and often
- Monitor Closely: First 48 hours are critical
- Celebrate: Migrations are hard - recognize success!
๐ Common Migration Pitfalls
Pitfall 1: No Rollback Plan
- Something breaks, can't go back
- Fix: Document rollback, test it
Pitfall 2: Underestimating Time
- "2 hours" becomes 2 days
- Fix: 3x time estimates, buffer for issues
Pitfall 3: Forgetting Webhooks
- CI/CD breaks, integrations fail
- Fix: Inventory all integrations first
Pitfall 4: Data Loss
- Incomplete transfers, deletions
- Fix: Verify data integrity, backups
Pitfall 5: No Testing
- Production migration fails
- Fix: Test in staging first
Pitfall 6: DNS Propagation
- Stale DNS caches cause issues
- Fix: Lower TTL 48h before migration
Pitfall 7: Forgotten Secrets
- API keys, passwords not migrated
- Fix: Secret inventory and transfer
Pitfall 8: User Surprise
- Users not prepared for changes
- Fix: Communication plan, training
๐ Related KB Sections
- kb/containers/harbor-setup - Container registry
- kb/cicd/forgejo-setup - Git hosting
- kb/cloud/nextcloud-setup - File storage
- kb/cloud/minio-setup - Object storage
- kb/infrastructure/ - Infrastructure automation
- kb/observability/ - Monitor migrations
๐ Change Log
2026-01-30
- Created migrations directory structure
- Defined complete migration roadmap from planning to validation
- Listed all common migration scenarios
- Added time and resource estimates per migration type
- Emphasized risk mitigation and rollback strategies
- Organized by learning phases (1-5)
- Added essential migration tools
- Cross-referenced setup articles in other sections
- Included post-migration validation and decommissioning
๐ 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!