Cloud exit from Azure PaaS to Hetzner

What actually ties you to PaaS services, what can replace them, how the move runs and when you are better off staying.

  1. Inventoryservices, data, cost
  2. Decoupleyour own hostname
  3. Run in parallelold and new
  4. Move the fleetdevices buffer
  5. Switch offAzure last
The dashed stage carries the risk. Offline-capable devices ride it out, because a short gap to the central system only means late data.

A cloud exit moves an IoT platform off a hyperscaler's managed services and into containers you run yourself. BLUECTRL, the platform of BLUELINE / Linetechnology GmbH for modular recycling plants, took this route from Azure PaaS services to containers at Hetzner. Offline-capable edge devices made it possible: once a plant keeps running without the cloud, the cloud becomes replaceable.

Starting containers at another provider is the easy part of a cloud exit. The hard part is the assumptions built into the architecture: that a device can always reach the central system, and that certain services will always be there. BLUECTRL moved its server side from Azure PaaS services to self-operated containers at Hetzner. The trade-offs and the sequence below are general and apply to any IoT platform in that position.

Azure PaaS lock-in: what really ties you down

Moving the data out is rarely the main obstacle. Microsoft refunds egress charges when you leave Azure, with conditions: a support request, 60 days for the transfer, and all subscriptions cancelled afterwards. In the EU, the Data Act currently caps switching charges at direct costs and abolishes them from 12 January 2027 (Art. 29).

The real ties are elsewhere:

  • Concepts in your code: device twins, direct methods and Azure Functions bindings have no direct equivalent elsewhere. The application ends up thinking in the provider’s terms.
  • Data: the Cosmos DB API and stored procedures in T-SQL don’t move by themselves.
  • Identity: Entra ID, managed identities and the Device Provisioning Service connect devices, services and staff.
  • Lifecycle: the provider decides when a service ends. Azure Time Series Insights was retired on 7 July 2024, with Azure Data Explorer as the way out.

Why offline-capable edge devices make a cloud exit possible

If operation, configuration or approvals come from the cloud, cutting over stops the plant at the customer’s site. The move has to succeed in one go, and any setback hits production straight away.

A device that works on its own and buffers its data changes that calculation. When the central system is unreachable, data arrives late and the plant keeps running. You can then move devices singly or in groups, and the way back stays open. At BLUECTRL, this property was the precondition for the move.

Check three things first:

  • Hostname and protocol: if devices point at *.azure-devices.net and use an Azure SDK, they need a software update first. IoT Hub does speak MQTT, but it isn’t a full broker, so switching means changing topics and authentication.
  • Buffer: it has to cover the longest cutover window with room to spare.
  • Update path: without OTA, every change on the device means a site visit. In that case the update path comes before the move.

Replacing Azure services: what maps to what

The table shows common equivalents. The right choice depends on how much of a service you actually use.

Azure service Possible replacement
IoT Hub RabbitMQ or an MQTT broker, plus your own service for device state
Device Provisioning Service your own process with per-device keys
Functions, Logic Apps your own services, for example Python with FastAPI
Azure SQL, Cosmos DB PostgreSQL, with TimescaleDB or InfluxDB for time series
Blob Storage S3-compatible object storage
Azure Monitor Grafana, Loki, Promtail, Node Exporter
Entra ID a separate identity provider such as Keycloak, or keep Entra ID

Hetzner’s cloud products give you the foundation: servers, S3-compatible object storage, load balancers, private networks and firewalls. The product list has no IoT service and no managed database, so you run those parts yourself.

Identity and data usually take the most work. If you rely on Cosmos DB or a lot of T-SQL, expect to rewrite queries. SQL Server in a container is possible, but the licensing question remains. Entra ID can stay in place for staff logins after the move, as long as sign-in is all that depends on it.

Migrating from Azure to Hetzner, step by step

  1. Take inventory: services, data volumes, dependencies and cost per service. This often shows that a handful of items make up most of the bill.
  2. Decouple: an update gives devices your own hostname and an open protocol, still pointing at the existing platform.
  3. Run in parallel: build the new platform from the CI pipeline and send data to both systems for a while. Compare completeness and dashboards.
  4. Move the fleet: a test device first, then a small group, then the rest. A DNS record keeps the way back open, provided its TTL is short enough.
  5. Switch off: migrate historical data, test a restore from the new system, and cancel Azure last.

What you take on when you run it yourself

With PaaS, part of the operational work is included in the price. After the move it is yours: patching the OS and containers, backups with restore tests, certificates, capacity, and redundancy across several servers. Then there is the question of who responds when something stops at night.

Visibility comes first. BLUECTRL uses Grafana, Loki with Promtail, and Node Exporter for this. Keep the configuration as code in a repository as well, so the platform stays reproducible and doesn’t depend on what one person remembers.

Put this working time into any cost comparison. Comparing two providers’ invoices leaves out too much.

Cutting Azure IoT costs: when staying is better

Moving isn’t always the answer. Try the simpler levers first: the right IoT Hub tier, aggregating telemetry on the device, shorter retention for logs and data, and reservations for steady workloads.

Staying is usually the better choice when:

  • nobody on the team wants to run servers, or can,
  • corporate policy mandates Azure,
  • devices can’t work offline and can’t be updated remotely,
  • the platform relies on many other Azure services, for reporting or analytics, say.

The case for moving rests on a combination: offline-capable devices, few services in use, steady load and in-house operations skills.

Summary for management

A cloud exit trades part of your provider dependency for operational responsibility of your own. The risk to customers depends mostly on whether plants keep running without the cloud. If they do, and an update path exists, the fleet can move in stages. If both are missing, that is where the first investment belongs, whether or not you move later. Base the decision on full costs, including the working time for operations.

Let’s talk about your devices

Which devices, how many, what is missing today: a short paragraph is enough for a first assessment.