Skip to content

Keycloak Migration Walkthrough

Migrate your existing Keycloak deployment to Skycloak. This guide walks you through migrating your database from self-hosted Keycloak to our fully managed platform.

Skycloak’s migration process helps you:

  • Transfer all user data including passwords (with encrypted export)
  • Preserve configurations for realms, clients, and roles
  • Choose your region — deploy to US, Canada, Europe, or Australia
  • Monitor progress in real-time with live status updates

Eliminate Operational Overhead:

  • No more server management
  • Automatic updates and patches
  • Built-in backup and recovery
  • 24/7 monitoring and support

Reduce Costs:

  • No infrastructure expenses
  • Reduced DevOps requirements
  • Predictable monthly pricing
  • Included enterprise features

Improve Reliability:

  • SLA of 99.9% on the Business plan’s Medium cluster and up to 99.99% on the Enterprise plan
  • Multi-region availability
  • Choose a fixed cluster size (Small, Medium, or Large) at creation, and resize later as your needs grow
  • DDoS protection included

Before starting your migration:

  • Skycloak account with Launch plan or higher
  • Admin access to your source Keycloak instance
  • PostgreSQL database export — pg_dump access to your Keycloak database
  • Keycloak version 20.0 or higher (older versions — contact support@skycloak.io)
  • Backup of your current Keycloak data
  • Maintenance window scheduled (typically 15-45 minutes)

Evaluate your current deployment:

  1. Check Keycloak version:

    ${KEYCLOAK_HOME}/bin/kc.sh version
  2. Assess database size:

    SELECT pg_database_size('keycloak') / 1024 / 1024 as size_mb;
  3. Count users and realms:

    SELECT COUNT(*) FROM user_entity;
    SELECT COUNT(*) FROM realm;
  4. List custom providers:

    ls ${KEYCLOAK_HOME}/providers/

Connect to your Keycloak database server and create a PostgreSQL dump:

# Create the database dump
pg_dump -h [hostname] -p [port] -U [username] -d [database_name] \
  --no-owner --no-acl --clean --if-exists \
  -f keycloak_backup_$(date +%Y%m%d_%H%M).sql

# Compress the dump (required for upload)
zip keycloak_backup.zip keycloak_backup_*.sql

# Verify the compressed size (must be under 10GB)
ls -lh keycloak_backup.zip

If your dump contains sensitive data you want to protect during transfer:

# Encrypt the zip file with AES-256
openssl enc -aes-256-cbc -salt -pbkdf2 \
  -in keycloak_backup.zip \
  -out keycloak_backup.zip.enc

You’ll provide the encryption password in the migration wizard. Encryption is required if you include user credentials in your export.

  1. Log in to your Skycloak dashboard
  2. Navigate to the Clusters page
  3. Click the “Migrate from Keycloak” button
  4. The migration wizard will guide you through three steps
  1. Select your Keycloak version from the dropdown
  2. Choose upload method: drag-and-drop your .zip file, or provide a public URL to your dump
  3. If encrypted: check the encryption box and provide your password

Migration wizard — source database step The wizard’s first step: pick how you’re providing the dump, with copy-paste pg_dump instructions and encryption support built in.

The wizard validates your file after upload (size, checksum, and encryption key if applicable).

  1. Cluster Name: A descriptive name for your migrated instance
  2. Cluster Size: Small, Medium, or Large
  3. Deployment Region: Choose your preferred region (US, Canada, Europe, Australia)
  4. Management: Your migrated instance is fully managed by Skycloak. You do not provide admin credentials, Skycloak provisions management access automatically.
  5. Advanced Options: Keycloak feature flags and legacy /auth path support

Migration wizard — target cluster step Configuring the new cluster that will host your migrated data.

The wizard also lets you bring your custom themes (multiple ZIPs, one theme per file) and extension JARs along:

Migration wizard — branding and themes step Theme ZIPs upload in the Branding & themes step — each file is imported as its own theme, and migrated extensions are auto-registered on the new cluster.

Review your migration configuration and confirm the pre-flight checklist before starting:

Migration wizard — pre-flight check The pre-flight check verifies everything before the migration begins.

After starting the migration, you’ll be redirected to the Migrations page with real-time progress tracking.

  1. Database Upload — File transfer and integrity verification
  2. Cluster Provisioning — Infrastructure setup in your selected region
  3. Database Restoration — Database restore and Keycloak startup
Database Size Estimated Time
< 1 GB 10-15 minutes
1-5 GB 20-30 minutes
5-10 GB 30-45 minutes

Once migration completes, click “Go to Cluster” to access your new Skycloak instance. Open the Admin Console with Admin Console SSO using your Skycloak account, your migrated realms and users are preserved.

Test critical functions:

  • Admin can log in to Keycloak console
  • Users can authenticate successfully
  • Password validation works
  • SSO flow functions correctly
  • API authentication works

After verifying your migrated data, configure additional features from your cluster settings:

  • Custom domains — Domain Settings page
  • Custom themes — Branding page
  • Extensions — Extensions page
  • Realm mappings — Cluster settings

If you previously used a custom domain, add it to your new cluster and update DNS:

Type: CNAME
Host: auth.yourcompany.com
Target: [provided by Skycloak for your region]
TTL: 300

Skycloak automatically provisions SSL certificates for custom domains.

  1. Monitor closely for 24-48 hours
  2. Check performance metrics
  3. Review error logs
  4. Update your applications with the new Skycloak URLs
  5. Update documentation

Have a rollback strategy ready:

  1. Keep source Keycloak running (read-only mode)
  2. Document rollback DNS settings
  3. Test rollback procedure before migration
  4. Have support contact ready

If needed:

  1. Revert DNS to original server
  2. Restore source Keycloak to active
  3. Investigate issues with Skycloak support
  4. Plan remediation before retry

Upload fails or times out:

  • Check file size is under 10GB
  • Ensure stable internet connection
  • Try the URL method as an alternative to direct upload

Migration stuck in processing:

  • Wait at least 10 minutes — large databases take time
  • Check the status badge for the current stage
  • Contact support@skycloak.io with your migration ID

User authentication failures after migration:

  • Verify realm settings match your original configuration
  • Check client configurations and redirect URIs
  • Ensure you exported with credentials if you need password preservation
  1. Stop writes to your source Keycloak before taking the database dump
  2. Take a fresh backup immediately before starting
  3. Export with credentials if you want users to keep their passwords
  4. Keep your source Keycloak running as a fallback for 1-2 weeks
  5. Test authentication flows thoroughly after migration
  6. Monitor for 48 hours after going live
  • Migration feature: Included with Launch plan and above
  • Data transfer: No ingress charges
  • Same pricing: Pricing is the same regardless of which region you deploy to
  • All transfers use TLS encryption
  • Uploaded files are encrypted at rest in S3
  • Optional AES-256 encryption for your database dump
  • Encryption keys are permanently deleted after migration completes
  • Uploaded database files are automatically cleaned up after migration

If you encounter issues during migration:

  • Email: support@skycloak.io
  • Include: Migration ID, source Keycloak version, database size, and any error messages

After successful migration:

  1. Configure custom domains from your cluster’s Domain Settings
  2. Upload custom themes from the Branding page
  3. Install extensions from the Extensions page
  4. Review analytics in the Insights dashboard
  5. Update your applications to point to the new Skycloak URLs