POPOPXBot Studio bot.popopx.chat

AGPL-3.0-only · Open console

A bot factory for the identity-less messenger

Create a bot, get its permanent address, then let rules answer, forward enquiries to your support group and open a ticket per customer. Everything runs on loopback, nothing is bundled.

  • Zero metadata
  • 100% self-hosted
  • One-command deploy
  • 24/7 bot plus human agents
  • No-code rules and plugins
Install on Ubuntu 22.04
git clone https://github.com/popopx-chat/popopx-bot-studio.git
cd popopx-bot-studio && ./install_ubuntu22.sh --check

The installer only reads the system until you run it without --check; popopx-cli is fetched at runtime, never committed.

Languages
18 built in
Plugins
4 on one bus
Listening
127.0.0.1 only
Ledger
SQLite 0600 on disk

01 / FEATURES

Self-hosted bot factory, auto-reply and message routing

BotFather-grade control over many isolated bots, with the reply, routing and ticket flow you would otherwise script by hand.

Multi-bot sandbox factory

Every bot gets its own popopx-cli process, its own cli-data directory, its own control port and its own SQLite files, started and stopped from one screen.

  • run-cli.sh
  • cli.pid
  • cli-data/
  • ports 5230+

Permanent address

Each bot gets its own CLI data directory and permanent contact link, so reconnecting users always reach the same bot.

No-code rules

Match a keyword, exact phrase or regular expression and reply with a template. Cooldown keeps a chatty user from being spammed.

Routing and tickets

Forward enquiries into a support group with a #T ticket id; an operator answers with the ticket id and the reply goes back to the customer.

  • Routing
  • #T-0001 → Auto-reply
  • 24/7 agent desk

Private key and local sovereignty

The identity key, the ledger and every message log live in files you own with mode 0600. There is no cloud account to lose and no vendor holding a copy.

Extensible plugin bus

Inbound messages pass plugins first, then rules, then routing. A plugin can reply, forward or stay silent without touching the engine.

Plugins

  1. auto_reply Layered Q&A and command menus Answers from a keyword table, offers a numbered menu and falls back to a human handoff.
  2. msg_router Cross-chat and cross-group routing Aggregates alerts, mirrors a direct message into a group and keeps the ticket id attached.
  3. llm_bridge OpenAI-compatible assistant Point it at any compatible base URL, set the model, and the bridge asks only when a rule did not match.
  4. webhook_relay Inbound alerts and outbound callbacks Turns an external monitor webhook into a bot message, and a customer reply into your own webhook call.

02 / SECURITY

What stays on your machine

A hosted bot platform holds your identity, your contacts and your message history. A self-hosted studio holds the same files for you instead.

A hosted bot platform holds your identity, your contacts and your message history. A self-hosted studio holds the same files for you instead.
Dimension POPOPX Bot Studio Hosted platform bot
Identity key Local file, mode 0600 Held by the provider
Message ledger SQLite in var/studio Provider database
Encryption End to end per contact Transport only
Isolation One process and one data dir per bot Shared tenant space
Account risk Nothing to ban: no account Ban or rate limit at will
Metadata No phone number, no user id Contact graph and usage stats

The engine refuses to start on a non-loopback address unless STUDIO_ALLOW_LAN=1 is set on purpose.

03 / DEPLOY

Install and first run

Four paths, the same engine: a production Linux box, a Mac you keep running, a development checkout, or the three clicks inside the console.

Installs Python 3.11, creates a system user, writes a systemd unit and pulls popopx-cli for your architecture.

sudo apt update && sudo apt install -y git python3.11-venv
git clone https://github.com/popopx-chat/popopx-bot-studio.git
cd popopx-bot-studio

./install_ubuntu22.sh --dry-run          # plan only, nothing written
sudo ./install_ubuntu22.sh --mode native

systemctl status popopx-bot-studio
sudo -u popopx-studio cat /etc/popopx-bot-studio/.env
  • Open the console through a reverse proxy on your own host: the engine binds 127.0.0.1:8090 and never 0.0.0.0.
  • Flags: --check validates the host, --mode native installs in place, --dry-run prints the plan, --uninstall removes the service and keeps your data.

04 / OPEN API

A Telegram-shaped API on an isolated network

Call sendMessage with the bot token, register a webhook, or poll getUpdates. The admin console and the API share one engine and one loopback port.

Browser Admin Studio HTTPS · X-Studio-Token POPOPX Bot Studio Engine Python 3.11 · FastAPI · 127.0.0.1:8090 Multi-Bot Mgr Rule & Router Open API & Hook Plugin Bus auto_reply · msg_router llm_bridge · webhook_relay Isolated popopx-cli ws://127.0.0.1:5230..5299 cli-data · own SQLite · SMP
Strict loopback: nothing between the engine and the bot sandbox leaves the machine.

Send a message

Reply to any contact or group the bot already reaches.

curl -X POST http://127.0.0.1:8090/bot$BOT_TOKEN/sendMessage \
  -H "content-type: application/json" \
  -d '{"chat_ref":"<contact>","text":"Deploy finished."}'

Register a webhook

Push inbound events to your own endpoint instead of polling.

curl -X POST http://127.0.0.1:8090/bot$BOT_TOKEN/setWebhook \
  -d '{"url":"https://intranet.local/hooks/popopx"}'

Poll for updates

Read the ring buffer behind the gateway, newest last.

curl "http://127.0.0.1:8090/bot$BOT_TOKEN/getUpdates?limit=50"

Tokens and admin credentials are read from .env on your host; the site never sends anything anywhere.

05 / FAQ

Questions before the first install

Licence, agents, migration and the difference to a commercial service account.

Can I use this commercially under AGPL-3.0-only?

Yes. AGPL-3.0 obliges you to share the source of the studio itself when you offer a modified version over a network, including changes to the engine and the plugins. Your bots, rules, reply texts and message data are your content and are not affected. The licence text is in the repository root.

How do several human agents work the same queue?

Routing forwards an enquiry into a support group with a #T ticket id and the bot keeps the original chat reference. Any agent replies with that ticket id, and the engine sends the answer back to the customer only. Every hand is written to the audit log with the actor and the timestamp.

How do I move a running bot to another server?

Export a bundle from the cold-backup screen: the bot is stopped, its cli-data directory, keys and settings are packed, and the bot starts again. Copy the archive to the new host, restore it, and the permanent contact address stays the same because identity lives in those files, not in a vendor account.

How is this different from a commercial service account?

A service account is a rented identity: the provider issues the token, keeps the message graph, sets the rate limits and can end the account. The studio issues the token itself, keeps the ledger on your disk and has no account to close. The trade is that you own the uptime, the backups and the updates.

Why does it only listen on 127.0.0.1?

The console and the Open API carry an admin token, so an exposed port is the most likely way in. The engine validates the bind address at start-up and refuses a non-loopback host unless you set STUDIO_ALLOW_LAN=1 on purpose. Put Caddy or nginx in front, keep the port closed and add TLS plus your own authentication there.

Does the download of popopx-cli leak anything?

No binary is committed to the repository, because the AGPL licence and the download both point at the official releases. The installer fetches the archive for your operating system and architecture, verifies the SHA-256 checksum, then unpacks it into the data directory. Nothing about your bots is part of that request.

Something wrong or missing? popopx-bot-studio · issues