# Update Hysteria

> Update Hysteria2 client and servers to the latest version. Use this when asked to update Hysteria or hysteria2.

- Skill: `derekhe/update-hysteria` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add derekhe/update-hysteria`
- Raw SKILL.md: https://api.skillmd.com/api/skills/derekhe/update-hysteria/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: derekhe (https://skillmd.com/u/derekhe)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/derekhe/update-hysteria

---


# Update Hysteria2 Client and Servers

This skill updates the Hysteria2 proxy client on 192.168.50.99 and the remote servers it connects to.

## Infrastructure Overview

- **Client machine**: `derekhe@192.168.50.99` (sudo password required)
- **Two client service instances**:
  - `hysteria-server.service` → config `/etc/hysteria/config.yaml` → connects to `proxy.april1985.com`
  - `hysteria-server2.service` → config `/etc/hysteria/config2.yaml` → connects to `proxy6.april1985.com`
- **HTTP proxies on client**: port `4080` (instance 1) and `5080` (instance 2)
- **Remote servers**: `proxy.april1985.com` and `proxy6.april1985.com`, accessible as `root` via SSH key `~/.ssh/id_rsa` from 192.168.50.99

## Update Procedure

Run the `update.sh` script from this skill directory. It handles everything automatically:

```bash
bash update.sh
```

The script will:
1. Update the client binary on 192.168.50.99 using the local Hysteria HTTP proxy (port 4080) for fast GitHub download
2. Fix the systemd service file if the installer overwrote it with `server` mode (must be `client` mode)
3. Verify both client services are running
4. Update both remote servers via reverse SSH tunnel (port-forwarding the local proxy to the remote machine for fast download)
5. Verify all versions

## Key Notes

- Always use `http_proxy=http://127.0.0.1:4080` when downloading on the client to avoid slow direct GitHub speeds
- Use `-R 18080:127.0.0.1:4080` SSH reverse tunnel when updating remote servers to route their downloads through the local proxy
- The `hy2.sh` installer may overwrite `hysteria-server.service` ExecStart to `hysteria server --config ...`. Since both configs are **client** configs, this must be fixed to `hysteria client --config ...`
- `hysteria-server2.service` uses bare `hysteria --config ...` (no subcommand) and is not affected by this issue

