Originally published on rollgate.io.
Unleash is good software. The reason teams start to migrate from Unleash is rarely the product, it is everything around it: a Postgres database you back up, an API server you patch, version upgrades you schedule, and a pager that goes off when the flag service is the thing standing between a deploy and production.
Self-hosting made sense on day one because it was free and you control it. A year in, "free" has a salary attached to it.
What self-hosting Unleash actually costs
The licence is zero. The operations are not. A production deployment is at minimum three moving parts:
- An Unleash server you keep patched and available.
- A Postgres database with backups and a restore plan you have actually tested.
- Often an Unleash Edge or Proxy layer so client-side and high-traffic SDKs do not hammer the main API.
On top of that sits the work nobody schedules: the upgrade treadmill, security patches on the runtime, capacity planning when a launch spikes evaluations, and the on-call rotation that owns all of it. None of it ships a feature. For a small team it lands on the same one or two people already shipping the product.
What changes when you migrate
The mental model barely moves. A flag is still a flag, environments are still environments, a gradual rollout is still a percentage. What changes is who runs the control plane. You stop operating a database and an API and point your SDKs at a hosted endpoint.
For EU teams there is a second reason. A common motivation for self-hosting is data residency: keeping flag data inside Europe. Rollgate is EU-hosted, so you keep the residency guarantee without keeping the servers.
Migrating the SDK: before and after
// Before: self-hosted Unleash
import { initialize } from 'unleash-client';
const unleash = initialize({
url: 'https://unleash.your-company.internal/api/',
appName: 'checkout-service',
customHeaders: { Authorization: process.env.UNLEASH_API_TOKEN! },
});
unleash.on('ready', () => {
if (unleash.isEnabled('new-checkout-flow')) {
// new feature code
}
});
// After: managed Rollgate
import { RollgateClient } from '@rollgate/sdk-node';
const client = new RollgateClient({
apiKey: process.env.ROLLGATE_API_KEY!, // sb_server_...
});
await client.init();
if (client.isEnabled('new-checkout-flow', false)) {
// new feature code
}
The flag key stays the same, so your call sites barely move. Typed config values map to getString, getNumber, and getValue. User targeting carries over through init(user) or identify.
On the client side the change is bigger, in your favor. Unleash usually needs a Proxy or Edge tier so browsers never hold a server token. Rollgate uses a separate client key (sb_client_...), so there is no proxy to run.
Mapping Unleash concepts to Rollgate
| Unleash concept | Rollgate equivalent |
|---|---|
| Toggle | Flag |
| Activation strategy | Targeting rule |
| Gradual rollout strategy | Percentage rollout |
| Environment | Environment |
| Variant | Flag value (getString/getNumber/getValue) |
| API token | API key (server / client scopes) |
| Unleash Edge / Proxy | Built-in delivery |
Migrate your flags with an MCP agent
Recreating flags one by one is the tedious part. Rollgate ships an MCP server, so you can hand that job to an AI agent. rollgate-mcp exposes tools like list_feature_flags, detect_existing_flag (so a re-run does not duplicate), create_feature_flag, set_flag_rollout, and toggle_flag_in_environment. Point the agent at your Unleash JSON export and a plain prompt walks the whole list.
A staged migration, not a big bang
- Recreate the flags in Rollgate, by hand or via the MCP agent.
- Wire the Rollgate SDK into one non-critical service, in staging only.
- Compare evaluations. Check that rollout percentages match, not individual bucketing.
- Promote environment by environment, keeping Unleash as the fallback.
- Decommission the Unleash server and database only after the final cutover.
Rollback stays available at every step.
Where self-hosted Unleash still wins
Keep self-hosting if you need a fully air-gapped deployment, a hard guarantee that data never leaves machines you control, or you already run stateful services at low marginal cost. Rollgate is the better trade when running infrastructure is not your differentiator and you want EU residency without the servers.
Read the full version with the complete code and FAQ on rollgate.io/blog/migrate-from-unleash.
Top comments (0)