Skip to main content

Astro Hosting
for Static and SSR

Deploy Astro sites to a managed Docker platform. Works with the Node adapter for SSR, or as a static build. No serverless limits, no cold starts.

# Dockerfile
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 4321
CMD ["node", "./dist/server/entry.mjs"]
  • 🇪🇺 Hosted in Germany, GDPR by default
  • 🐳 Run Docker apps (Compose supported)
  • 🗄️ Built-in MySQL, Postgres, Redis & volumes
  • 🔐 HTTPS, metrics, and isolation per project
  • 💳 Per-project cost tracking · from €2.5/month

Static output vs. SSR: what you need to host

Astro can build two different kinds of output, and they have different hosting needs.

Static output

The default. npm run build produces plain HTML, CSS, and JS in the dist/ folder. Any static file host or CDN can serve it. On Hostim you can still deploy it in a container (e.g. behind Caddy or Nginx) if you want the same workflow as your dynamic services.

SSR with the Node adapter

When you install @astrojs/node and set output: 'server', Astro emits a long-running Node server. That server needs a container, a port, and a persistent runtime — not a serverless function. This is where most static-focused hosts fall short.

How Astro SSR apps are typically hosted

A production SSR Astro setup looks like a regular Node web service:

  • Container: The Node server from @astrojs/node runs in a container, usually on port 4321 or 3000.
  • Static assets: Client-side JS and images are served from the same container, or offloaded to a CDN.
  • Environment variables: API keys and DB URLs are injected at runtime. Astro exposes them via import.meta.env.
  • Database: If you use Astro DB, Drizzle, or a direct Postgres client, the DB runs as a separate service your container connects to.

Astro hosting on Hostim.dev

A managed Docker platform that maps directly to the SSR Astro runtime.

Docker or Git Deploy

Push a Dockerfile or connect your Git repo. Hostim builds the image and runs the Node server behind HTTPS.

Works for static too

Deploy a static Astro build in a Caddy or Nginx container. Same dashboard, same pricing, no separate CDN product.

Managed Databases

Add Postgres, MySQL, or Redis with one click and connect from your Astro app via environment variables.

EU Hosting

Workloads run in Germany (Falkenstein). Low latency for European users and GDPR-friendly by default.

Is there free Astro hosting?

For a static Astro build, many providers will host it for free. For SSR, the free tiers usually have trade-offs:

  • Serverless cold starts that add hundreds of milliseconds to the first request.
  • Hard execution time limits that break long pages or streaming responses.
  • No persistent disk, so uploads and caches vanish on each deploy.

Free tiers are fine for prototypes. For a production site with real traffic, a small paid container is usually cheaper and more predictable than scaling a serverless plan.

Static host vs. container host

Static host (Netlify, Cloudflare Pages, GitHub Pages): great for pure static output, but SSR means adding serverless functions with their own limits and pricing model.

Container host (Hostim, Fly, Render): one deploy target whether your Astro app is static or SSR. The runtime is the same Node server you run locally.

Is Hostim.dev a good fit?

Who it is for

  • Developers deploying Astro SSR with the Node adapter.
  • Teams that want one host for both the Astro site and a Postgres database.
  • Sites that need EU hosting for GDPR or latency reasons.
  • Projects that outgrew free tier cold starts.

Who it is not for

  • Pure static sites where a free CDN is enough.
  • Teams that want edge rendering in many regions (single-region host).
  • Users looking for a click-to-install cPanel experience.

How to host an Astro app on Hostim

  • Pick your output mode: keep Astro's default static output, or install @astrojs/node and set output: 'server' for SSR.
  • Add a Dockerfile: a small Node 20 image that runs npm ci && npm run build, then starts node ./dist/server/entry.mjs for SSR or serves dist/via Caddy for static.
  • Create a project: group the Astro app with any database or storage it needs.
  • Add services: attach Postgres, MySQL, or Redis if your site reads from a database.
  • Set environment variables: DB connection strings, public site URLs, API keys. Astro reads them via import.meta.env.
  • Deploy: push to Git or push the image. Hostim builds, runs, and keeps it up.

Ready to deploy?

Get your Astro site running in minutes.

Frequently asked questions

Can I host an Astro site on Hostim?

Yes. Static Astro builds run from a small Node container that serves the dist folder. SSR Astro builds run as a long-lived Node app — Hostim treats both the same way.

Does Hostim support Astro server endpoints and hybrid rendering?

Yes. With the Node adapter, Astro server endpoints run inside the container behind HTTPS, with logs and metrics included.

How much does Astro hosting cost on Hostim?

A typical Astro deployment on Hostim is one app container plus one managed database. The app starts at €2.50/month and the database is free on the included tier, so a small production stack runs from €2.50/month.

Where is my Astro site hosted?

In Germany. Hostim apps and databases run on bare-metal servers in Falkenstein, with no AWS, GCP or Azure dependency — so data stays in the EU and GDPR compliance stays simple.

Can I attach a database to my Astro app?

Yes. Managed PostgreSQL, MySQL and Redis attach via environment variables — useful for SSR Astro apps with dynamic content.