Skip to content
flexcal Documentation

Migrating from cal.com

flexcal keeps cal.com’s database migrations, so an existing self-hosted cal.com database is migrated in place: point flexcal at it and start. There is nothing to export or import.

Bookings, users, event types, credentials, calendar connections and webhooks come across as they are. Workflows and routing forms do too. Domain-wide delegation, the impersonation log and routing-form traces do not.

flexcal forked at cal.com 6.2.0. A database from a newer cal.com is past the fork point and cannot be migrated this way.

Take a dump first. The migrations are forward-only, so this is your only way back:

Terminal window
pg_dump --format=custom --file=calcom-pre-flexcal.dump "$DATABASE_URL"
  1. Stop cal.com, so nothing writes to the database while the migrations run.

  2. Point flexcal at the same database. The variable names are unchanged, so the old .env largely carries over:

    DATABASE_URL=postgresql://<user>:<password>@<host>:5432/<database>
    NEXTAUTH_SECRET=<the cal.com value>
    CALENDSO_ENCRYPTION_KEY=<the cal.com value>
    NEXT_PUBLIC_WEBAPP_URL=https://<your domain>

    See Configuration for the full list.

  3. Start flexcal. The container applies the migrations itself:

    Terminal window
    docker compose up -d
  4. Sign in with an existing account and open a public booking page. Under Settings → Integrations, the calendar connections should still show as connected. If they do not, CALENDSO_ENCRYPTION_KEY does not match the one cal.com used.

The setup wizard does not run, since the database already has users.

Restore the dump and start cal.com against it again:

Terminal window
pg_restore --clean --if-exists --dbname="$DATABASE_URL" calcom-pre-flexcal.dump

Instances that used a database role owning a schema of its own name may see a warning from the relocate_shadow_schema_objects migration. Configuration explains what it repairs.