A website developer on our team shares his local site and its Strapi CMS with design and marketing. He did it through ngrok, and ngrok kept running out of data. A separate synced environment would have been one more place to keep up to date. I wanted a self-hosted replacement, and I wanted it path-based.


Path-Based First

The server side is frp, on a box we already run, behind the Angie proxy that box already has. Angie hands one hostname to frp. Each developer gets a path under it, and frp routes each tunnel as it connects. Adding a developer never touches the proxy config.

We built it, tested it, and I was about to send the email to the team.

The Images Wouldn’t Load

Then I remembered Strapi was in the picture too. I asked Claude whether it would work. It said yes.

Then I asked whether the images would load. No. The admin panel would load. The images wouldn’t.

If the images don’t load, what’s the point? tf. Marketing is looking at a page. We looked at fixing it on the Strapi side, but making Strapi live under a path prefix is a fight, and frp doesn’t strip the prefix for it. Not worth it.

So, subdomains. Each developer gets one host for the site and one for Strapi, and both run at /. On the Strapi host only the API and the uploads go through. The admin panel stays private.

A Wildcard With No API

Per-developer subdomains need a wildcard certificate. Let’s Encrypt issues wildcards only through the DNS challenge: you prove you own the domain by publishing a TXT record. That normally means your DNS provider’s API, and ours wasn’t easily available. Roadblocked.

Then it turned out Angie can run a DNS server inside itself and answer that challenge on its own. I didn’t know it could.

So the setup is:

  • A wildcard record points every tunnel subdomain at the box, like any other host.
  • An NS record hands just the challenge name to the box, where Angie answers it.
  • Let’s Encrypt checks the TXT record with Angie, and the wildcard is issued.
  • Angie forwards traffic on any of those subdomains to frp.

Our DNS provider still holds the zone. Only one name is delegated, and only so the challenge can be answered.

frpc, Not SSH

frp can take tunnels over SSH too. That means keys to hand out and manage, for two developers. Not worth it. They run frp’s own client, frpc, as a plain binary with one shared token.

Who Did What

Claude Code was my coworker on this, like the last post. It wrote the frp and Angie config, set up the DNS challenge, got the certificate and tested every host end to end. It also caught small things along the way: frp’s path match is a plain prefix, so one developer’s path would have caught another’s.

The calls were mine: self-hosted, frpc over SSH, and dropping paths for subdomains. Look at how that last one happened. “Will it work with Strapi?” got a yes. The question that mattered was “will the images load?”, and it only came up because I knew who would be looking at the page.