Deploying a GitHub repository
If you have a project hosted on GitHub that you want to deploy using Replit, the process is incredibly simple. Just follow these easy steps to import your repository, ensure its smooth operation, and deploy it to a public URL for hosting.
Import a Repl from GitHub
Navigate to https://replit.com/new or click the "+" button at the top right of the screen to create a new Repl.
Click the "Import from GitHub" button at the top right of the modal.
Enter the URL or the name of the GitHub repository you want to import. You do not need to be the repository owner.
Configure the Repl
After importing, configure the run command for the Repl. This is usually auto-filled, but you can modify it to suit your project's requirements.
Click the "Run" button at the top right of the screen to ensure the Repl can run.
The Repl will install packages and execute the run command.
Modify the Run Command
If you need to change the run command:
Click the "Show hidden files" button at the top right of the file tree and open the
.replitfile, change the
run = "npm run <your run command>"
Rerun the Repl to ensure it works as expected. Once confirmed, proceed to deploy the Repl.
Deploying the Repl
Click the "Release" button at the top right of the screen.
Select the "Deploy" option, allowing you to deploy the Repl to a public
<app-name>.replit.appURL (or a custom domain) for public hosting.
Choose the deployment tier you want to use. You can use the dropdown to select the perfect power for your deployment machine. Learn more about the different deployment tiers here.
Note: Dedicated machines provide full, unshared CPU power for consistent performance. In contrast, shared machines allocate CPU resources among multiple virtual machines, potentially leading to variable performance based on other users' activities.
Next, you will see a summary of the purchase. This includes the cost of the tier and if auto-refill is enabled. Click the "Deploy your project" button to continue.
Enter the build command, run command, and any environment variables needed for production.
Note: f "Health check before promoting" is selected, the system verifies that your deployment opens a port before promoting it. You can deselect this option to bypass the health check for projects that don't require opening a port (e.g., Discord or Slack bots).
Once you have entered the required information, click the "Deploy" button to initiate the deployment process.
Monitoring a Deployment
We offer a few ways of interacting and monitoring your deployments. You can view and change details such as custom domains, build logs, and build history. Find information on editing deployment details here.
If you're having trouble with your deployment or the deployment fails, refer to this page for steps to mitigate issues with deployments.