Open-source project
lyfe00011/levanter avatar
lyfe00011/levanter

Levanter runs several WhatsApp accounts from one Node process and exposes them through an x-api-key HTTP API

Feature-rich WhatsApp bot supporting multiple sessions

2,363 stars7,633 forksJavaScriptLicense varies

At a glance

What is it?
Levanter is a JavaScript WhatsApp bot with plugins, group moderation and an optional REST and webhook API. Its sharpest edges are a forked Baileys dependency, a single shared API key and a media cache that expires after about ten minutes.
Who is it for?
Levanter suits a single operator who wants one process serving a few WhatsApp accounts, with an HTTP API in front for their own app. It does not suit a multi-tenant service, because one API_KEY opens every session, or anyone who needs tagged releases to pin against.
Can I use it commercially?
The repository metadata does not identify a licence. Check the project’s published terms and any component-specific licences before reuse.
Is it still maintained?
Yes. The repository last received commits 18 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • lyfe00011/levanter2,363 ★ · +18
Star history
Repository2026-10-112026-11-25
lyfe00011/levanter2.3k2.4k

18 Stars in the last 45 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

One process, several WhatsApp sessions, addressed by position

Levanter keeps multiple WhatsApp accounts alive inside a single instance. The sessions come from the SESSION_ID entry in config.env, and the API refers to them by positional index: "0" is the first, "1" the second, following the SESSION_ID order. If a request leaves out the session field, it defaults to "0".

Positional addressing has a practical cost. Reorder the values in SESSION_ID and the same index now points at a different account, so a webhook consumer or script that hardcodes "1" will start talking to the wrong number without any error. GET /api/sessions returns each session with an id, a name, a connected flag and a number, and the number is null until the session connects. Poll that endpoint before relying on an index.

The package.json is at version 6.2.1, and the repository has no GitHub releases, so there is no tagged build to pin.

API_MODE has three values, and only turns the bot off in one of them

The API is off by default. API_MODE is a tri-state switch: false (the default) runs the bot alone, true runs commands and exposes the API, and only turns the instance into a pure gateway with no bot commands. The minimal configuration is:

env
API_MODE=true
API_KEY=your-secret-key      # required — every request needs it
PORT=3000                    # port
API_PUBLIC_URL=https://bot.example.com   # public base url (for media links)
API_WEBHOOK_URL=https://your-app.com/hook # optional — receive incoming messages

On start, the bot messages itself a localized quick-start card with the base URL, the auth status and a ready-to-run example. API_PUBLIC_URL is detected automatically on Render and Heroku. Behind a proxy, a custom domain or a plain VPS you must set it yourself, or the media links in webhook payloads will not point at your public address.

A single API_KEY unlocks every session

Authentication is one header, x-api-key. A request without a valid key gets a 401, and when API_KEY is unset the API stays locked. That is safe by default, but there is no finer grain. One key grants access to all sessions, and the project describes the API as intended for single-tenant use.

If you want to give a customer access to their own WhatsApp number while hosting several customers' sessions in the same instance, this design cannot separate them. Anyone holding the key can send from any connected account by changing the session value. The webhook request also carries x-api-key, so the receiving app can verify the call came from your bot, which means the same secret travels in both directions and needs protecting at both ends.

POST /api/send accepts media only as a public URL

Sending goes through POST /api/send. The required fields are to (a phone number such as 919876543210 or a full jid, with [email protected] for a group) and type, which is one of text, image, video, audio or document. Text needs the text field, and media needs url. Optional fields are session, fileName, mimetype, ptt (true sends audio as a voice note) and quoted (the id of a received message to reply to). A successful response looks like { "status": 200, "id": "3EB0XXXXXXXXXXXX" }.

There is no upload path. Media is URL-only: the bot downloads the address you give it, and only http(s) URLs to public hosts are accepted, with private, loopback and metadata hosts blocked. A file that lives on your intranet or a localhost server cannot be sent this way. You must first publish it somewhere reachable. API sends also share the bot's send queue, and the project says to avoid flooding it.

Received media disappears from the API after about ten minutes

With API_WEBHOOK_URL set, the bot POSTs a JSON payload for every incoming message. Its own messages and other bots' messages are skipped. The payload carries session, id, from, sender, pushName, isGroup, timestamp, type, text, quoted and, for media messages only, a media object with mimetype, fileName and a url.

That url points at GET /api/media/:session/:id, which returns the bytes when you send your x-api-key. Received media is cached for roughly ten minutes after arrival. A consumer that is down, slow or queues webhooks for later will find the download gone, and the cache is the only copy the API offers. Fetch the file as soon as the webhook arrives and store it yourself.

Baileys comes from a Bitbucket fork, and a postinstall step force-installs sharp

Two details in package.json affect anyone who builds this from source. The baileys dependency is not an npm version. It is a git URL, git+https://[email protected]/lyfe00011/baileys.git, so the WhatsApp protocol layer is the maintainer's own fork and installs depend on that Bitbucket repository staying reachable.

The postinstall script tries to require sharp and, if that fails, runs yarn add --ignore-engines [email protected]. The flag skips engine version checks, so sharp can end up installed on a Node release it does not declare support for.

The Dockerfile starts FROM quay.io/lyfe00011/md:beta, clones the repository into /root/LyFE/, runs yarn install and starts with npm start. The base image is a beta tag, and the clone is not pinned to any commit.

The README says 11 languages and then lists 12

Responses are localized, and BOT_LANG in config.env selects the language, for example BOT_LANG=es. The README prose claims 11 languages, yet its table lists twelve codes: en, es, fr, hi, bn, id, ur, tr, ru, ar, ml and zh. Whichever count is right, set a code from that table and check the replies yourself.

The ordinary VPS route targets Ubuntu. It installs git, ffmpeg and curl with apt, then Node.js 20.x from the NodeSource setup script, then yarn and pm2 globally, clones into a directory named botName, and runs yarn install. The npm start script launches pm2 start . --attach --name levanter. Koyeb and Render deployments both point at levanter.site.

Editorial conclusion

Levanter suits a single operator who wants one process serving a few WhatsApp accounts, with an HTTP API in front for their own app. It does not suit a multi-tenant service, because one API_KEY opens every session, or anyone who needs tagged releases to pin against. Before deploying, confirm the license yourself, since GitHub shows none while package.json says MIT, and decide whether you accept a Baileys fork pulled from Bitbucket.

Frequently asked questions

What is the Levanter bot?

Levanter is a JavaScript WhatsApp bot that runs multiple sessions from one instance. It has a plugin system, group moderation, media tools and an optional API with webhooks.

What is Levanter on GitHub, and what does it need to run?

The lyfe00011/levanter repository is built on Baileys and uses Node.js 20.x with yarn and pm2 on Ubuntu. ffmpeg is installed alongside git and curl.

Does Levanter have an API for sending WhatsApp messages?

Yes, when API_MODE is true or only. POST /api/send takes to, type and the text or url fields, and every request needs an x-api-key header.

Official sources

  1. Issues
  2. lyfe00011/levanter on GitHub
  3. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/lyfe00011-levanter.svg)](https://hysenlabs.com/projects/lyfe00011-levanter)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/lyfe00011-levanter.svg)](https://hysenlabs.com/projects/lyfe00011-levanter)

Was this useful?