portless vs ngrok
Both portless and ngrok give local development servers a stable URL, but they solve different problems. ngrok is a commercial tunneling service that exposes local apps to the public internet via ngrok's cloud infrastructure. portless is an open source local proxy that gives apps stable .localhost addresses without routing traffic through any external server.
| Feature | portless | ngrok |
|---|
| License | Apache 2.0 | Proprietary |
| Traffic routing | Local only (loopback) | Via ngrok cloud servers |
| Named local URLs | Yes (.localhost, .test, custom TLD) | Free tier: random subdomain |
| Persistent subdomains | Yes (local, always stable) | Paid tiers only |
| HTTPS | Auto-trusted local CA | ngrok-managed certificates |
| Internet exposure | Optional (--ngrok or --funnel flags) | Core feature |
| Git worktree routing | Yes (automatic) | No |
| Monorepo support | Yes | No |
portless is the better choice when you want stable local URLs without depending on an external service, need no account, and want no bandwidth limits. The local CA approach means HTTPS works in development including for OAuth flows that require a secure origin.
ngrok is still the better choice when you need to share a local app with someone outside your network, receive webhooks from external services in real time, or demo a work-in-progress to a client on a public URL. For those cases, portless integrates with ngrok via the --ngrok flag, so you can have both a stable local .localhost URL and an ngrok tunnel running at the same time.
portless vs manual local HTTPS setup
The alternative to portless without any external service is to configure mkcert, a reverse proxy (nginx or Caddy), and /etc/hosts entries by hand. This approach is free, but it requires installing and maintaining multiple tools, breaks when ports change, and needs to be repeated per project. portless replaces that entire setup with one npm install and one command per app.