diff --git a/docs/guide/faq.md b/docs/guide/faq.md index 0f0a3161..cdf76525 100644 --- a/docs/guide/faq.md +++ b/docs/guide/faq.md @@ -33,7 +33,9 @@ For local network access: http://:3006 ``` -For internet access, set up a tunnel (Cloudflare Tunnel, Tailscale, or ngrok). +For internet access: +- If the server has a public IP, access it directly (use HTTPS via reverse proxy for production) +- If behind NAT, set up a tunnel (Cloudflare Tunnel, Tailscale, or ngrok) ### What's the access token for? diff --git a/docs/guide/how-it-works.md b/docs/guide/how-it-works.md index 233b59e2..05ff0fcd 100644 --- a/docs/guide/how-it-works.md +++ b/docs/guide/how-it-works.md @@ -6,7 +6,7 @@ HAPI consists of three interconnected components that work together to provide r ``` ┌────────────────────────────────────────────────────────────────────────────┐ -│ Your Local Machine │ +│ Your Machine (Local or Server) │ │ │ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │ │ │ │ │ │ │ │ @@ -41,6 +41,8 @@ HAPI consists of three interconnected components that work together to provide r └────────────────────────────────────────────────────────────────────────────┘ ``` +> **Note:** The server can run on your local desktop or a remote server (VPS, cloud, etc.). If deployed on a server with a public IP, tunneling is not required. + ## Components ### HAPI CLI diff --git a/docs/guide/installation.md b/docs/guide/installation.md index cef6b787..5c0d49ae 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -70,6 +70,11 @@ bun build:single-exe ## Server setup +The server can be deployed on: + +- **Local desktop** (default) - Run on your development machine +- **Remote server** - Deploy on a VPS, cloud server, or any machine with network access + Start the server: ```bash @@ -142,15 +147,22 @@ Each machine gets a unique ID stored in `~/.hapi/settings.json`. This allows: ### Remote access -Cloudflare Tunnel (recommended): +If the server is deployed on a machine with a **public IP**, you can access it directly via `http://your-server-ip:3006`. Use HTTPS (via reverse proxy like Nginx or Caddy) for production. + +If the server is behind NAT, use one of these options: + +
+Cloudflare Tunnel (recommended for NAT) https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/ ```bash export WEBAPP_URL="https://your-tunnel.trycloudflare.com" ``` +
-Tailscale: +
+Tailscale https://tailscale.com/download @@ -163,12 +175,15 @@ Access via your Tailscale IP: ``` http://100.x.x.x:3006 ``` +
-ngrok: +
+ngrok ```bash ngrok http 3006 ``` +
### Telegram setup diff --git a/docs/guide/quick-start.md b/docs/guide/quick-start.md index 672d77e4..0dda463d 100644 --- a/docs/guide/quick-start.md +++ b/docs/guide/quick-start.md @@ -43,13 +43,7 @@ This starts Claude Code wrapped with HAPI. The session appears in the web UI. Open your browser: ``` -http://localhost:3006 -``` - -Or from another device on the same network: - -``` -http://:3006 +http://:3006 ``` Enter your access token to log in. diff --git a/website/src/locales/en.json b/website/src/locales/en.json index 10a19009..f5f57bff 100644 --- a/website/src/locales/en.json +++ b/website/src/locales/en.json @@ -93,7 +93,7 @@ "title": "How it Works", "step1": { "title": "1. Start on Desktop", - "desc": "Launch HAPI on your local machine. It creates a secure tunnel and keeps your session alive." + "desc": "Launch HAPI on your machine. It keeps your session alive and ready for remote access." }, "step2": { "title": "2. Connect Mobile", diff --git a/website/src/locales/zh.json b/website/src/locales/zh.json index 248f2f34..43b25950 100644 --- a/website/src/locales/zh.json +++ b/website/src/locales/zh.json @@ -93,7 +93,7 @@ "title": "工作原理", "step1": { "title": "1. 桌面启动", - "desc": "在本地机器上启动 HAPI。它会创建一个安全隧道并保持会话活跃。" + "desc": "在你的机器上启动 HAPI。它会保持会话活跃,随时准备远程访问。" }, "step2": { "title": "2. 移动连接",