Getting code onto the internet is two different jobs. You expose something you are already running: a public URL for a port on your laptop or a service in your cluster. Or you deploy something you built: a host takes your repository or your build folder and serves it. Most teams use one tool for each, and then set who may open what in two places. On Ngris both jobs end in the same thing, an endpoint on one edge, and an endpoint takes the same rules whichever way it was made. This post shows both doors and the rules they share.
Two jobs in one week
On Monday you are building a feature and a teammate needs to see it, or a webhook provider has to reach your laptop. That is an expose job, and you reach for a tunnel. On Thursday the site is ready and needs an address people can bookmark. That is a deploy job, and you reach for a host.
The work hides in the seam between the two. The tunnel has one way to ask for a password, the host has another. A firewall, a rate limit or an address allow-list is set up once here and once there, in different words. What protects "the thing on my laptop" and "the thing I shipped" ends up configured in two places that do not know about each other.
Expose: a public URL for what you run
# install the agent, sign it in once, point it at the port
curl -fsSL https://ngris.com/install.sh | sh
ngris auth --token
ngris http 3000
The agent connects out to the edge, and the edge gives the port a public HTTPS URL. Nothing is opened on your network. It works for HTTP, raw TCP and UDP. Every step, per system, is in how to expose localhost to the internet.
Deploy: host what you built
# one call: creates the app, its first deploy and its public URL
curl -X POST "https://api.ngris.com/v1/applications/quick-deploy" \
-H "X-API-KEY: $NGRIS_API_KEY" \
-F "name=my-site" \
-F "file=@dist.zip" \
-F "wait=true"
Or connect a GitHub or GitLab repository and every push builds and deploys. Ngris detects the framework (Vite, Next.js, Astro, SvelteKit, Create React App, Nuxt, Gatsby, Angular, Hugo), runs the build in a sandbox, and serves the output; files that are already built are served as they are. Each deploy is kept as a version you can roll back to. The walk-through is deploying a React or Vite app.
One kind of endpoint, the same rules
A tunneled service and a deployed app are both endpoints, so what you learn for one holds for the other:
| You want to | On a tunnel | On a deployed app |
|---|---|---|
| Get a public HTTPS URL | ngris http 3000 | Upload a zip or push to Git |
| Ask for a sign-in | A password, a token or single sign-on on the endpoint | The same, on the app's endpoint |
| Attach a firewall or the WAF | A rule on the endpoint | The same rule |
| Rate-limit, or allow only some addresses | A rule on the endpoint | The same rule |
| Use your own domain, with HTTPS | Yes | Yes |
| See the requests and replay one | Traffic Inspector | Traffic Inspector |
So the WAF in front of your deployed marketing site is the same rule as the one in front of your tunneled staging API, and the sign-in on an internal dashboard works the same whether the dashboard runs on your server or is hosted. The rules are described in the traffic policy docs and the sign-in in the security docs.
Beyond a static site
Deploy is not only for front ends. A Go, Node or Python service is detected and built, anything else runs from a Dockerfile, a Next.js server included, and it runs behind the same rules as the front end. Serverless functions handle work that runs per request, and a full-stack app can connect a managed database. The docs have a page for each: backend apps, full-stack apps, serverless functions, databases.
Iris drafts the rules
You can write rules by hand, or describe what you want to Iris, the assistant in the dashboard:
"Block requests from outside the EU and rate-limit
/login to 10 attempts per minute per IP."
Iris drafts the two rules and shows a confirmation card: exactly what will change, and what the rules would have done to your recent traffic. By default nothing is applied until you approve it; the one thing you can let Iris do on its own is add new firewall rules. Because a deployed app and a tunnel are the same kind of endpoint, the same request works on both. More in meet Iris.
Hosted for you
You do not run the edge. You install a small agent for tunnels, or push a build for deploys, and the edge does the rest in several regions, with certificates issued and renewed. There is a free plan to start, with no credit card; the pricing page lists the current plans and what each includes.
One edge for expose and deploy
Create a free account, run ngris http 3000, and ship your first app.
Frequently asked questions
What is the difference between exposing and deploying with Ngris?
Exposing gives a public HTTPS URL to a service you are already running, on your machine or in a cluster: run ngris http 3000 and the edge forwards requests to your process. Deploying takes a repository or a build folder, builds it when needed, and hosts it. Both end as the same kind of endpoint on the same edge.
Can one tool both tunnel my localhost and host my site?
Yes. On Ngris tunnels and app hosting run on one edge under one account. A tunneled service and a deployed app are both endpoints, so the sign-in, firewall and rate-limit rules you set on one work the same way on the other.
Does Ngris build React, Vite or Vue apps?
Yes. Ngris runs the install and the build in a sandbox and serves the output. It detects Vite, Next.js, Astro, SvelteKit, Create React App, Nuxt, Gatsby, Angular and Hugo, you can set your own build command and output folder, and files that are already built are served as they are.
Does Ngris run backends and serverless functions?
Yes. A Go, Node or Python service is detected and built, anything else runs from a Dockerfile, a Next.js server included. Serverless functions handle work that runs per request, and a full-stack app can connect a managed database.
Is the same security available on tunnels and on deployed apps?
Yes. Both are endpoints, so a sign-in, firewall rules, the web application firewall, rate limits and the Traffic Inspector apply to either one in the same way.
What does Iris do?
Iris drafts firewall, rate-limit, traffic-policy and routing rules, error pages and metric alerts from a plain description, and shows what a rule would have done to your recent traffic before anything is applied. By default every change waits for your approval. It also answers questions about your account and explains why a request was blocked.