Osewa
Osewa keeps your session on the host and reaches it over QUIC, or TLS over TCP when UDP is blocked. Set it up once per host, then pick it as the connection type.
Osewa is a persistent remote terminal. The session lives on the host, not in the connection, so it survives sleep and network changes, and your scrollback stays with it. Moshi connects over QUIC, and falls back to a TLS WebSocket on networks that block UDP.
Osewa is an experimental transport in Moshi. Auto never picks it, so choose it for each host you want to use it on.
What the host needs
- Linux or macOS. Osewa has no Windows build.
- Osewa, installed for the account you log in with.
- moshi-hook, which Moshi uses to set Osewa up. See Install moshi-hook.
- SSH access. Moshi logs in over SSH first, so the saved connection needs working credentials.
- Port 7322 open for both UDP and TCP, unless you change it. Over Tailscale that needs nothing. On a VPS, open both in its firewall.
Install Osewa on the host:
curl -fsSL https://osewa.dev/install.sh | sh
You don't need to run osewa login or start a server. Moshi does that part.
Connect
- Edit the connection, or add a new one.
- Set Connection type to Osewa.
- Save and connect.
To try Osewa once without changing the saved connection, long-press it on Home and choose Connect With, then Osewa.
The first connection shows Setting up Osewa on the host... while Moshi does the following:
- Logs in over SSH with the connection's credentials.
- Asks moshi-hook to enroll this device with a key of its own and start the Osewa server.
- Connects straight to the host, at the address you saved, on the Osewa port.
Later connections skip enrolling. The SSH session stays up alongside Osewa for features that go through moshi-hook, as it does for Mosh.
Moshi connects directly to the saved address, so your device must be able to reach that address itself. A host you can only reach through a jump host won't work with Osewa.
Osewa uses the same free trial as Mosh. When the trial is used up, you need Pro. See Free vs Pro.
Check Osewa on a host
On Home, tap Hooks at the right end of the Connections header and pick a host. The Osewa section shows whether it's installed, whether its server is running, the port, and the platform.
To change the port, tap Change next to Port and enter a number from 1024 to 65535. Connections pick up the new port the next time they connect. Sessions keep running across the change.
Fix common errors
| Message | What to do |
|---|---|
| Osewa isn't installed on this host | Install it with the command above, then connect again. |
| moshi-hook on this host is too old for Osewa | Update moshi-hook, then connect again. |
| Couldn't reach moshi-hook on this host | Check that moshi-hook is running on the host. Osewa needs it to set up. |
| Osewa on this host doesn't match this app | The host's build and the app's can't talk to each other. Update one so they match: run osewa update on the host, or update Moshi. |
| The host no longer accepts this device | Connect again to enroll this device again. |
| This host already runs its own Osewa service | Run osewa service uninstall on the host so Moshi can manage Osewa. |
| This session was started under another Osewa build | Close it and start a new one. The session is still running on the host, but this build can't show it. |
If Moshi stays on Connecting via Osewa..., the port may be blocked. Check that both UDP and TCP reach it, and that the host's firewall and your VPS provider's firewall both allow them.
Osewa's own docs cover the rest, from sessions to troubleshooting.