1. EasyHost
  2. Guides
  3. Koa
  4. Environment variables

Koa environment variables in production

.env files are never uploaded to EasyHost. Here is how to set variables for Koa, and when each one takes effect.

Last updated November 9, 2026

How Koa reads variables

Koa has no browser bundle of its own, so every variable is server-only and read from process.env at runtime.

Set your variables

npx ezhst env set SESSION_SECRET=change-me
npx ezhst env import .env
npx ezhst env list
npx ezhst redeploy

Variables apply on the next deploy or redeploy.

What EasyHost provides

VariableValueAvailable
NODE_ENVproductionWhen the app runs, not during install or build
PORT3000Build and runtime
HOST0.0.0.0When the app runs
HOSTNAME0.0.0.0Build and runtime

Your own variables are available in both the build and the running app.

Common problems

See the Koa hub for every Koa guide, or free Koa hosting for what is included.

Frequently asked questions

Are my .env files uploaded?

No. ezhst deploy skips every .env* file. Use ezhst env set or ezhst env import.

Start for free

Install the skill, choose Global or Local, then tell your agent to deploy. No credit card, no config files.

npx ezhst skill install