Skip to content

Commit f1e7dac

Browse files
docs: update README for deployment options and add GitHub Actions workflow for Cloudflare deployment
- Revised the README to clarify deployment options and steps for self-hosting, including a new table for deployment modes. - Added a GitHub Actions workflow for automatic deployment to console.botschat.app on pushes to the main branch, including setup for Node.js and Cloudflare integration.
1 parent 37a8062 commit f1e7dac

2 files changed

Lines changed: 77 additions & 18 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Deploy BotsChat to console.botschat.app on every push to main.
2+
# Requires repo secrets: CLOUDFLARE_API_TOKEN (and CLOUDFLARE_ACCOUNT_ID if not in wrangler.toml).
3+
4+
name: Deploy to console.botschat.app
5+
6+
on:
7+
push:
8+
branches: [main]
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 24
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build web
26+
run: npm run build -w packages/web
27+
28+
- name: Deploy to Cloudflare
29+
uses: cloudflare/wrangler-action@v3
30+
with:
31+
command: deploy --config wrangler.toml
32+
workingDirectory: .
33+
env:
34+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
35+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
36+
37+
- name: Apply D1 migrations (remote)
38+
run: npm run db:migrate:remote
39+
env:
40+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

README.md

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,36 +71,42 @@ BotsChat introduces a few UI-level concepts that map to OpenClaw primitives:
7171

7272
### Prerequisites
7373

74-
- [Node.js](https://nodejs.org/) 22+
75-
- [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/)
7674
- An [OpenClaw](https://github.com/openclaw/openclaw) instance
75+
- For self-hosting (Option B or C): [Node.js](https://nodejs.org/) 22+, [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/install-and-update/)
7776

78-
### Step 1: Clone and Install
77+
### Choose Your Deployment
7978

80-
```bash
81-
git clone https://github.com/botschat-app/botsChat.git
82-
cd botsChat
83-
npm install
84-
```
79+
BotsChat is **100% open source** — the [same code](https://github.com/botschat-app/botsChat) runs whether you use our hosted console, run it locally, or deploy to your own Cloudflare. The only difference is *where* the server runs; your API keys and data always stay on your machine.
8580

86-
### Step 2: Deploy BotsChat Server
81+
| Mode | Best for | Clone repo? |
82+
|------|----------|-------------|
83+
| **A. Hosted Console** | Zero setup, start in minutes | No |
84+
| **B. Run Locally** | Development, no cloud account | Yes |
85+
| **C. Deploy to Cloudflare** | Remote access (e.g. from phone) | Yes |
8786

88-
Choose one of the three options below:
87+
Pick one below and follow its steps, then continue to [Install the OpenClaw Plugin](#install-the-openclaw-plugin).
8988

90-
#### Option A: Use Hosted Console (Recommended)
89+
---
9190

92-
The easiest way to get started — no deployment needed. We run a hosted BotsChat instance at **[console.botschat.app](https://console.botschat.app)**. Just sign up, generate a pairing token, and connect your OpenClaw instance directly.
91+
#### Option A: Hosted Console (Recommended)
9392

94-
Your API keys and data still stay on your machine — the hosted console only relays chat messages via WebSocket, exactly the same as a self-hosted deployment.
93+
We run the same open-source stack at **[console.botschat.app](https://console.botschat.app)**. No clone, no deploy: open the link → sign up → create a pairing token → connect OpenClaw.
9594

96-
> Skip to [Step 3](#step-3-install-the-openclaw-plugin) after signing up.
95+
Your API keys and data still stay on your machine; the hosted console only relays chat messages via WebSocket.
96+
97+
→ Then go to [Install the OpenClaw Plugin](#install-the-openclaw-plugin).
98+
99+
---
97100

98101
#### Option B: Run Locally
99102

100-
Wrangler uses [Miniflare](https://miniflare.dev) under the hood, so D1, R2, and Durable Objects all run locally — **no Cloudflare account needed**.
103+
Clone, install, and run the server on your machine. Wrangler uses [Miniflare](https://miniflare.dev), so D1, R2, and Durable Objects all run locally — **no Cloudflare account needed**.
101104

102105
```bash
103-
# One-command startup: build web → migrate D1 → start server on 0.0.0.0:8787
106+
git clone https://github.com/botschat-app/botsChat.git
107+
cd botsChat
108+
npm install
109+
# One-command startup: build web → migrate D1 → start on 0.0.0.0:8787
104110
./scripts/dev.sh
105111
```
106112

@@ -124,11 +130,19 @@ Other dev commands:
124130
./scripts/dev.sh logs # Tail remote gateway logs
125131
```
126132

133+
→ Then go to [Install the OpenClaw Plugin](#install-the-openclaw-plugin).
134+
135+
---
136+
127137
#### Option C: Deploy to Cloudflare
128138

129-
For remote access (e.g. chatting with your agents from your phone), deploy to Cloudflare Workers. The free tier is more than enough for personal use.
139+
For remote access (e.g. chatting from your phone), deploy the same code to Cloudflare Workers. The free tier is enough for personal use.
130140

131141
```bash
142+
git clone https://github.com/botschat-app/botsChat.git
143+
cd botsChat
144+
npm install
145+
132146
# Create Cloudflare resources
133147
wrangler d1 create botschat-db # Copy the database_id into wrangler.toml
134148
wrangler r2 bucket create botschat-media
@@ -147,7 +161,11 @@ wrangler secret put JWT_SECRET # Set a production JWT secret
147161
| D1 | Database (users, channels, tasks) | 5M reads/day, 100K writes/day |
148162
| R2 | Media storage | 10GB, no egress fees |
149163

150-
### Step 3: Install the OpenClaw Plugin
164+
→ Then go to [Install the OpenClaw Plugin](#install-the-openclaw-plugin).
165+
166+
---
167+
168+
### Install the OpenClaw Plugin
151169

152170
After the BotsChat server is running, connect your OpenClaw instance to it.
153171

0 commit comments

Comments
 (0)