r/opencodeCLI • • Oct 13 '26

ocserve - OC rust server

I use opencode but the server was getting heavy on my machine: a couple GB of RAM and tens of GB of disk. So I wrote a drop-in replacement for just the server, in Rust.

It speaks the same HTTP/SSE API, so the opencode TUI, the web UI, and mobile clients talk to it unchanged. It reads your existing opencode config and auth read-only and keeps its own database.

It's a compatible reimplementation of the server API, pinned to the 1.18.31 wire contract.

What it doesn't do: the task subagent isn't implemented, revert returns the right shapes but doesn't restore files, /vcs/apply doesn't touch your worktree, and provider OAuth and share are missing.

Linux is the supported target.

v0.2.0 is on crates.io ( cargo install ocserve ) and the code is MIT: https://github.com/Reliary/ocserve

Happy to answer questions.

5 Upvotes

10 comments sorted by

5

u/lemon07r Oct 13 '26

This would be nice if you had it for v2.0.27

1

u/microbass Oct 13 '26

A lot of the wiring is there already. I pinned it at the version I was using, but can extend v2 compatibility fairly easily.

1

u/glan_zel 18d ago

Sound good. I probably try it in my vps aswell. Do you plan to keep it aligned with the opencode upstream Versions

1

u/microbass 18d ago

Yes. The latest version (0.7.0) is aligned. I found a few issues, so working on another version now.

1

u/glan_zel 18d ago

It was more a question about your future plans. Opencode has a very high pace (its already at 2.2) Do you plan to keep It a full working drop in fore future oc versions.

1

u/microbass 18d ago

I'm not going to be beat for beat with their updates, but once a month or so I'll do a parity build.

1

u/glan_zel 17d ago

sound great. are you open to contributions ? i would need compatibility with paseo and as far as i one env var is not understood by ocserve right now.
I could fork and provide a PR

1

u/microbass 17d ago

Definitely open to PRs, thanks.

1

u/glan_zel 15d ago

I created an issue yesterday and the PR today.

1

u/microbass 15d ago

Nice, thanks. I'm in the middle of working through it.