Loading video...

Video Failed to Load

Go Home

finally got around to setting up an always on opencode server so i can run sessions on any device from anywhere takes a few minutes - showed it off here

229,785 views • 9 months ago •via X (Twitter)

41 Comments

vogel's profile picture
vogel9 months ago

oh my god he is an excalidraw kiddy

James Long's profile picture
James Long9 months ago

lol I just drew this today I'm building my own clawdbot-style thing as an experiment, this is timely (only reason I'm wiring up iMessage is because it's useful to have a group chat with my wife there and we can ask about life stuff like how much have we spent on food)

Eleanor Berger's profile picture
Eleanor Berger9 months ago

I've got a self-hosted @opencode and I love it. Beats all the other web-based bots.

Loboz - Stranded Survivors on Steam!'s profile picture
Loboz - Stranded Survivors on Steam!9 months ago

I tried setting this up yesterday and ran into 401s

dax's profile picture
dax9 months ago

oh i didn't see this lol i just pushed a commit

Kent C. Dodds 🐨's profile picture
Kent C. Dodds 🐨9 months ago

I love this a ton. Thanks for sharing this! I may finally look into using opencode

Jeremi's profile picture
Jeremi9 months ago

Do you have any tips for how to achieve this when I work on multiple projects in multiple folders? Right now I start open code in each folder, but would love to be able to flip through different projects I have OC working on from within one OC instance. Or web instance, etc.

dax's profile picture
dax9 months ago

one server can access all folders on web you can hit "open project" and on tui `opencode attach --dir={dir you want to run under}`

Greg Pstrucha's profile picture
Greg Pstrucha9 months ago

i’ve set it up a while ago and started autoinstalling it in my docker containers over tailscale: so it works w/ opencode + autosandboxing the agents

Fabien Penso's profile picture
Fabien Penso9 months ago

That's all I wanted. You should definitely add some kind of gpg/ssh authentication to make it safe when connecting, even if yeah yeah VPN only.

dax's profile picture
dax9 months ago

there's basic auth on the server, if you pause when i show the service file you can see how i setup a password not amazing but works for now

Fabien Penso's profile picture
Fabien Penso9 months ago

Yeah, would be nice to have better like ssl based. But it's a good step. Can you start your laptop, start a session and then since you forgot to connect to your server, send that session to the server *after* so it keeps running once closing your laptop?

Mykyta Pavlenko's profile picture
Mykyta Pavlenko9 months ago

The dream: one dev-env that lives in the background and just waits for you to open any device. The reality: 40 minutes digging into 401, ssh keys and vpn to look at one log for 5 minutes.

Ratul Sarna's profile picture
Ratul Sarna9 months ago

Made use of this recently for an opencode iOS app: Runs on my VPS for always on access and on-the-go coding! Sync via gh when i'm on the laptop.

Tommy Falkowski's profile picture
Tommy Falkowski9 months ago

You are very late to the party

Dante Lex's profile picture
Dante Lex9 months ago

Wrote a doc on how you can similar with Private Connect

JuanC's profile picture
JuanC9 months ago

@ivanfioravanti i use opencode web within my tailscale vpn to use it from my phone with glm, minimax and kimi plans. congrats this is a phenomenal tool

Cal Irvine's profile picture
Cal Irvine9 months ago

Keep fighting the good fight, big Free Time will tell you to stop, but we must always be working

aerox's profile picture
aerox9 months ago

i was doing so for some time, however at one moment you would like to check the modifications and now you either need to keep nodejs app always on or introduce a process manager in opencode web (the last one is preferred if jumping through multiple projects)

dax's profile picture
dax9 months ago

there's a terminal in opencode web - one of the buttons on top right opens it

aerox's profile picture
aerox9 months ago

another feature that would be nice, is to have an iframe to open the page, this can be nicely tied together with a process manager

Blank's profile picture
Blank9 months ago

I have been using opencode this way, there is one annoying thing that sometimes it doesn't sync between TUI and web client, so when I do something from web ui it doesn't show up in TUI and vice versa Hope the synchronisation stuff becomes more stable

Lewis Menelaws's profile picture
Lewis Menelaws9 months ago

Ok cool but when are we getting the opencode integration for American Truck Simulator

cogsec's profile picture
cogsec8 months ago

i swear i just saw this video after doing this myself to use open-code

Benjamin Shafii's profile picture
Benjamin Shafii8 months ago

been using i for a while. something i would find cool in a remote setup is to able to "re-hydrate" the skills/agents/plugins without needing to do something like `instance/dispose` would avoid needing to log back in on remote. skills,plugins,etc evolved rapidly. (additionally, having a better way to read/write skills/agents/plugin, from server/sdk would be killer) happy to do a PR for both, i currently have my own abstractions as workaroun.

Jeffrey Way's profile picture
Jeffrey Way8 months ago

This is very cool. Gonna try it out tonight.

Sergey Karayev's profile picture
Sergey Karayev9 months ago

Looks awesome! We ❤️ opencode. If anyone wants to run opencode (alongside claude code and codex) in cloud sandboxes from web and iPhone, check out superconductor.

Sergey Nikiforov's profile picture
Sergey Nikiforov9 months ago

this is the way. one machine to rule them all

Diwaker's profile picture
Diwaker9 months ago

cool!! all i could see was all those codex tokens wasted on "hey" and "asdasd" 😂

Andrew Pashynnyk's profile picture
Andrew Pashynnyk8 months ago

with this powerful approach it doesn’t make sense for opencode to have a concept of project which is your current directory almost every session i have now touches multiple directories outside of the one i started the session in.

Schlez's profile picture
Schlez8 months ago

I’ve been doing the same for the last couple of days. Start on computer, continue on phone. Caffeinate -d. living my best life

DeathScythe's profile picture
DeathScythe8 months ago

Dude… @BowTiedDevil …

arnav surve's profile picture
arnav surve8 months ago

Can you guys fix your SDK it doesn’t properly send completion events. Why do we have to poll

Max 🇺🇦's profile picture
Max 🇺🇦8 months ago

Dope! I didn't know there is a web UI.

sonald's profile picture
sonald8 months ago

The persistent session approach solves a real pain point for remote development. Worth considering how session state is handled during reconnection - whether it's full state restoration or just process continuity.

Gautham Pai's profile picture
Gautham Pai9 months ago

The OpenCode server is underrated! However, the mobile view was not great, so I built a Telegram interface with commands like /projects that basically maps to Opencode sessions, /project switch helps switch sessions. It's working pretty well!

OneManSaas's profile picture
OneManSaas9 months ago

Pro tip: use tmux sessions inside the opencode server. If the connection drops, your work state persists and you can reattach instantly. Been running dev sessions this way for years - saves me from losing progress during those inevitable network hiccups.

Maky's profile picture
Maky9 months ago

thank you, i got the set up done! pretty neat. mobile is looking really good!

Everlier's profile picture
Everlier9 months ago

There's also a pre-packaged setup for OpenCode + local LLMs in Harbor:

Pete Winn 🔆's profile picture
Pete Winn 🔆9 months ago

I’ve been running opencode (and other agents) like this for about 6 months. Pub/Priv key log in via Nostr, file browsers, agent sessions, app runners like a mini replit on your own devices.

Timmy's profile picture
Timmy9 months ago

So are you bald or not?

Related Videos

single most useful thing for my local ai setup that made life easy is my 2x DGX Spark becoming one serving box for every device i own here is how i do it: > 1. the two sparks run one vLLM server together with one endpoint, i use dgx sparks, you can use any nodes that can run an llm > 2. install tailscale to have all your nodes and machines on the same tailnet, the endpoint lives there so every device reaches it from anywhere and no port is open to the internet > 3. that one tailnet endpoint with the exposed port is your base url for everything, it speaks OpenAI chat, OpenAI Responses and Anthropic Messages, so any chat app, coding agent or phone bot you point at it talks to the same model > 4. the server also answers to the name "local", so clients can ask for "local" instead of a model name and when i swap the model on the servers nothing on the devices needs a config change. right now it's serving GLM 5.3-Flash, next week it can be something else this video below is the whole thing running end to end, orange dots are requests going in, white and green are tokens coming back it takes however many requests you throw at it, your config decides how many run at once and the rest wait their turn, when several run together each request's tok/s drops a bit while the box moves more tokens in total. mine is set to one at a time right now, so when every device fires together they queue up this setup really improved my quality of life with local ai, if you get stuck anywhere setting it up leave a comment and i'll help you

Sudo su

33,015 views • 28 days ago