## Problem and outcome / 问题与结果 App startup rejected short or non-ASCII site passwords, viewers lacked picture-click playback gestures, and text-mode hints hid the existing illustrations. This phase accepts site passwords verbatim, combines shared illustrations with localized captions in tooltips and stage overlays, and adds desktop single-click play/pause and double-click fullscreen through the existing playback owner. Pure-visual mode remains available. App ZIP names are now stable per platform, allowing the website to use GitHub's native latest-download URLs. The App update link selects the ZIP matching its compiled OS and architecture from the checked release metadata, falling back to the release page if the package is unavailable. Verified Gitee links retain their explicit release version. The Windows packaging workflow also stops restoring a redundant Go toolchain cache that caused setup-go to fail. ## Release notes ### 中文 - 中英文操作提示和画面状态覆盖层加入动态漫画,说明更直观;纯视觉模式继续保留。 - 观众可单击画面暂停或继续播放,双击进入或退出全屏;触屏仍通过单击显示或隐藏播放栏。 - 修复设置短密码、中文密码时 App 或 Server 无法启动的问题。站点密码仍可留空。 - 官网各系统的 GitHub 下载按钮直接获取最新 ZIP 包,并保留 Gitee 备用下载线路。 - App 内的更新入口直接下载对应系统和架构的 ZIP 包。 ### English - Chinese and English tooltips and picture status overlays now pair concise explanations with animated illustrations. Pure-visual mode remains available. - Viewers can click the picture to pause or resume and double-click to enter or exit fullscreen. Touch taps continue to show or hide playback controls. - Fixed App and Server startup rejecting short or non-ASCII site passwords. Site passwords remain optional. - Each platform's GitHub download button now fetches the latest ZIP package, with Gitee retained as an alternative download source. - App update links download the ZIP matching the installed platform and architecture. ## Verification / 验证 - `npm run check`: 59 test files / 774 tests, TypeScript and production build passed. - `npm run check:client-core`: Go tests, formatting, vet and supported local target builds passed for the included runtime changes. Native macOS packaging remains on its macOS runner. - Desktop and 390px touch playback checks passed, including double-click without an intermediate pause and control/keyboard interaction. - Illustrated tooltip checks passed in Chinese, English and pure-visual modes, light/dark themes, 260/360/390px layouts, keyboard, touch hold and reduced motion. User accepted the resulting UI. - Real stage overlay components passed 46 checks across the three modes and 260/390/1280px layouts, including keyboard play activation, reduced motion, and no overlay over healthy playback with a quality limitation. - Bounded release review confirmed JSON password authentication retains old bodyless Bearer compatibility and ZIP names match packaging, publisher, mirror and website consumers. - After checking both providers' real API shapes, 27 focused update tests and type-checking passed; anonymous GitHub and Gitee metadata each selected all three actual platform ZIPs without downloading them. - Documentation, repository hygiene and diff checks passed. ## Impact / 影响 Compatible feature release. Signaling, Native control, capture protocol and persistent room schema are unchanged. The new latest-download filenames must be published before the matching website deploys; the existing CI-to-Website sequence provides that order. Production service updates use the immutable Server artifact and bounded rollback. Broader physical macOS/Linux, network and endurance acceptance stays under the existing documented deferrals.
94 lines
3.3 KiB
Markdown
94 lines
3.3 KiB
Markdown
# Deploy Piik Server
|
|
|
|
English · [简体中文](./self-hosting.zh-CN.md) · [Documentation](../README.md)
|
|
|
|
Piik Server packages the web interface, room management and optional media
|
|
forwarding in **one server binary**. Extract and run it; room data is stored in SQLite.
|
|
|
|
## Try it locally
|
|
|
|
These server instructions use a Linux x64 machine.
|
|
|
|
Download the **Linux x64 Server** archive from [GitHub Releases](https://github.com/TNTcraftHIM/Piik/releases)
|
|
or the [Gitee mirror](https://gitee.com/TNTcraftHIM/Piik/releases),
|
|
extract it, and run the following in its directory:
|
|
|
|
```sh
|
|
./piik-server
|
|
```
|
|
|
|
Open `http://localhost:8787`. This is a local trial; use the configuration below
|
|
to let friends connect over the internet. To start a temporary room on your computer,
|
|
use the [Piik App guide](../guide/getting-started.md).
|
|
|
|
## Put it online
|
|
|
|
You need a Linux x64 server and a domain pointing to its public IP.
|
|
The example uses `share.example.com`; replace it with your domain.
|
|
|
|
### 1. Configure and start Piik
|
|
|
|
Create a `.env` file next to the binary:
|
|
|
|
```dotenv
|
|
PIIK_ENV=production
|
|
LISTEN_HOST=127.0.0.1
|
|
PUBLIC_BASE_URL=https://share.example.com
|
|
STUN_URLS=stun:share.example.com:3478
|
|
MAX_VIEWERS_PER_ROOM=20
|
|
SITE_ACCESS_PASSWORD=
|
|
```
|
|
|
|
Run these commands from that directory as a regular user:
|
|
|
|
```sh
|
|
./piik-server --check-config
|
|
./piik-server
|
|
```
|
|
|
|
The server reads `.env` automatically and stores rooms in `rooms.sqlite` in the
|
|
working directory. A blank `SITE_ACCESS_PASSWORD` allows
|
|
entry without a site passphrase; enter a passphrase to require one.
|
|
Room invitations and access settings still apply.
|
|
|
|
### 2. Enable HTTPS
|
|
|
|
Use your existing HTTPS reverse proxy to forward to `127.0.0.1:8787` with
|
|
WebSocket support. If you do not have one, [install Caddy](https://caddyserver.com/docs/install)
|
|
and add this to its Caddyfile:
|
|
|
|
```caddyfile
|
|
share.example.com {
|
|
reverse_proxy 127.0.0.1:8787
|
|
}
|
|
```
|
|
|
|
Reload Caddy. It obtains and renews the certificate automatically when DNS points
|
|
to the server and TCP 80/443 are reachable. See [Caddy's HTTPS proxy guide](https://caddyserver.com/docs/quick-starts/reverse-proxy#https).
|
|
|
|
### 3. Open the ports and verify
|
|
|
|
Allow **TCP 80/443** for HTTPS and **UDP 3478** for STUN in the server firewall
|
|
and cloud security group. Keep TCP 8787 private. The STUN hostname must resolve
|
|
directly to the server; a CDN HTTP proxy does not forward its UDP traffic.
|
|
|
|
Open `https://share.example.com/healthz`; it should return `{"status":"ok"}`.
|
|
Then open the site, share a screen and join from another device. This initial
|
|
configuration uses P2P media, so participants need a usable UDP path.
|
|
|
|
## Optional: media fallback
|
|
|
|
Add `SFU_UDP_PORT=7882` to `.env`, allow UDP 7882, and restart Piik to enable
|
|
automatic SFU fallback. When the server is behind NAT, also set `SFU_PUBLIC_IP`
|
|
to its reachable public IPv4 address. The same binary provides the fallback.
|
|
|
|
## Keep it running and update
|
|
|
|
For automatic startup, use the [systemd or container guide](./service-management.md).
|
|
Keep `.env` and `rooms.sqlite` across updates. Back up room data while the server is
|
|
stopped, replace the executable with the new release, then restart and check
|
|
health and room access. Read release notes before an upgrade that changes data formats.
|
|
|
|
[All settings and ports](../reference/configuration.md) ·
|
|
[Maintainer release tooling](../deployment.md)
|