File: local-https-development.md | Updated: 11/15/2025
Hide navigation
Search
Ctrl K
Home Guides EAS Reference Learn
Archive Expo Snack Discord and Forums Newsletter
Copy page
Learn how to set up local HTTPS for Expo web apps.
Copy page
When developing Expo web apps locally, you may need to use HTTPS with your local development environment for testing secure browser APIs. This guide shows you how to set up local HTTPS for Expo web apps.
This guide requires the following tool installed on your machine:
mkcert: A tool for creating development certificates. For installation instructions, see the mkcert GitHub repository
.1
Create or navigate to your Expo project:
Terminal
# Create a new project (if needed)
- npx create-expo-app@latest example-app
- cd example-app
# Or navigate to existing project
- cd your-expo-project
2
Start your Expo development server:
Terminal
Copy
- npx expo start --web
Your app will be running on http://localhost:8081. Keep this terminal window open.
3
Use mkcert to generate a certificate for localhost. Run the following command in a new terminal window from your project's root directory:
Terminal
Copy
- mkcert localhost
Tip: Ensure that after installing
mkcert, you runmkcert -installto install the local certificate authority (CA).
This will generate two signed certificate files: localhost.pem (certificate) and localhost-key.pem (private key), inside your project's root directory.
4
Inside your project's root directory, run the following command to start the proxy:
Terminal
Copy
- npx local-ssl-proxy --source 443 --target 8081 --cert localhost.pem --key localhost-key.pem
Tip:
local-ssl-proxyis a tool that creates a proxy server that forwards HTTPS traffic from port 443 to your Expo dev server on port 8081.
This creates a proxy that forwards HTTPS traffic from port 443 to your Expo dev server on port 8081.
5
Open https://localhost in your browser to access your app. Your Expo app is now running with HTTPS.