Deploy Bun in minutes

Bun apps deploy on Darmi Cloud through the Dockerfile preset using the official oven/bun image. Add the Dockerfile below, pick the Dockerfile preset, and your server ships behind automatic HTTPS.

Deploy from GitHub Automatic HTTPS subdomain Live build & runtime logs
Step by step

How to deploy Bun

Darmi Cloud doesn't have a dedicated Bun preset yet — but the Dockerfile preset gets you deployed just as fast.

  1. 1

    Add a Dockerfile to your repo

    Commit the Dockerfile below to the root of your Bun repository. Darmi Cloud will build the image from it.

  2. 2

    Sign in with GitHub

    Open darmicloud.tech and sign in with GitHub (or Google). On first sign-in you grant read access so the deploy worker can clone your repositories.

  3. 3

    Import your repository

    Click New Project, pick your Bun repository, and choose the branch to deploy — the default branch is preselected.

  4. 4

    Select the Dockerfile preset

    Choose the Dockerfile preset so Darmi Cloud builds and runs the image from your committed Dockerfile. Set the container port to 3000.

  5. 5

    Add environment variables

    Add any environment variables your app needs (database URLs, API keys, secrets). Mark sensitive values as secrets — they are injected into the container and hidden in the UI afterwards.

  6. 6

    Deploy and watch it go live

    Click Deploy. Watch the live build and runtime logs, and your app goes live on an automatic HTTPS subdomain. Every push to your branch redeploys automatically.

Dockerfile for Bun

Copy this into a file named Dockerfile at the root of your repository.

# syntax=docker/dockerfile:1
FROM oven/bun:1

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

ENV PORT=3000
EXPOSE 3000
# Replace index.ts with your entrypoint
CMD ["bun", "run", "index.ts"]

Tips for Bun on Darmi Cloud

  • Bun.serve reads the port from Bun.env.PORT — default it to 3000 to match the container settings.
  • Frameworks like Hono and Elysia deploy exactly the same way — just point CMD at your entry file.
  • Commit bun.lock so --frozen-lockfile produces reproducible builds.
FAQ

Bun deployment FAQ

Does Darmi Cloud have a native Bun preset?

Not yet — deploy Bun with the Dockerfile preset using the official oven/bun image, as shown in this guide. It builds and ships in minutes.

Can I deploy Hono or Elysia on Darmi Cloud?

Yes. Both run on Bun's HTTP server, so the same Dockerfile works — change the CMD entrypoint to your server file.

Can I use my own custom domain?

Yes. Connect an existing domain or buy one inside Darmi Cloud. DNS is configured automatically and every domain gets free SSL via Let's Encrypt.

Is there a free plan?

Yes. The Free plan deploys one project on an automatic HTTPS subdomain with auto-deploy on every push. Paid plans add custom domains, PR preview deployments and more projects.

Deploy other frameworks

Ready to deploy your Bun app?

Connect GitHub and ship in minutes — on a free HTTPS subdomain, or on your own custom domain.

Deploy Bun now