A personal HTML hub with built-in access control for the vibe-coding era.
In the age of AI-assisted coding, HTML has become the better document format. With a single prompt, anyone can generate rich, interactive pages -- no design skills required. People are creating HTML pages for personal use every day and sharing them with family, friends, and colleagues.
PageGate is built for this personal HTML era. Unlike generic HTML hosting services, PageGate gives you a fully controllable access control system as its core feature. You decide exactly who can see each page -- whether it's open to the world, restricted to approved visitors, or completely private.
Authentication is central to this vision. PageGate currently supports DingTalk OAuth login, with WeChat login already wired in for deployments that need it. Each login provider lets you gate access to the people in your life, not just anonymous internet traffic.
This is what sets PageGate apart: it's not just hosting -- it's your personal gateway to sharing HTML with the right people.
PageGate 不是普通的静态 HTML 托管。
它的重点是:
- 让你发布自己生成的 HTML 页面
- 让每个页面都带上清晰的访问控制
- 让“谁能看、什么时候能看”变成一个实时决策,而不是预先写死的白名单
页面支持三种权限:
public:任何人都能看approval:访客登录后,需要你实时审批private:只有页面 owner 能看
PageGate 最重要的 feature 不是上传页面,而是实时授权。
当访客访问一个 approval 页面时,流程是:
访客打开页面
-> 用钉钉 / 微信登录
-> PageGate 记录为待审批
-> OpenClaw watcher 通过 SSE 收到事件
-> OpenClaw 把消息发到你的微信 / 其它通知通道
-> 你直接回复 1 / 2,或回复“通过” / “拒绝”
-> 访客页面立刻刷新,得到结果
这件事的价值在于:
- 它是实时的,不需要你提前维护访客名单
- 它是轻量的,审批动作就在消息里完成
- 它是自然的,适合家庭成员、朋友、同事之间的小范围分享
如果你只是想用起来,不要先研究部署,也不要先准备任何 token。
直接把下面这段话贴给 OpenClaw:
请先下载安装 PageGate 的 OpenClaw skill,并开始 PageGate onboard。
安装命令:
curl -fsSL https://raw.githubusercontent.com/littlechild9/pagegate/main/openclaw-skill/install.sh | bash
安装完成后,继续在 OpenClaw 聊天里完成 onboarding。
后续的托管服务器 / 自部署服务器选择、给你的 PageGate 起名字、PageGate API token 保存、通知路由和 watcher 启动,都在聊天里的 onboard 流程里完成。托管模式会默认使用 http://115.190.148.77:8888。如果后续需要 keepalive cron,由 OpenClaw 主 agent 在聊天流里按提示处理,不作为本地安装脚本的默认步骤。
完成注册后,每个用户都会拿到一个自己的个人 PageGate 入口,例如 https://your-domain.com/<username>。后续发布的页面会挂在这个入口下面,canonical URL 形如 https://your-domain.com/<username>/<slug>/。
配置完成后,你通常只需要继续对 OpenClaw 说:
把 /absolute/path/page.html 发布到 PageGate,slug 用 my-page,标题用 我的页面,access 用 approval。
发布成功后,这个页面会出现在你的个人 PageGate 下,例如 https://your-domain.com/<username>/my-page/。旧的扁平 https://your-domain.com/my-page 只保留兼容跳转,不再是主链接。
README 里只保留一种推荐集成方式:SSE watcher。
openclaw-skill/install.sh:安装 skillopenclaw-skill/scripts/pagegate_onboard.sh:给主 agent 用的 onboarding wrapper;底层 Python 只写结果文件openclaw-skill/scripts/start-watcher.sh:启动并守护 watcheropenclaw-skill/scripts/check-watcher.sh:检查 watcher 健康并在必要时重启openclaw-skill/scripts/register_watch_cron.sh:供 OpenClaw 主 agent 注册 keepalive cron 的 wrapperopenclaw-skill/scripts/pagegate_watch.py:同步/api/pending,订阅/api/events/streamopenclaw-skill/scripts/pagegate_client.sh:发布、审批、更新、删除页面的 wrapper
如果你确实要手工启动 watcher:
cd ~/.openclaw/workspace/skills/pagegate-client
./scripts/start-watcher.sh
# 如果后续要加 keepalive cron,让 OpenClaw 主 agent 在聊天里处理如果你想完全控制数据、域名、登录配置和 token,再看这一部分。
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp config.example.yaml config.yaml至少修改这些配置:
admin_token: "your-random-secret-token"
registration:
mode: "open"
server:
host: "0.0.0.0"
port: 8888
base_url: "https://your-domain.com"
session_secret: "another-random-secret"启动:
python3 server.py开启注册后,PageGate 的默认链接结构是:
/<username>:这个用户的个人 PageGate 首页/<username>/<slug>/:这个用户发布页面的 canonical URL/<slug>:兼容旧链接时保留;如果命中用户页面,会重定向到/<username>/<slug>/
推荐直接使用本地包装脚本:
bash scripts/run_server.sh user@your-server your-domain.com它会:
- 在本地生成或复用部署密钥
- 渲染部署用
config.yaml - 同步代码到远端
- 在远端调用
deploy.sh - 自动完成 Nginx、SSL 和 systemd 配置
如果你已经把代码放到远端,也可以直接运行:
sudo bash deploy.sh your-domain.com自托管时,approval 页面要依赖你自己的登录配置。
推荐优先配置钉钉:
dingtalk:
app_key: "dingxxxxxxxxxxxxxxxx"
app_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxx"回调地址:
${server.base_url}/auth/dingtalk/callback
如果你要支持微信扫码登录:
wechat:
app_id: "wxxxxxxxxxxxxxxxxxxx"
app_secret: "xxxxxxxxxxxxxxxxxxxxxxx"回调地址:
${server.base_url}/auth/wechat/callback
更完整的接入边界、移动端场景说明与改造建议见 WECHAT_OAUTH.md。
当你的自托管服务器准备好之后,继续把下面这段话贴给 OpenClaw,把域名换成你自己的:
请开始 PageGate onboard,并使用我自托管的服务器 https://your-domain.com。
如果服务器支持注册,请直接让我给这个 PageGate 起个名字,并完成 quick-register。
注册完成后请直接告诉我 PageGate API token,并保存到本地 .env。
如果 quick-register 成功,也请把返回的 `username`、`pagegate_name` 和 `pagegate_url` 一起告诉我,后续发布页面会使用 `/<username>/<slug>/` 作为主链接。
如果服务器关闭注册,再向我询问现有的 PageGate API token。
如果你是通过 bash scripts/run_server.sh user@your-server your-domain.com 部署的,脚本结束时会直接显示 dashboard 地址和 super-admin token。
server.py:FastAPI 后端templates/:登录页、等待审批页、Dashboardpages/:发布后的 HTML 页面data/:页面索引、访客、用户数据openclaw-skill/:OpenClaw skill 与 watcher
MIT