Move an existing app onto TenancyEngine, one layer at a time
You do not have to swap everything at once. Accounts, plans and billing can move in separate steps, each with a way back. This guide gives the order we would use and the limits you should plan around.
7 min read · Last checked
In short
Key points
- Move in layers: customer organizations first, then sign-in, then plans, then billing.
- Run old and new side by side on a copy of your data before any customer is switched.
- TenancyEngine does not document a password-hash import, so plan for people to set up sign-in again.
- You keep your own product data and your own database.
Before you start: write down what you have today
This list is your migration plan. Anything that lives in more than one place is where mistakes happen, so count the places.
- How customers and their people are stored, and how one person maps to several customers.
- Roles and permissions, and where they are checked.
- Plans, limits and trials, and where they are checked.
- Subscriptions, invoices and the payment provider, including cards on file.
- Every place that sends email or text messages for sign-in or billing.
Step 1: register the app and create the customer organizations
Create the application in the console and note its slug. Then create a workspace for each of your existing customers from your backend, using your own customer identifier as the workspace slug so you can map between old and new. Use the free offering option when creating a workspace if a customer should start on a free plan.
On Starter you are limited to one application, five customer workspaces and Production only, so a larger migration needs Growth, which also adds separate development and staging environments. Use them: rehearse the whole migration in a non-production environment first.
Step 2: move sign-in
Replace your sign-in page with an OpenID Connect client pointed at TenancyEngine, using the authorization code flow with PKCE. Keep your old sign-in working behind a switch while you test.
Passwords are the hard part. TenancyEngine does not document a way to import password hashes from another system. The practical options are to invite each person so they set up sign-in on the new system, which also lets them add an authenticator app or a passkey, or to ask people to reset on first use. Plan the email to your customers and a support path for people who cannot find their invitation.
Match people by a stable identifier you control. Matching only by email address causes trouble when a person has changed address, so check the exceptions by hand.
Step 3: move roles and plans
Define your roles and features in the console and replace in-code checks of plan names with checks of features, using the runtime context from your backend. The plans and entitlements article linked below explains why. Do this before billing moves, so billing changes later do not touch application code.
Step 4: move billing last
Billing carries the most risk because it moves money and cards. Run new subscriptions on the new system first, and leave existing subscriptions where they are until you have confirmed a few full billing cycles. Whether existing cards on file can be moved depends on your current payment provider and on its rules, so ask them directly before you promise customers anything.
Step 5: cut over customer by customer
- Pick a few friendly customers first and keep a rollback path.
- Switch a customer by pointing their workspace to the new sign-in and plan checks, not by changing everyone at once.
- Keep a record of who has moved, and turn the old paths off only when the last customer is across.
What does not carry over
- Password hashes: not documented as importable. People set up sign-in again.
- SAML single sign-on connections: not offered. Keep a specialist identity vendor for customers who depend on it.
- Your product data: it stays in your database. TenancyEngine holds accounts, roles, plans and usage, not your content.
Honest limits
What to know before you rely on this
- TenancyEngine does not document a bulk import of users or password hashes.
- TenancyEngine does not offer SAML single sign-on.
- Existing payment cards cannot be assumed to move. Confirm with your current payment provider.
Questions people ask
Can I migrate gradually?
Yes. Move organizations, then sign-in, then plans, then billing, and switch customers one at a time. Keep the old path working until the last customer has moved.
Do I need to change my database?
No. Your product data stays in your own database. You map your customers to TenancyEngine workspaces using an identifier you control.
Where can I rehearse the move?
In a development or staging environment, which are available from Growth. Starter runs in Production only.
Sources
Keep reading
Try it on the free plan
One app and five customers, no credit card required.