w wokku
Get Started
~/docs
/
frameworks

# Deploy Astro

Updated · Edit on GitHub ↗

Deploy an Astro site to Wokku — static output or server-rendered (SSR).

Prerequisites

1. Create the app

Apps → New App → server, name my-astro-site, box size, Create.

2a. Server-rendered (SSR)

Add the Node adapter so Astro builds a server you can run:

bash
npx astro add node
js
// astro.config.mjs
import node from "@astrojs/node";
export default defineConfig({ output: "server", adapter: node({ mode: "standalone" }) });

Procfile:

procfile
web: HOST=0.0.0.0 PORT=$PORT node ./dist/server/entry.mjs

2b. Static output

For a fully static site (output: "static", the default), astro build
produces dist/. Serve it with a tiny static server:

text
# package.json
"scripts": { "build": "astro build", "start": "npx serve dist -l $PORT" }
procfile
web: npm start
// note

3. Environment variables

bash
wokku config:set my-astro-site NODE_ENV=production

PUBLIC_* env vars are inlined at build time — set them before deploying.

4. Deploy

bash
git remote add wokku git@git.wokku.cloud:my-astro-site
git push wokku main

Live at https://my-astro-site.wokku.app.

Custom domain

Custom Domains — SSL is automatic.

Troubleshooting

  • Blank page / crash — for SSR, bind to HOST=0.0.0.0 PORT=$PORT.
  • PUBLIC_* not applied — build-time; redeploy after changing it.

Next steps

Was this page helpful?