Deploy Bun to Europe — EU Hosting for Bun JavaScript Apps in 2026

Bun 1.0 launched in September 2023 and redefined what a JavaScript runtime could be. Written in Zig and using JavaScriptCore (the Safari engine) instead of V8, Bun starts 4–5× faster than Node.js, installs packages up to 30× faster, and bundles code without any additional tooling. For teams building high-throughput APIs, real-time backends, or cost-sensitive microservices, Bun is the most significant shift in the JavaScript ecosystem since Node.js itself.

But a fast runtime is only half the equation. For European developers, the other half is: where does your data live?

Most Bun-compatible hosting platforms — Railway, Render, Fly.io, and Oven.sh — are US-first. Under GDPR, if you're processing personal data from EU users, your infrastructure choice is a legal question. This guide shows how to deploy Bun applications to EU infrastructure using sota.io.

Why Oven.sh and Railway Don't Work for EU Companies

Oven.sh is Bun's own managed hosting platform. It's fast and optimized for Bun — but it runs on US infrastructure. No EU region option exists. If your privacy policy says "data stored in the EU" and you're using Oven.sh, that's a compliance gap.

Railway defaults to US regions. European deployments are possible but not the default, and Railway is a US company subject to the US CLOUD Act. A US entity can be compelled to disclose EU user data without informing the data subject — which directly conflicts with GDPR Article 44.

Render offers a Frankfurt region but processes payments and authentication through US-based infrastructure. Your DPA (Data Processing Agreement) is with a US legal entity.

sota.io is incorporated in the EU. All compute runs on Hetzner in Germany. Your DPA is with an EU entity, your data never leaves Europe, and your Bun app deploys from a single command.

What Makes Bun Different — and Why It Matters for EU Hosting

Bun isn't just a faster Node.js. It ships with:

For EU companies, this matters for cost: smaller images, faster cold starts, less compute needed. On a flat-rate platform like sota.io, you spend less per request than on usage-based alternatives.

Deploy Bun to sota.io

1. Dockerfile for a Bun Application

Bun provides official Docker images. A minimal production Dockerfile:

FROM oven/bun:1.1-alpine AS builder

WORKDIR /app
COPY bun.lockb package.json ./
RUN bun install --frozen-lockfile --production

COPY . .
RUN bun build src/index.ts --outdir dist --target bun

# --- Runtime ---
FROM oven/bun:1.1-alpine

WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json .

ENV NODE_ENV=production
EXPOSE 3000

CMD ["bun", "dist/index.js"]

For a Hono API (the most popular Bun web framework):

FROM oven/bun:1.1-alpine

WORKDIR /app
COPY bun.lockb package.json ./
RUN bun install --frozen-lockfile

COPY . .

ENV NODE_ENV=production
EXPOSE 3000

CMD ["bun", "run", "src/index.ts"]

sota.io detects the EXPOSE directive and routes traffic to port 3000 automatically.

2. A Minimal Hono API

import { Hono } from "hono"

const app = new Hono()

app.get("/", (c) => c.json({ status: "ok", runtime: "bun" }))

app.get("/health", (c) => c.json({ healthy: true }))

export default {
  port: parseInt(process.env.PORT || "3000"),
  fetch: app.fetch,
}

3. PostgreSQL with Bun

sota.io injects DATABASE_URL automatically. Use the postgres package (works with Bun's Node.js compatibility layer):

import postgres from "postgres"

const sql = postgres(process.env.DATABASE_URL!, {
  ssl: { rejectUnauthorized: false },
  max: 10,
})

// Type-safe queries
interface User {
  id: number
  email: string
  created_at: Date
}

const users = await sql<User[]>`
  SELECT id, email, created_at FROM users
  WHERE created_at > NOW() - INTERVAL '7 days'
`

Or with Drizzle ORM (fully Bun-compatible):

import { drizzle } from "drizzle-orm/postgres-js"
import postgres from "postgres"

const client = postgres(process.env.DATABASE_URL!)
const db = drizzle(client)

4. Deploy

npm install -g @sota-io/cli
sota auth login
sota deploy

sota.io builds your Docker image, injects DATABASE_URL, provisions TLS, and routes traffic. Your Bun app is live in Germany in under 2 minutes.

Bun's Performance Impact on Hosting Costs

Bun's speed profile changes the economics of cloud hosting:

MetricNode.jsBunImprovement
Cold start~200ms~10ms20× faster
npm install (clean)30s1s30× faster
HTTP requests/sec (simple)~70k~110k~60% faster
Image size (same app)~180 MB~80 MB55% smaller

On sota.io's flat-rate pricing (€9/month, 2 GB RAM), smaller images mean faster deploys and lower build times. The €9 price point fits a Bun app serving tens of thousands of daily users.

Comparison: sota.io vs Railway vs Render vs Oven.sh

sota.ioRailwayRenderOven.sh
EU Data Residency✅ Germany (default)⚠️ Optional⚠️ Frankfurt available❌ US only
GDPR EU DPA✅ EU entity❌ US entity❌ US entity❌ US entity
Bun Support✅ Docker✅ Docker✅ Docker✅ Native
Pricing ModelFlat (€9/mo, 2 GB)Usage-basedUsage-basedUsage-based
Managed PostgreSQL✅ Included✅ Add-on (€)✅ Add-on (€)❌ External
Cold StartsNone (always-on)Possible (free tier)Possible (free tier)None

EU Verticals Where Bun Shines

AI agent backends — LangChain.js, Vercel AI SDK, and OpenAI SDK are all Bun-compatible. Bun's speed reduces per-request cost for LLM orchestration pipelines that must stay within the EU (healthcare AI, legal tech, fintech copilots).

Fintech microservices — High-throughput payment processing, currency conversion, and transaction APIs benefit from Bun's reduced latency and built-in TypeScript support. BaFin and EBA require EU data residency.

Real-time APIs — WebSocket servers and SSE endpoints for dashboards, live feeds, and collaborative tools. Hono's WebSocket helpers work natively on Bun.

Internal tooling — EU companies with strict data governance policies can run internal APIs on Bun without sending data to US infrastructure.

What sota.io Gives You

npm install -g @sota-io/cli
sota auth login
sota deploy

Your Bun app is live in Germany.


See also: Deploy Deno 2.0 to Europe · Deploy Node.js to Europe · Deploy an AI Agent to Europe