Static Deployments deploy your static websites and frontend apps to a cost-effective cloud server.
Static Deployments host your Replit App’s static files, such as HTML, CSS, and JavaScript on a cloud server. The server automatically uses caching and scaling strategies to deliver your content quickly and economically.
Static Deployments are ideal for the following use cases:
Static Deployments are not compatible with Replit Apps created using Agent. Agent automatically creates full-stack apps that require a backend server. For Agent-generated apps, use one of the following deployment types:
Static Deployments include the following features:
<app-name>.replit.app
URL to access your app.You can access Static Deployments in the Deployments workspace tool.
How to access Static Deployments
From the left Tool dock:
From the Search bar:
Specify the subdomain part of the hostname for your deployment. After you deploy, you can access your deployment at https://<subdomain>.replit.app
.
To learn how to use a custom domain, see Custom Domains.
The private deployment feature is available for Teams and Enterprise plans only.
Private deployments grant permission to your app only to members of your team or organization. This control lets you toggle whether to make your deployment private.
To learn how to set up a private deployment, see Private Deployments.
Specify the base directory path in your Replit App that contains the static files you want to serve publicly. After you deploy, the cloud host serves all pages and assets in that directory.
The default value, /
, is the root directory of your Replit App.
Specify a build command to run in your Replit App’s shell when you create your Deployment.
For example, if you generate a static site using Hugo,
you might use the command hugo --minify
to generate the files and optimize asset file sizes.
Select Add deployment secret to add environment variables or secrets your build command needs to run securely.
For example, if your site generator requires an API key to create your static site, you might pass it
API_KEY=<your secret name>
.