Hysteria2 and TUIC, Published Nov 24, 2026

# Hysteria2 not working: a checklist with the real errors

Most Hysteria2 failures end in one of three client errors. A timeout with no recent network activity means nothing came back from the server within 5 seconds: UDP is blocked, the address or port is wrong, a firewall drops it, the obfuscation password differs or the server is down. An authentication error with HTTP status code 404 means the server answered and rejected the password, and a CRYPTO\_ERROR 0x12a means the client rejected the server's certificate.

ST Muntaha, 10 min read

Everything below is checked against Hysteria 2.13.0. The error strings come from its source code and from the official [Troubleshooting page](https://v2.hysteria.network/docs/advanced/Troubleshooting/). If your client is sing-box, Mihomo or Xray instead of the official binary, the checks are the same, but the error text is different. If you are new to the moving parts (auth, Brutal, Salamander, port hopping), the [Hysteria2 protocol explainer](https://tunnelhq.com/blog/hysteria2-protocol-explained/) covers them first.

## Which Hysteria2 error am I seeing?

Start the official client in a terminal and read the first error. It looks like this:

```
2026-11-24T09:12:44Z	FATAL	failed to initialize client	{"error": "connect error: timeout: no recent network activity"}
```

| Error text | What it means | Go to |
| --- | --- | --- |
| `connect error: timeout: no recent network activity` | No QUIC reply within 5 seconds | UDP, then obfuscation |
| `authentication error, HTTP status code: 404` | The server answered and rejected the credentials | Password |
| `connect error: CRYPTO_ERROR 0x12a (local): tls: failed to verify certificate: x509: certificate signed by unknown authority` | The client does not trust the certificate | TLS |
| Connects, then slow or stalls | Usually the bandwidth (Brutal) settings | Brutal |
| `failed to load server config` on the server | The server never started | Server startup |

The 5 seconds is the QUIC handshake idle timeout in quic-go, which Hysteria does not change. If the error appears five seconds after you start the client, the client heard nothing at all.

## How do I get more detail from the logs?

On the client, add `-l debug`:

```
hysteria -c client.yaml -l debug
```

On the server, installed with the official script, the service is `hysteria-server.service`:

```
journalctl --no-pager -e -u hysteria-server.service
journalctl -f -u hysteria-server.service
```

A successful login prints `client connected` with the client's address and ID. A failed login prints nothing at the default info level, because to the server it is just a web request. To see it, raise the level with a drop-in (`systemctl edit hysteria-server.service`):

```
[Service]
Environment=HYSTERIA_LOG_LEVEL=debug
```

Then `systemctl restart hysteria-server.service`. At debug level, a client with the wrong password shows up as a `masquerade request` with method `POST`, host `hysteria` and URL `/auth`. That line proves the packets arrive and the password is the problem. If the server logs nothing at all while the client times out, the packets are not arriving, or the obfuscation password is wrong and the server drops them.

## Is UDP reaching the server?

Check this first for any timeout. Hysteria2 uses UDP only: an open TCP 443 proves nothing.

1.  Is the server listening? `systemctl status hysteria-server.service` and `ss -ulpn | grep hysteria`. With a port range in `listen`, the socket is on the first port of the range.
    
2.  Do packets arrive? On the server, run `tcpdump -ni any udp port 443` (use your port) and start the client.
    
    -   Nothing arrives: the provider's firewall or security group, the host firewall, wrong DNS, or the network path drops UDP.
    -   Packets arrive but nothing goes back: wrong port in the server config, an outbound firewall rule, or an obfuscation password mismatch.
3.  Open the port in every firewall. Many providers have a firewall in their web panel as well as the one on the host:
    
    ```
    ufw allow 443/udp
    firewall-cmd --permanent --add-port=443/udp && firewall-cmd --reload
    ```
    
4.  Check DNS: `dig +short vpn.yourdomain.com` must return the server's address.
    
5.  Try a second network, such as a phone hotspot. If it works there, your server is fine and the first network is the problem. If QUIC is blocked but other UDP passes, Salamander helps. If one port gets throttled after a while, port hopping helps. If all UDP is blocked, use mimic (Linux, fake TCP) or a TCP-based protocol. The [post on checking whether a server IP is blocked](https://tunnelhq.com/blog/check-vpn-server-ip-blocked/) goes through these tests in more detail.
    

The docs also list a known problem with old kernels on CentOS 7. Use a distribution released in the last two years.

## Is the Hysteria2 password right?

A 404 means the QUIC connection worked and the server did not accept the credentials. It then behaved like a web server that does not know `POST /auth`. If you configured a `proxy` masquerade, the status code is whatever the upstream site returns for that request, so it may not be 404 at all.

Check these:

-   The `auth` value on the client matches the server's `auth.password` exactly.
-   With `userpass` on the server, the client sends `username:password`. A sing-box client has no `userpass` option, so put `username:password` in its `password` field.
-   In a `hysteria2://` link, the password is the part before `@` and must be percent-encoded if it has special characters. Releases before 2.9.3 turned a `+` in the password into a space when parsing links; upgrade old clients or avoid `+`.
-   With `http` auth, your backend must reply HTTP 200 with `{"ok": true, "id": "..."}`. With `command` auth, the program must exit with code 0 and print the client ID.
-   You may simply be connected to the wrong server, for example an old DNS record. The docs list that as a common cause too.

## Is the obfuscation password the same on both sides?

A Salamander or Gecko mismatch never produces an error. The server discards packets it cannot decode, and the client times out as if the server were down. The [client config reference](https://v2.hysteria.network/docs/advanced/Full-Client-Config/) says this directly.

Compare the `obfs` block on the server with every client, or the `obfs` and `obfs-password` parameters in the link. Gecko also needs a client that supports it: sing-box from 1.14.0, current Mihomo. Remember that a server with obfuscation no longer works as an HTTP/3 website, so a browser test against it will fail too. That part is expected.

## Why does the TLS handshake fail?

`CRYPTO_ERROR 0x12a ... certificate signed by unknown authority` means the client cannot verify the certificate. With a self-signed certificate, give the client the CA (`tls.ca`), or set `insecure: true` together with `pinSHA256`. Get the pin from the server's certificate:

```
openssl x509 -noout -fingerprint -sha256 -in /etc/hysteria/server.crt
```

Hysteria accepts it with or without colons. Since 2.6.4, `pinSHA256` matches only the leaf certificate, so a pin of a CA certificate stops working.

Four more TLS causes that show up as handshake failures:

1.  **An expired or replaced self-signed certificate.** `hysteria cert` makes certificates valid for 365 days by default. When you make a new one, the pin changes and every pinned client fails at once. Check the date with `openssl x509 -noout -enddate -in /etc/hysteria/server.crt`.
2.  **SNI guard.** Since 2.5.2, a server with its own certificate (`tls`, not `acme`) that lists DNS names ends the handshake when the client's server name does not match it. This catches clients that connect by IP with `insecure` and no `sni`, or that send a borrowed name. Set `sni` to the certificate's name, or set `sniGuard: disable` on the server.
3.  **An Ed25519 certificate.** Since 2.11.0 (and sing-box 1.14.0), the client imitates Chrome's QUIC handshake, and Chrome does not offer Ed25519. Use an ECDSA or RSA certificate, or set `quic.disableChromeParrot: true` on the client.
4.  **ACME not finished.** The domain must point at the server, and the HTTP or TLS challenge needs TCP 80 or 443 reachable from the internet, unless you use the DNS challenge. On the first start, wait until the log shows the certificate was obtained before you test.

## Why is Hysteria2 slow or unstable after it connects?

Almost always the bandwidth settings. When the client sets `bandwidth`, that direction uses Brutal, which sends at the given rate and does not back off on loss. A value higher than the path can carry gives a slow, unstable connection.

1.  Remove the `bandwidth` section from the client and test again. Without it, Hysteria2 uses BBR. If BBR is better, your numbers were too high.
2.  If you want Brutal, set values a little under a real speed test on that network.
3.  On a shared server, set `ignoreClientBandwidth: true`, so users cannot push Brutal on everyone else.
4.  Since 2.10.0, `bandwidth.disableLossCompensation: true` turns off Brutal's loss compensation, which the changelog says can improve stability in some cases.
5.  `HYSTERIA_BRUTAL_DEBUG=true` prints RTT, loss and MTU while Brutal runs.

Outside Brutal, the docs' performance page suggests larger UDP buffers on Linux (`sysctl -w net.core.rmem_max=16777216` and the same for `wmem_max`), and warns that QUIC needs real CPU. Watch `top` during a transfer on a small VPS.

## Why does Hysteria2 port hopping not work?

Work through the [port hopping page](https://v2.hysteria.network/docs/advanced/Port-Hopping/) requirements in order:

-   Server-side range listening (`listen: :20000-50000`) works on Linux only, and needs `nft` or `iptables` plus root or `CAP_NET_ADMIN`. The official systemd unit grants `CAP_NET_ADMIN`. In Docker, add `cap_add: [NET_ADMIN]`. To force one backend, set `HYSTERIA_FIREWALL_BACKEND` to `iptables` or `nftables`.
-   Open the whole UDP range in the provider's firewall, and both the range and the listen port on the host: `ufw allow 20000:50000/udp`.
-   The client must use the multi-port format, for example `vpn.yourdomain.com:20000-50000`, in the config or the link. One port in the client means no hopping.
-   Port hopping cannot be combined with mimic.
-   If other UDP services on the server broke after you enabled the range, upgrade: 2.12.3 fixed rules that wrongly redirected outbound UDP. 2.8.2 fixed a problem with some older nftables versions.

## What do Hysteria2 server startup errors mean?

Server config errors always have the form `invalid config: <field>: <reason>`, so the field name tells you where to look. The two most common:

```
failed to load server config	{"error": "invalid config: listen: listen udp :443: bind: permission denied"}
failed to load server config	{"error": "invalid config: tls.cert: stat /root/cert.crt: no such file or directory"}
```

The first means the process may not bind to a port below 1024. The official unit allows it; for a manual binary, run `sudo setcap cap_net_bind_service=+ep /usr/local/bin/hysteria`. The second means the certificate path is wrong for the process. The service runs as the user `hysteria`, which cannot read files under `/root`, and inside Docker the path must be mounted into the container. The install script can switch the service to root (`HYSTERIA_USER=root`) if another program manages your certificates.

## What does "http connection error" mean in H-UI?

H-UI is a third-party web panel for Hysteria2. It shows `http connection error` when it cannot reach Hysteria's Traffic Stats API on `127.0.0.1:9999`. Its own log shows the real request, for example `Get "http://127.0.0.1:9999/online": dial tcp 127.0.0.1:9999: connect: connection refused`. In other words, the Hysteria process is not running. The H-UI maintainer's usual answers are that the first ACME certificate takes a few minutes, or that the Hysteria config has an error. Open the Hysteria log in the panel and look for `failed to load server config`; the field name in it is your fix.

## Could a version mismatch break Hysteria2?

Yes, in three known ways. Hysteria 2 and Hysteria 1 are not compatible at all. From 2.8.2, UDP forwarding fails when a new client connects to an older server, while TCP keeps working, so "web pages load but DNS or calls fail" can be a version problem. And newer features (Gecko, ECH) need support on both ends.

To update a server installed with the official script, run it again. It upgrades the binary and restarts the running Hysteria services:

```
bash <(curl -fsSL https://get.hy2.sh/)
bash <(curl -fsSL https://get.hy2.sh/) --version v2.13.0
hysteria version
```

The [installation script page](https://v2.hysteria.network/docs/getting-started/Server-Installation-Script/) has the other options. Update the server first, then the clients.

## How do I confirm the fix from outside?

Two commands, from a network that is not the server's own. The first connects, authenticates and opens one TCP connection through the server:

```
hysteria -c client.yaml ping www.gstatic.com:443
```

The second sends a real request through a running client:

```
curl --socks5-hostname 127.0.0.1:1080 -sS -o /dev/null -w '%{http_code}\n' https://www.gstatic.com/generate_204
```

`204` means the whole path works, including the server's DNS and outbound route. Many of the problems above (an expired self-signed certificate, a certificate that did not renew, a firewall change) come back on their own months later, so a check that runs on a schedule is worth more than one good test today.

Full disclosure: that scheduled check is what [TunnelHQ](https://tunnelhq.com/hysteria2-monitoring/) does. It takes your `hysteria2://` link, completes the QUIC handshake and the auth exchange from outside every 1 to 5 minutes (depending on plan), sends real requests through the tunnel, and alerts in 12 channels when that fails. To test one link right now, the [free tester](https://tunnelhq.com/test/) needs no account.

Source: https://tunnelhq.com/blog/hysteria2-not-working/
