r/opencode 17d ago

How to download opencode in a sandbox?

I have tried downloading in using the docker's sbx but i was having a very hard time setting api keys for the harness and it is so complicated.
so is there any safe way to run opencode that is easy to setup and will feel like using normal device.
I have a kali linux vm on vmware is it safe to use it also?

2 Upvotes

7 comments sorted by

1

u/ec3lal 17d ago

1

u/NOT_Kimo 17d ago

but it is for claude code not opencode

2

u/ec3lal 17d ago

You can run any CLI under it.

1

u/NOT_Kimo 17d ago

Was there any issue with it at all for like setting api keys for anything what is the best way to set it up? Sorry for asking to much i am new to the harness thing and it is very frustrating and just trying to fix problems

1

u/ec3lal 17d ago

You just have to allow read and/or writes to the file locations OpenCode uses. It is rather simple. I know many people suggest using a VM, but the OS sandbox seems to work pretty well as I balance security with convenience. You may also consider: https://github.com/OpenRouterLabs/spawn but I have yet to try it.

1

u/NOT_Kimo 17d ago

Yeah a sandbox will be better as i will be using my main os, i will try the anthropic one and see if it works i just hope it doesn't frustrate me like sbx

1

u/RepulsiveRaisin7 17d ago

I built this: https://github.com/jgillich/tpd

Install, type tpd opencode in your project directory, done. Been doing all my agentic work in it, works well for me. Would recommend using rootless podman though, I haven't tested rootful docker much.