- Sign in at replit.com and open your Flask project from the dashboard.
- In your workspace, click New Tab and select Shell to open a terminal session.
- In the Shell, run your app using the command python main.py Flask starts and displays a local URL - usually http://0.0.0.0:5000.
Note: You may see a development server warning in the output - this is expected and won't affect functionality for hosting purposes. - To keep the app running after detaching from the session, start a new screen by typing screen -S [flaskapp] and pressing Enter, then run python main.py inside it.
- Detach from the screen session by pressing Ctrl+A, then D. Your Flask app continues running in the background.
- Open the Webview tab in your workspace to preview your running app, or copy the project URL from the browser address bar to share it.
How to Host a Flask App on Replit
Walk through this interactive demo to learn how to host a flask app on Replit.
📌 Why this matters
Why this matters
Hosting your Flask app this way lets you share a live, working version with others without paying for deployment services. You get a real URL that anyone can access, making it perfect for demos, portfolio projects, or quick prototypes. The screen session technique is particularly valuable because it mimics how applications run on actual servers. Learning this workflow prepares you for managing processes in production environments, where keeping services running independently of your terminal session is essential.
Your product deserves an interactive demo
Similar Articles
No items found.
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
.gif)
