This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Introduction to Expo Hosting
Edit page
Expo Hosting is a service for quickly deploying web projects built using the Expo Router library and React Native web.
Expo Hosting is a service from Expo Services for quickly deploying your web projects built using Expo Router and React Native web. It seamlessly integrates with the Expo CLI, allowing you to automate the deployment of API routes, server functions, and server-side assets.
Expo Hosting offers the fastest path from npx create-expo-app to a fully deployed web app with API routes and server functions.
Quick start
The commands for Expo Hosting start with
easand require EAS CLI. See How to install EAS CLI for more information.
To deploy your web app, you need to create a static build of your web project. Run the following command to export your web project into a dist directory:
To publish your web app, run the following command:
Once your deployment is complete, the EAS CLI will output a preview URL to access your deployed web app.
Expo Skills for AI agents
If you use an AI agent, install Expo Skills to teach it how to deploy your web app and API routes:
Deploy Expo websites and Expo Router API routes to EAS Hosting - export the web bundle, deploy to production or PR preview URLs, manage environment secrets and custom domains, and work within the Cloudflare Workers runtime.
Why Expo Hosting
Historically, traditional website hosting services were recommended for deploying Expo Router and React apps. However, this approach doesn't address the unique challenges of dealing with native apps. Here are some key limitations:
-
Version synchronization: During the app store publishing process, you may need to deploy new versions of your servers.
-
Request routing complexity: Different versions of your native app may require routing to specific server versions. This can create additional complexity when handling requests.
-
Platform-specific analysis: When running native apps, you need enhanced observability for platform-specific metrics.
Expo Hosting addresses these limitations by providing a unified deployment experience across all platforms.
When to use Expo Hosting
Frequently asked questions (FAQ)
What web output modes can I use with Expo Hosting?
Expo Hosting supports all three output modes configured in your app config's expo.web.output:
single: Exports your Expo app to a single-page app with only one index.html outputstatic: Exports your Expo app to a statically generated web appserver: Supports server functions and API routes as well as static pages
Can I use API routes with Expo Hosting?
Expo Hosting fully supports API routes (files ending with +api.ts) when using the server output mode. You can monitor crashes, logs, and requests from your API routes in the Expo dashboard.
What runtime does Expo Hosting use?
Expo Hosting is built on Cloudflare Workers, which runs on the V8 JavaScript engine. It uses V8 isolates instead of full Node.js processes. Node.js compatibility modules are available but with some limitations. See the worker runtime reference for the full list of supported modules.
Can I set up a custom domain for my production deployment?
Custom domains are available on paid plans. Each project can have one custom domain assigned to the production deployment. Both apex domains and subdomains are supported.
How can I create deployment aliases?
Expo Hosting deployments are immutable. Each deployment gets a unique preview URL. You can create aliases to assign custom names to deployments (such as staging or production). Since deployments are immutable, you can instantly roll back by reassigning an alias to a previous deployment ID using eas deploy:alias --prod --id=<deploymentId>.
What monitoring capabilities are available in Expo Hosting?
Expo Hosting provides built-in monitoring in the Expo dashboard:
- Crashes: View uncaught errors from API routes, grouped by similarity
- Logs: All
console.log,console.info, andconsole.erroroutput from API routes - Requests: Request metadata including status, browser, region, and duration
How can I configure caching in Expo Hosting?
API routes can return Cache-Control directives that Expo Hosting uses to cache responses on its global CDN (Content Delivery Network). Static assets are cached with a default browser cache time of 3600 seconds. See the Caching reference for details.
Can I use Expo Hosting with Expo Workflows?
Expo Hosting integrates with Expo Workflows using the deploy job type. You can add a deploy job to your workflow configuration. For example:
jobs: deploy_web: type: deploy environment: production params: prod: true
You can also deploy to a specific alias or make production conditional based on the branch:
jobs: deploy: type: deploy params: prod: ${{ github.ref_name == 'main' }}
For more information, see the Web deployments with Expo Workflows.
Get started
From a new app to a deployed website in under a minute.
Create aliases and promote deployments to production.
Use environment variables in your web and server code.
Set up a custom domain for your production deployment.
Inspect requests from API routes on the Expo Hosting dashboard.
Automate deployments with Expo Workflows.