🤖 Open-source, local-first alternative to Grok Bot, OpenAI dots and Claude Duet. Your own AI bots on any model: GPT, Claude, Gemini, Grok, DeepSeek, Kimi, GLM and 70+ more through one Modelflare key. Reach them in the app, WeChat or Feishu; they remember you, work in the background, run commands and use your computer. Pay per use.
Python ai-agentai-assistantchatbotclaudecomputer-usedeepseekdesktop-appdshelectronfeishugeminigptgrokllmlocal-firstmodelflaremulti-modelopenai-compatiblepersonal-ai-agentwechat
# 官网静态文件。TLS、域名由宿主机的 Caddy(/etc/caddy/sites.d)负责,这里只在容器内 8080 提供文件。
map $uri $localized_404 {
default /404.html;
~^/en(?:/|$) /en/404/index.html;
~^/ja(?:/|$) /ja/404/index.html;
~^/ko(?:/|$) /ko/404/index.html;
~^/ru(?:/|$) /ru/404/index.html;
}
server {
listen 8080;
server_name _;
root /srv/site/current;
absolute_redirect off;
server_tokens off;
charset utf-8;
# 默认等级 1 太松,等级要在这里给够。压缩只在这里做:Caddy 的站点配置没有 encode,只管转发。
# gzip_proxied 必须是 any:Caddy 转发时带 Via 头,默认的 off 会让 nginx 不压缩代理来的请求
gzip on;
gzip_comp_level 6;
gzip_proxied any;
gzip_min_length 256;
gzip_vary on;
gzip_types text/css application/javascript text/javascript application/json image/svg+xml application/xml text/plain application/manifest+json;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# 带哈希的构建产物与字体:长缓存
location /_astro/ { add_header Cache-Control "public, max-age=31536000, immutable"; add_header X-Content-Type-Options "nosniff" always; }
location /fonts/ { add_header Cache-Control "public, max-age=31536000, immutable"; add_header X-Content-Type-Options "nosniff" always; }
# 机器人精灵图(.webp / .avif):文件名不带哈希,但只在角色重画时才变,缓存一天(过期后用 Last-Modified 重新验证)
location /bots/ { add_header Cache-Control "public, max-age=86400"; add_header X-Content-Type-Options "nosniff" always; }
# GitHub 星数:builder 每 2 分钟刷新,不在构建产物里。文件还没生成时返回 404,页面继续用构建时的数字
location = /stars.json {
alias /srv/site/live/stars.json;
add_header Cache-Control "public, max-age=60";
add_header X-Content-Type-Options "nosniff" always;
}
# 目录 Bot:地址写在 App 里(src/botkit/config.ts)。索引和签名要能及时更新,客户端靠 ETag 判断;
# 包和缩略图按内容哈希命名,内容不会变。产物由发布脚本放到 CATALOG_DIR,不在官网的构建产物里
location = /catalog/index.json { root /srv; add_header Cache-Control "no-cache"; add_header X-Content-Type-Options "nosniff" always; }
location = /catalog/index.json.sig { root /srv; add_header Cache-Control "no-cache"; add_header X-Content-Type-Options "nosniff" always; }
location /catalog/ { root /srv; add_header Cache-Control "public, max-age=31536000, immutable"; add_header X-Content-Type-Options "nosniff" always; }
# 页面:价格每天更新,短缓存
location / {
try_files $uri $uri/index.html $uri.html =404;
add_header Cache-Control "public, max-age=300";
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
}
error_page 404 $localized_404;
location = /404.html { internal; }
}