Bun

GuidesEcosystem

Deploy a Bun application on Render

Render is a cloud platform that lets you flexibly build, deploy, and scale your apps.

It offers features like auto deploys from GitHub, a global CDN, private networks, automatic HTTPS setup, and managed PostgreSQL and Redis.

Render supports Bun natively. You can deploy Bun apps as web services, background workers, cron jobs, and more.

As an example, let's deploy a simple Express HTTP server to Render.

Create a new GitHub repo named myapp. Git clone it locally.

git clone git@github.com:my-github-username/myapp.git
cd myapp

Add the Express library.

bun add express

Define a simple server with Express:

app.ts
import express from "express";

const app = express();
const port = process.env.PORT || 3001;

app.get("/", (req, res) => {
  res.send("Hello World!");
});

app.listen(port, () => {
  console.log(`Listening on port ${port}...`);
});

Commit your changes and push to GitHub.

git add app.ts bun.lockb package.json
git commit -m "Create simple Express app"
git push origin main

In your Render Dashboard, click New > Web Service and connect your myapp repo.

In the Render UI, provide the following values during web service creation:

RuntimeNode
Build Commandbun install
Start Commandbun app.js

That's it! Your web service will be live at its assigned onrender.com URL as soon as the build finishes.

You can view the deploy logs for details. Refer to Render's documentation for a complete overview of deploying on Render.