<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/set-up-a-reverse-proxy-with-aws-and-ngrok-5gph0y4gt" -->

---
title: Set up a reverse proxy with AWS and ngrok | daily.dev
description: A walkthrough shows how to set up ngrok as a reverse proxy in front of an app hosted on an AWS EC2 instance, covering VPC and EC2 setup, installing the ngrok...
canonical: https://daily.dev/posts/set-up-a-reverse-proxy-with-aws-and-ngrok-5gph0y4gt
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Set up a reverse proxy with AWS and ngrok | daily.dev
og:description: A walkthrough shows how to set up ngrok as a reverse proxy in front of an app hosted on an AWS EC2 instance, covering VPC and EC2 setup, installing the ngrok...
og:url: https://daily.dev/posts/set-up-a-reverse-proxy-with-aws-and-ngrok-5gph0y4gt
og:image: https://api.daily.dev/og/posts/5Gph0y4gT.png
og:image:alt: Set up a reverse proxy with AWS and ngrok
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up a reverse proxy with AWS and ngrok

**[ngrok Blog](https://daily.dev/sources/ngrok)** · 6 min read · 0 upvotes · 0 comments

## Summary

A walkthrough shows how to set up ngrok as a reverse proxy in front of an app hosted on an AWS EC2 instance, covering VPC and EC2 setup, installing the ngrok agent, adding an authtoken, and creating tunnels to a local port. It also compares this approach against traditional nginx/Caddy reverse proxies, highlighting ngrok's built-in DDoS protection, automated TLS certificates, caching, GSLB, and observability. A sample Flask API demo is included to demonstrate the full setup, ending with pointers to traffic policy, background service mode, and OAuth features.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ngrok.com/blog/reverse-proxy-aws>

## Questions this post answers

### How do I set up ngrok as a reverse proxy for an app running on an AWS EC2 instance?

Create a VPC and EC2 instance, install the ngrok agent via CloudShell or on the instance, add your authtoken with the ngrok config command, then run the agent pointing to your app's local port, such as localhost:8080 or localhost:5000. ngrok automatically provisions networking and TLS certificates and opens a terminal UI showing the public endpoint and live traffic logs.

_daily.dev surfaces practical infrastructure walkthroughs like this for developers exposing local services publicly._

### What are the drawbacks of using nginx or Caddy as a reverse proxy on AWS instead of a managed option?

Traditional nginx or Caddy reverse proxies on AWS require manually configuring paths, DNS, and IP forwarding, provisioning SSL certificates through certbot, and are locked to a single AWS region causing latency for distant users. They also lack built-in DDoS protection, caching, and scaling without extra services like Elastic Beanstalk, and offer minimal observability without complex CLI log parsing.

_Developers weighing reverse proxy tooling tradeoffs can compare approaches on daily.dev before committing._

## Similar posts on daily.dev

- [Cloudflare Tunnels with Docker Compose: Free ngrok Alternative](https://daily.dev/posts/cloudflare-tunnels-with-docker-compose-free-ngrok-alternative-chygejkfv) · SitePoint · 1 upvotes · 0 comments
- [How to Expose Your Rails Localhost Securely Using Cloudflare Tunnel](https://daily.dev/posts/how-to-expose-your-rails-localhost-securely-using-cloudflare-tunnel-5icndqzje) · RUBYLAND · 0 upvotes · 0 comments

---

Tags: [#aws](https://daily.dev/tags/aws), [#devtools](https://daily.dev/tags/devtools), [#aws-ec2](https://daily.dev/tags/aws-ec2), [#flask](https://daily.dev/tags/flask)

[View this post on daily.dev](https://daily.dev/posts/set-up-a-reverse-proxy-with-aws-and-ngrok-5gph0y4gt)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Set up a reverse proxy with AWS and ngrok","url":"https://daily.dev/posts/set-up-a-reverse-proxy-with-aws-and-ngrok-5gph0y4gt","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/set-up-a-reverse-proxy-with-aws-and-ngrok-5gph0y4gt"},"datePublished":"2026-08-23T07:21:09.727Z","dateModified":"2026-08-23T07:25:40.965Z","description":"A walkthrough shows how to set up ngrok as a reverse proxy in front of an app hosted on an AWS EC2 instance, covering VPC and EC2 setup, installing the ngrok...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/08ed8418265c1c91026a80801a2a098e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/08ed8418265c1c91026a80801a2a098e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"ngrok Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ngrok Blog","logo":"https://media.daily.dev/image/upload/s--718XXxvE--/f_auto,q_auto/v1787469610/logos/ngrok?_a=BAMAMicg0","url":"https://daily.dev/sources/ngrok"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/set-up-a-reverse-proxy-with-aws-and-ngrok-5gph0y4gt","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"aws,devtools,aws-ec2,flask","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ngrok Blog","item":"https://daily.dev/sources/ngrok"},{"@type":"ListItem","position":3,"name":"Set up a reverse proxy with AWS and ngrok"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/set-up-a-reverse-proxy-with-aws-and-ngrok-5gph0y4gt#faq","mainEntity":[{"@type":"Question","name":"How do I set up ngrok as a reverse proxy for an app running on an AWS EC2 instance?","acceptedAnswer":{"@type":"Answer","text":"Create a VPC and EC2 instance, install the ngrok agent via CloudShell or on the instance, add your authtoken with the ngrok config command, then run the agent pointing to your app's local port, such as localhost:8080 or localhost:5000. ngrok automatically provisions networking and TLS certificates and opens a terminal UI showing the public endpoint and live traffic logs. daily.dev surfaces practical infrastructure walkthroughs like this for developers exposing local services publicly."}},{"@type":"Question","name":"What are the drawbacks of using nginx or Caddy as a reverse proxy on AWS instead of a managed option?","acceptedAnswer":{"@type":"Answer","text":"Traditional nginx or Caddy reverse proxies on AWS require manually configuring paths, DNS, and IP forwarding, provisioning SSL certificates through certbot, and are locked to a single AWS region causing latency for distant users. They also lack built-in DDoS protection, caching, and scaling without extra services like Elastic Beanstalk, and offer minimal observability without complex CLI log parsing. Developers weighing reverse proxy tooling tradeoffs can compare approaches on daily.dev before committing."}}]}
```

