100% human-produced text, some AI used for diagrams
Like many of you, I've been building more and more software with AI. It started with a little app for my kids to generate coloring book pages here, a bot to suggest bars to meet up at with my friends there, and even my own note-taking app. Nowadays I am building new software every week, for me and for others.
Because these are all personal projects, I've fully embraced vibe coding. I think hard about the architecture and UX of my applications, but I never look at the code. Let's be honest, this is what many people are doing (even at work!). But I've always been uneasy with giving models access to sensitive credentials, because prompt injection by a website is a real risk and because models do very dumb things sometimes.
In this post, I go over the setup I use to vibe code to my heart's content while keeping both the resulting apps and sensitive credentials reasonably secure.
Previously: a local setup
My initial setup was simple: Claude Code, running on my laptop, with 1Password for credentials (e.g. API keys). I did not try to be on the cutting edge: the flavor of the week changes constantly, and good ideas inevitably get rolled into Claude Code.
I managed two sets of credentials:
- SSH keys were used to deploy code, and for git operations with GitHub. This was handled by 1Password's SSH agent feature.[1]
- API keys were used to interact with services e.g. my DNS provider or my infrastructure provider.
These were stored in 1Password and used by Claude via the
opcommand line tool.[2]
Every time an agent needed to use one of those credentials, a 1Password UI would pop up on my screen and I would use Touch ID to approve it. It was easy, yet kept me in the loop.
This worked well enough for a while, until I started working on some more complex and computationally intensive projects and my Mac slowed to a crawl (and even OOMed a few times!). It was time for a better setup...
A new laptop for vibe coding
First, I needed a new laptop for my projects. I wanted to keep them separate from my work and my personal files. I bought a MacBook Neo,[3] and it has far exceeded my expectations. I intended to use it as a thin client, but it's turned out to be a very useful machine!
It is well built, it feels snappy, and the price is unbeatable.
I have installed just two apps on it: Claude, and Rex. Everything else I do via the browser. When I need to log in somewhere, I typically use the passkey QR code flow from my phone (which runs my 1Password).
This means that the blast radius of any agent I run directly on the laptop is limited.
A dedicated server running VMs
Note: Both exe.dev[4] and Cloudflare do a lot of what I want nowadays, and if you do not need to run memory- or compute-heavy workloads they are good options.
Some of my projects need more compute than the Neo can offer, and I need a place to host the little webapps that I built. For this, I rent a dedicated server from OVH.[5] $20 per month will get you something reasonable, and $45 will get you an EPYC 7351P with 128GB of RAM. Yes, these are old servers but they are very capable. I now run most of my coding agents on one of those.
On the server, I use a few pieces of software to orchestrate VMs, route traffic, and authenticate users:
- cloud-hypervisor[6] runs and orchestrates the VMs. It's lightweight, and gives me full virtual machines (so I can run Docker inside them if I want).
- caddy[7] routes web traffic. It's the perfect balance of simplicity and capability. I especially like that it manages TLS certificates out of the box.
- authelia[8] sits in front of every app and authenticates users. This means one-off apps do not need their own user authentication.
- A third-party object store for data storage. For example, I typically use SQLite and run litestream[9] to back it up to object storage.
The orchestration code runs on the server directly - I call it "the hub" - and everything else runs in VMs. I can quickly spin up more VMs, have them serve web traffic over HTTPS on a dedicated domain, or use them to host persistent coding agents.
Rex
For many years, my preferred tools for remote shells were mosh[10] and tmux[11]. I've got
their keyboard shortcuts in muscle memory, and they nicely solve the problem of session persistence,
multiplexing, and dealing with reconnects.
However, I've recently started using Rex from Superlogical[12] as my remote terminal multiplexer. I really appreciate the native UI, the built-in agent status, the ergonomics of tabs and sessions, and most of all the seamless file transfer back and forth. I miss the faster reconnects and resilience mosh's UDP protocol offers. All in all, it's a nice improvement.
Credential broker
Once I moved to the server, I needed a replacement for 1Password which agents could use with approvals driven from my phone. I took inspiration from the credential brokers which have become popular in agent sandboxes and built an approval flow for both SSH and API keys.
SSH
When one of the agents running in a sandbox wants to deploy code on a "production" VM serving traffic, it does so via SSH. However, I wanted to approve deployments, and to avoid agents having access to the SSH key directly.
Instead, I run a small certificate authority on the hub. When an agent wants in, it asks the hub for a certificate over a REST API. ntfy.sh[13] is used to send a notification to my phone, and I approve with a tap behind two-factor auth on an authelia-gated page on the server. The hub then signs the requester's existing public key with some metadata. Certificates are valid for some amount of time, and are tied to a specific VM.
The best part is that this is all plain OpenSSH. ssh-keygen does the signing, while
sshd is configured to trust the CA.
API Keys
Similarly, I sometimes want to give agents access to API keys without sharing them with the agent directly. This is often accomplished with a credential broker and there is even an IETF Internet-Draft for it.[14]
The concept is simple: an HTTPS proxy is made available to the VM, per service (e.g. stripe.proxy.example.com for Stripe, or cloudflare.proxy.example.com for Cloudflare). When requests are sent to it, it injects the API key and proxies them to the underlying service.
In most cases, my agent's API usage is a one-off (e.g. "go update DNS settings on my domain registry to configure this new domain") and I wanted to be able to approve it. So I wired the proxy into the same approval infrastructure I used for SSH. API token approvals are good for a single use, or for a short time period.
The end result is that I can go on my phone, tell my agent to make a change that requires access to some API and redeploy a website, and I will get two permission requests to approve on my phone. It also allows me to do some logging and filtering. For example, I can auto-reject any request that touches nameserver settings with my domain registrar. Some day it might even use AI to implement some sort of auto mode!
GitHub
GitHub is a special case. Every VM uses GitHub, and each action might require a very different permission scope. Rather than store personal access tokens specific to each repo in the proxy, I decided to create a private GitHub app.
The app is straightforward: it accepts requests for access, routes them to me for approval, then mints a short-lived token with just that permission to just that repository. My only complaint is that it required an app. I would have preferred an API key with "token minting" access.
As AI-driven development matures, I expect more and more services to offer these more complex permission setups with short-lived tokens and granular permissions.
Conclusion
With VMs and credential brokers, I have a much more robust setup. Agent trashed the VM? Create a new one! Credentials uploaded to a random message board? They expired after a single use!
There are still plenty of ways agents could do nasty things with this setup: exfiltrate tokens and code they have access to in the VM, trick me into approving a request I should not, sneak malicious code into my applications or my infrastructure. Yet it is miles better than going full YOLO.
Was it worth it? I'm not sure. In the age of AI, writing code is easy. Now, I have a security-sensitive application I have to monitor, keep up to date, and secure against an increasingly hostile threat environment. For anything beyond little personal projects, I would gladly outsource that responsibility to a paid provider.
One of my takeaways is that there is much to build still in the agentic software engineering world. Our harnesses and development environments are rudimentary, no set of universal best practices has emerged yet, and every week brings a new hot tool or GitHub repository. It is time to build.
-
OVHcloud dedicated server deals, prices as of December 2026 ↩
-
Credential Broker for Agents (CB4A), an individual Internet-Draft ↩