Deploy Elixir & Phoenix to Europe — EU Hosting for BEAM Apps in 2026
Elixir and the Phoenix Framework are the go-to choice when you need fault-tolerant, low-latency applications — from real-time chat (Discord, Slack-style) to financial services, telecommunications, and SaaS platforms. But most Elixir PaaS options — Fly.io, Gigalixir, Render — are US-first by default.
If your users are in Germany, France, or the Netherlands, that means every request crosses the Atlantic and back. And if you're handling personal data, GDPR requires EU data residency — which eliminates US-only providers entirely.
sota.io runs on Hetzner in Germany. Your Elixir/Phoenix app deploys to Europe in minutes, with managed PostgreSQL and automatic TLS included.
Why Elixir on Fly.io and Gigalixir Doesn't Work for EU Companies
Fly.io defaults to US regions. While you can specify EU regions (fra, ams), many Fly.io databases and services still process through US infrastructure. Fly.io is a US company subject to US surveillance law (CLOUD Act) — a problem under the post-Schrems II legal framework.
Gigalixir runs on Google Cloud and AWS. No EU-dedicated option exists. If your DPA (Data Processing Agreement) requires EU residency, Gigalixir cannot sign one.
Render offers Frankfurt, but their data processing architecture is US-headquartered — meaning your contract is with a US entity, not an EU processor.
sota.io is incorporated and operated in the EU. All infrastructure runs on Hetzner's German data centers. Your DPA is with an EU entity.
The BEAM VM: Built for Europe's Reliability Standards
The BEAM (Bogdan/Björn's Erlang Abstract Machine) was created at Ericsson in Sweden to power telephone switches that must never go down. The original requirement: 99.9999999% uptime ("nine nines"). This made the BEAM the foundation of Europe's telecom infrastructure.
Today, BEAM-powered systems run at:
- WhatsApp — 2 billion users, ~50 engineers, BEAM handles the concurrency
- Discord — 5 million concurrent users on a single Phoenix PubSub cluster
- Riot Games — League of Legends chat service (billions of messages)
- Heroku — their routing layer was originally Erlang
When you deploy Elixir on EU infrastructure, you're combining European reliability engineering philosophy (Ericsson BEAM) with European data sovereignty (Hetzner Germany).
Deploy Phoenix to sota.io
1. Containerize Your Phoenix App
Phoenix works best with a multi-stage Dockerfile that compiles your release in one stage and runs it in a minimal image:
FROM elixir:1.16-alpine AS builder
RUN apk add --no-cache build-base npm git
WORKDIR /app
COPY mix.exs mix.lock ./
RUN mix local.hex --force && mix local.rebar --force
RUN MIX_ENV=prod mix deps.get --only prod
COPY assets ./assets
RUN npm ci --prefix assets && npm run deploy --prefix assets
COPY . .
RUN MIX_ENV=prod mix compile
RUN MIX_ENV=prod mix phx.digest
RUN MIX_ENV=prod mix release
# --- Runtime ---
FROM alpine:3.19
RUN apk add --no-cache libstdc++ openssl ncurses-libs
WORKDIR /app
COPY --from=builder /app/_build/prod/rel/my_app ./
ENV PHX_HOST=localhost
ENV PORT=4000
EXPOSE 4000
CMD ["/app/bin/my_app", "start"]
The resulting image is ~50–80 MB — Phoenix releases are self-contained, no runtime Elixir needed.
2. Configure PostgreSQL
sota.io injects PostgreSQL connection details automatically. Use DATABASE_URL or the individual PG* variables in your config/runtime.exs:
config :my_app, MyApp.Repo,
url: System.get_env("DATABASE_URL") || raise("DATABASE_URL not set"),
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
ssl: true,
ssl_opts: [verify: :verify_none]
3. Run Ecto Migrations on Startup
Modify your rel/overlays/bin/migrate script or add migration to the release startup:
# In your application.ex or a release task
defmodule MyApp.Release do
def migrate do
{:ok, _, _} = Ecto.Migrator.with_repo(MyApp.Repo, &Ecto.Migrator.run(&1, :up, all: true))
end
end
Or add it to your Dockerfile CMD:
CMD ["/bin/sh", "-c", "/app/bin/my_app eval 'MyApp.Release.migrate()' && /app/bin/my_app start"]
4. Deploy
sota deploy
That's it. sota.io builds your Docker image, injects PostgreSQL credentials, provisions TLS, and routes traffic to your Phoenix app. LiveView websockets work out of the box — no special configuration needed.
Phoenix LiveView and WebSockets
Phoenix LiveView relies on persistent WebSocket connections for real-time UI updates. Many PaaS providers have idle connection timeouts that kill LiveView connections after 30–60 seconds.
sota.io keeps WebSocket connections alive for the full session — no polling fallbacks, no reconnect loops. Your LiveView components work exactly as designed.
Comparison: sota.io vs Fly.io vs Gigalixir
| sota.io | Fly.io | Gigalixir | |
|---|---|---|---|
| EU Data Residency | ✅ Germany (default) | ⚠️ Optional (fra/ams) | ❌ US/GCP |
| GDPR EU DPA | ✅ EU entity | ❌ US entity | ❌ US entity |
| Pricing Model | Flat (€9/mo, 2 GB) | Usage-based (+ egress) | Free tier → proprietary |
| Managed PostgreSQL | ✅ Included | ✅ Add-on (€) | ✅ Included |
| Phoenix LiveView | ✅ Native WS support | ✅ | ✅ |
| Hot Upgrades | ❌ (use rolling) | ❌ | ❌ |
| Open Source CLI | ✅ | ✅ | ❌ |
GDPR and Elixir: Healthcare, Fintech, Telecom
Elixir's most common enterprise use cases — healthcare platforms, fintech real-time systems, telecom routing — are exactly the sectors most affected by GDPR.
- Healthcare (DSGVO § 22): Special categories of personal data (health records) require explicit EU data residency
- Fintech (BaFin/EBA): German and EU financial regulators require data to stay within EU jurisdiction
- Telecom: Elixir's heritage industry — EU Roaming and data retention laws require EU processing
If you're building in any of these verticals with Elixir, the combination of BEAM reliability and Hetzner Germany infrastructure is the natural fit.
What sota.io Gives You
- EU by default — Your app deploys to Hetzner Germany, no configuration needed
- Automatic TLS — Let's Encrypt certificates, auto-renewed
- Managed PostgreSQL 17 — Connection string injected as
DATABASE_URL - Flat pricing — €9/month, 2 GB RAM, 10 GB storage. No egress fees.
- Open source CLI —
sota deployfrom your terminal or CI/CD
npm install -g @sota-io/cli
sota auth login
sota deploy
Your Phoenix app is live in Germany.
See also: Deploy Erlang to Europe — Erlang/OTP, the runtime Elixir runs on, 40 years of EU telco infrastructure (Ericsson 🇸🇪) · Deploy Go to Europe · Deploy Rust to Europe · All languages on sota.io