Build ngrok

KINDAreplaces $10/mosaves $120/yrback to the verdict

0%0 of 17 items done

Saved on this device only. Tick prerequisites first, then work the phases in order · do not start one until the checks above it pass.

A tunnel to localhost on a VPS you already have: frp exposes a local port on a subdomain you own, Caddy terminates TLS, every tunnel is protected by default, and a local log shows and replays incoming requests. cloudflared does most of this for free; this is for owning the plumbing.

estimated effort one sittingthe files for this build are in the project pack

Tunnelfrp (server on the VPS, client locally)TLSCaddy with a wildcard subdomain

Before step 1

Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.

  1. installfree

    Why Every step below is a command you type or a file you edit.

    Get it VS Code (code.visualstudio.com), Cursor or Zed. Open a folder for the project and use the editor's built-in terminal. open ↗

    Verify You can open a folder and run a command in its terminal

  2. installfree

    Why History for your code, and the way most hosts deploy.

    Get it Install from git-scm.com or with your package manager, then run git init in the project folder once it exists. open ↗

    Verify git --version prints a version

  3. decidefree

    Why Cloudflare Tunnel is free and covers most hobby use with one command. This build is for wanting your own box.

    Get it developers.cloudflare.com/cloudflare-one/connections/connect-networks open ↗

  4. about $5 a month

    Why The public end of the tunnel.

    Get it Smallest Ubuntu 24.04 instance. open ↗

  5. free on a domain you own

    Why *.tunnel.yourdomain.com so each tunnel gets a name.

    Get it Add an A record for *.tunnel pointing at the VPS.

  6. installfree

    Why frps on the server, frpc on your machine.

    Get it Download the release for each platform from github.com/fatedier/frp/releases. open ↗

    Verify frps --version and frpc --version print

  7. installfree

    Why Automatic HTTPS in front of the Node process. Without TLS the browser features this relies on (and your visitors' trust) do not work.

    Get it On the VPS: follow the install steps at caddyserver.com/docs/install for Ubuntu. One Caddyfile with your domain and a reverse_proxy line is the whole config. open ↗

    Verify caddy version prints a version on the server

Environment variables

These go in a .env file the app reads at startup. The pack's .env.example is this table as a file · copy it, never commit the filled-in version.

VariableNeededExampleWhere the value comes from
FRP_TOKENsecretrequiredlong-randomopenssl rand -hex 32; the same value on server and client.
TUNNEL_DOMAINrequiredtunnel.yourdomain.comThe wildcard base.
BASIC_AUTH_USERrequiredmeDefault protection for every tunnel.
BASIC_AUTH_HASHsecretrequired$2a$14$...Caddy hash-password output.

The build, in order

  1. The server

    frps bound to localhost with a token; Caddy issuing wildcard certificates.

    1. Files frps.toml

    2. Wildcard certificates need the DNS challenge; Caddy needs a DNS provider module or use per-name certificates on demand.

      Files Caddyfile

    done when · tick each as it passes
  2. The client

    tunnel <port> <name> prints a URL and cleans up on exit.

    1. Files tunnel.sh

    done when · tick each as it passes
  3. Protection

    Never public by accident.

    1. terminal
      caddy hash-password
    done when · tick each as it passes
  4. Inspection

    See and replay incoming requests locally.

    done when · tick each as it passes
  5. Service and README

    Survives a reboot; documented.

    1. Files README.md

    done when · tick each as it passes
what this build does not replace
after v1, if you want it

Need the files? The project pack on the verdict page hands your agent the whole brief · more dev tools.