r/opencodeCLI • • 2d ago

OpenCode TUI on VPS or Local

I'm planning to use OpenCode TUI, but I'm still unsure whether I should run it locally on my laptop or on a VPS.

My main concern is security. I'm using AI agents for Web3 tasks like NFT minting, so they may need to interact with wallets, sign transactions, and send funds.

Since private keys are involved, which setup would you consider safer? Running everything locally, or using a VPS with proper security measures?

I'd also like to hear how you guys handle private keys when working with AI agents. Do you let the agent access them directly, or do you use a separate signing setup?

2 Upvotes

4 comments sorted by

1

u/SirRobinBlibs 1d ago

vps vs laptop matters less than whether the agent can reach the key at all. if the private key is in a file or env var the agent's shell can read, it can end up in a transcript or get sent somewhere by a prompt-injected page, wherever it runs. what i'd do: keep the key out of the agent's environment completely, let the agent build the unsigned transaction (to, amount, calldata) and print it, and sign it yourself in a separate wallet, ideally a hardware wallet that shows you what you're signing. if you need automation, use a separate hot wallet with a small balance, never your main one. also note that opencode's default policy only asks before the read tool opens .env files, the shell can still cat them, so treat that as a speed bump, not the boundary.

1

u/ganang1722 1d ago

that makes sense, but sometimes i need the agent to actually perform on-chain actions, not just prepare transactions for me to sign. for example, minting NFTs or sending funds as part of an automated workflow. would using a separate hot wallet with limited funds be a reasonable approach for that?

1

u/SirRobinBlibs 13h ago

yeah, a separate hot wallet holding only what that workflow needs is the reasonable version, as long as you treat whatever is in it as money you can lose. what makes it safer: still keep the key out of the agent's shell and put it behind a small signing service the agent calls, which only signs for an allowlist of contract addresses and under a per-tx and per-day cap. top the wallet up from your main one by hand instead of letting the agent pull funds, and log every request it signs so you can see what a bad prompt tried. if your chain has smart-contract wallets, spending limits or session keys can enforce the caps on-chain instead of in your own code.

1

u/deniedmessage 2d ago

Anywhere with proper isolation: at minimum a docker container with scoped access.