mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
docs: clarify server deployment options and remote access methods
- Support both local and remote server deployment - Add direct public IP access option for remote servers - Remove tunnel requirement messaging - Organize remote access options with details sections
This commit is contained in:
+3
-1
@@ -33,7 +33,9 @@ For local network access:
|
||||
http://<your-computer-ip>: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?
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
<details>
|
||||
<summary>Cloudflare Tunnel (recommended for NAT)</summary>
|
||||
|
||||
https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/
|
||||
|
||||
```bash
|
||||
export WEBAPP_URL="https://your-tunnel.trycloudflare.com"
|
||||
```
|
||||
</details>
|
||||
|
||||
Tailscale:
|
||||
<details>
|
||||
<summary>Tailscale</summary>
|
||||
|
||||
https://tailscale.com/download
|
||||
|
||||
@@ -163,12 +175,15 @@ Access via your Tailscale IP:
|
||||
```
|
||||
http://100.x.x.x:3006
|
||||
```
|
||||
</details>
|
||||
|
||||
ngrok:
|
||||
<details>
|
||||
<summary>ngrok</summary>
|
||||
|
||||
```bash
|
||||
ngrok http 3006
|
||||
```
|
||||
</details>
|
||||
|
||||
### Telegram setup
|
||||
|
||||
|
||||
@@ -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://<your-computer-ip>:3006
|
||||
http://<your-ip>:3006
|
||||
```
|
||||
|
||||
Enter your access token to log in.
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
"title": "工作原理",
|
||||
"step1": {
|
||||
"title": "1. 桌面启动",
|
||||
"desc": "在本地机器上启动 HAPI。它会创建一个安全隧道并保持会话活跃。"
|
||||
"desc": "在你的机器上启动 HAPI。它会保持会话活跃,随时准备远程访问。"
|
||||
},
|
||||
"step2": {
|
||||
"title": "2. 移动连接",
|
||||
|
||||
Reference in New Issue
Block a user