50% off all plans, limited time. Starting at $2.48/mo
Flask

Flask

Flask is a lightweight Python web framework. Minimal core, choose-your-own-components philosophy, ideal for APIs and microservices. Used at LinkedIn, Pinterest, and Netflix. The framework Python developers reach for when Django's structure is too much for the job.

Version

Latest

Operating System

Ubuntu Server 24.04 LTS

Min. RAM

1 GB

IP Types

IPV4,IPV6

1. SSH to Your Server

ssh root@<server-ip>

2. Find Login Credentials

  • Default user: flask
  • Password stored in: /root/.cloudzy-creds

(Optional) Change the default password: passwd flask

3. Switch to the App User

su - flask

4. Deploy Your App

A sample Flask app is already running and accessible at: http://<server-ip

To deploy your own app:

  1. Navigate to your application directory (or clone a new project): cd ~/flask_app
  2. (Optional) Replace default app: git clone <your_repo_url> .
  3. Activate the virtual environment: source venv/bin/activate
  4. Install required packages: pip install -r requirements.txt
  5. Make sure your WSGI entry point is named wsgi.py and contains: from your_module import app as application
  6. Restart Gunicorn to apply changes: sudo systemctl restart gunicorn

5. Access Your App

Your Flask app is available at: http://<server-ip

Nginx is reverse-proxying requests to Gunicorn via Unix socket.

6. Change Port or Domain?

To adjust domain, port, or add SSL:

  1. Edit Nginx site config: sudo nano /etc/nginx/sites-available/gunicorn
  2. Test configuration: sudo nginx -t
  3. Reload Nginx: sudo systemctl restart nginx

7. Enable HTTPS (Optional)

Use Certbot to enable HTTPS.

More in Development Tools

Related apps.

Deploy Flask now. From $2.48/mo.