Skip to content

Bun on a VPS

JS and TS runtime

Category
Dev / Tools
Author
Oven
License
MIT
Version
1.4.2

The script is free · VPS from $2.79 per month · installs in about 30 seconds

Install over SSH

root@vps:~# (command -v unzip >/dev/null || sudo apt install -y unzip) && curl -fsSL https://bun.sh/install | bash

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/oven-sh/bunok
  • Version1.4.2ok

✓ Bun 1.4.2 installed · about 30 seconds

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • JavaScript
  • TypeScript
  • Telegram bots
  • Runtime

Bun is a Node.js-compatible JavaScript and TypeScript runtime. One binary bundles the runtime, package manager, bundler and test runner.

TypeScript runs without a separate compile step, and bun install installs dependencies noticeably faster than npm. Great for Telegram bots, APIs and scripts.

The official script installs Bun into the user's home folder (~/.bun).

  • Runs TypeScript without a build step
  • Fast bun install
  • Compatible with npm packages and Node.js APIs
  • Built-in test runner and bundler
  • Built-in SQLite and HTTP server

Recommended plan

For Bun: at least 1 vCPU, 2 GB RAM and 10 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 11 · Debian 12 · AlmaLinux 9

How to install

Three steps in the bot or one command over SSH; installation takes about 30 seconds.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Bun

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Log in to SSH again or run source ~/.bashrc

    The bot will send the server address and login details to the chat.

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 11, Debian 12, AlmaLinux 9.

Install command
(command -v unzip >/dev/null || sudo apt install -y unzip) && curl -fsSL https://bun.sh/install | bash

After installation

  1. 1.Log in to SSH again or run source ~/.bashrc
  2. 2.Check the version: bun --version
  3. 3.Create a project with bun init, run it with bun run index.ts

Bun FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

Will Bun replace Node.js?

For most bots and APIs, yes: Bun is compatible with npm packages. But if a library relies on rare Node.js APIs, test it on Bun before switching.

How do I update Bun?

Run bun upgrade.

How do I keep my app running?

Use PM2 (pm2 start --interpreter ~/.bun/bin/bun index.ts) or a systemd service.

Bun installs at checkout — in the bot.