Deploy LayerV to protect your site or resource
Hide an app you run (a site, investor portal, internal dashboard or HTTP API) so it has no public address, then let approved people in with short-lived qURL links. This guide takes a person or an AI agent from a new LayerV account to a protected, verified app with the qURL command-line tool. Everhaven is only the example; you need none of its branding, fictional report or demo sign-in.
Version 2.0 · Verified end to end on 4 November 2026 with qURL CLI 3.6.1 on Ubuntu 24.04 (linux/amd64), LayerV production, and qurl-go v0.17.0 for the backend. This is the exact setup that runs everhavencapital.com.
Full Markdown · Starter ZIP · Agent checklist · Try the live demo
On this page
- Deploy LayerV to protect your site or resource
- The whole idea in three commands
- 1. Create your LayerV account and API keys
- 2. Prepare a Linux server
- 3. Install the qURL CLI
- 4. Connect the server and hide the app
- 5. Open it yourself
- 6. Hand out links from your backend
- 7. Check it like an outsider
- 8. Run it day to day
- 9. Troubleshooting
- 10. Reuse and sources
The whole idea in three commands
qurl login # connect this server to your LayerV account
qurl publish http://127.0.0.1:8080 # hide the app; prints its permanent ID (CRID)
qurl share <CRID> # create a short-lived link to it
Your app listens only on the server's own loopback address. qURL connects out to LayerV, so nothing on the internet ever connects in to your app. When someone is approved, your backend asks LayerV for a link, and that link is their way in.
Getting a link
Person → your sign-in → your backend checks permission → LayerV API → single-use link
Using the link
Browser → LayerV → (outbound connection from your server) → app on 127.0.0.1
1. Create your LayerV account and API keys
- Sign up at dashboard.layerv.ai and verify your email.
- Open API keys and create two keys. The default scopes work for both.
- server key: used once by
qurl loginto register your server. qURL does not store it. - backend key: kept by the backend that hands out links (step 6).
- server key: used once by
- Save both in your password manager or secret store. Never put them in source code, browser code, chat logs or shell commands.
Use one LayerV account for everything. Only the account that published an app can create links to it, so the server and the backend must use keys from the same account.
Words used in this guide
| Term | Meaning |
|---|---|
| qURL CLI | The qurl command-line tool you install on the server |
| CRID | The permanent ID qurl publish prints for your app. Safe to store as normal configuration |
| qURL / link | A short-lived access link to your app. Treat it like a password until it is used |
| Private (default) | Only you, the devices you allow, and holders of links you create can open the app |
| Publisher name | The name visitors see on your links, set with qurl publisher set |
2. Prepare a Linux server
Any Linux server you control works. We used a DigitalOcean droplet (Ubuntu 24.04, the $6/month size). Keep the provider's console or SSH access for administration.
Your app must listen on loopback only, for example 127.0.0.1:8080. Do not open a firewall port, add a load balancer, or publish a container port for it. qURL needs nothing inbound; it only makes outbound connections (HTTPS and UDP 443).
The starter serves a harmless page through Nginx on loopback:
apt-get update && apt-get install -y nginx curl unzip
curl -fsSLO https://everhavencapital.com/protect-a-resource/starter.zip && unzip -o starter.zip
mkdir -p /srv/private-app && cp -r starter/site /srv/private-app/
cp starter/nginx.conf /etc/nginx/sites-available/default
nginx -t && systemctl restart nginx
curl -s 127.0.0.1:8080/healthz # expect: private-resource-ok
For your own app, point it at a loopback address and give it a harmless /healthz response you can recognize. Never put secrets or customer data in a health response.
3. Install the qURL CLI
On Debian or Ubuntu:
curl -fsSLo /tmp/qurl.deb "https://github.com/layervai/qurl-integrations/releases/download/v3.6.1/qurl_3.6.1_linux_$(dpkg --print-architecture).deb"
apt-get install -y /tmp/qurl.deb
qurl version
loginctl enable-linger "$USER" # lets qURL's background service start at boot
Packages for other Linux distributions (.rpm, .tar.gz) and for arm64 are on the same release page. On macOS: brew install --cask layervai/tap/qurl.
4. Connect the server and hide the app
Log in first, then publish. If you publish before logging in, qURL creates an anonymous identity, and login will then refuse to switch accounts (see Troubleshooting).
read -rsp 'LayerV server key: ' K; echo; printf %s "$K" | qurl login; unset K
qurl publish http://127.0.0.1:8080 --id my-app
qurl publisher set "Your Company"
loginprintsEnrolled this device for …with your account. The key is used once and not kept, and it never lands in your shell history.publishprintsAccess: private,Status: servingand your CRID. Save the CRID.publisher setputs your name on every link, so recipients can see who sent it.
qURL now runs as a background service that resumes after restarts, sleep and reboots. Check it any time:
qurl status <CRID> # want: Desired: on · Observed: serving
qurl whoami # owner should be your account
5. Open it yourself
qurl share <CRID>
Open the printed link in a browser. Your app loads. The link works once: open it again in another browser and it's refused. Create a new one whenever you need it.
6. Hand out links from your backend
On a website, your backend creates a link for each approved visitor. Store the backend key as LAYERV_API_KEY in your server's secret settings and the CRID as LAYERV_RESOURCE_CRID. Never send the key to the browser.
This is the call everhavencapital.com makes, using qurl-go v0.17.0: a link that must be opened within a minute, works once, and gives up to two minutes inside.
client, err := qurl.NewClient(qurl.BearerToken(os.Getenv("LAYERV_API_KEY")))
if err != nil {
return err
}
ctx, cancel := context.WithTimeout(ctx, 15*time.Second)
defer cancel()
portal, err := client.ResourceByCRID(os.Getenv("LAYERV_RESOURCE_CRID")).CreatePortal(ctx,
qurl.ValidFor(time.Minute),
qurl.WithSessionDuration(2*time.Minute),
qurl.OneTimeUse(),
qurl.MaxSessions(1),
qurl.WithLabel("Private app access"),
)
if err != nil {
return err
}
// Send portal.Link only to the approved person, with Cache-Control: no-store.
The starter's access-link/ folder is a complete program around this call. Run it with go run . after setting the two environment variables, and it prints one real link as JSON.
Only create links for people you've approved
Call LayerV only after your own sign-in and permission checks:
POST /access-link
1. Verify the user's session or access token on the server (Auth0 or your existing sign-in).
2. Check that this user may open this app. Pick the CRID from your own server-side settings,
never from the request.
3. Rate-limit per user, and log the decision without logging the link or the key.
4. Create the link and return it privately.
With Auth0, validate the access token's signature, issuer, audience, expiry and permissions with its server middleware (Auth0 guidance). Keep your sign-in page and this endpoint where users can reach them before they have a link. Your app should keep its own per-user permissions inside, as it does today.
7. Check it like an outsider
Run these before you put real data behind it. Each was run on the live Everhaven server on 4 November 2026.
| Check | How | Expected |
|---|---|---|
| No public door | From another network: nc -z -w 4 <server IP> 80 443 8080 |
No web port answers |
| One link, one visitor | Open a fresh link in a new browser profile, then the same link in a second new profile | First opens the app; second is refused |
| Your backend | Click through your real sign-in and open the link it returns | App loads |
| Survives a reboot | reboot, wait a minute, then qurl status <CRID> and a fresh link |
Observed: serving; link opens |
| Strangers can't mint | Call your link endpoint without signing in | Refused before LayerV is called |
Test only servers you own. A port that answers SSH for administration is normal; the point is that your app's port and the web ports don't answer.
8. Run it day to day
qurl status <CRID> # is it serving?
qurl list # everything you've published
qurl stop <CRID> / qurl start <CRID> # pause / resume sharing
systemctl --user restart ai.layerv.qurl.share-daemon.service # restart qURL's background service
qurl delete <CRID> --yes # remove for good; old links stop working
Updating your app needs no qURL changes: deploy it as usual on the same loopback port. Keep ~/.local/state/qurl/ backed up and private. It is the server's identity. Don't copy it to a second server.
9. Troubleshooting
| What you see | Fix |
|---|---|
login: "belongs to account device:…, not …" |
You published before logging in. Run qurl delete <CRID> --yes, stop qURL (systemctl --user stop ai.layerv.qurl.share-daemon.service), move ~/.local/state/qurl/connector-v2 aside, then qurl login and qurl publish again |
publish: "daemon state not_running" |
systemctl --user restart ai.layerv.qurl.share-daemon.service, wait 15 seconds, then qurl status <CRID> |
| Backend gets "not found" when creating links | The backend key is from a different account than the one that published. Use keys from the same account |
healthz fails |
Your app isn't listening on the loopback port. Fix the app; don't open a public port |
| Link opens but the page is broken | Check relative asset paths, redirects, cookies and your app's content-security policy |
10. Reuse and sources
The starter holds no keys, IDs or private data, only a harmless page, the Nginx config and the link program. For AI-assisted deployment, give the agent the agent checklist.
- qURL CLI releases · CLI reference
- qurl-go SDK
- LayerV dashboard · LayerV docs
- Reference source: public site · private app and server setup
Back to the demo