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:
- Navigate to your application directory (or clone a new project): cd~/flask_app
- (Optional) Replace default app: gitclone<your_repo_url> .
- Activate the virtual environment: sourcevenv/bin/activate
- Install required packages: pip install -r requirements.txt
- Make sure your WSGI entry point is named wsgi.pyand contains:fromyour_moduleimportappasapplication
- 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:
- Edit Nginx site config: sudo nano /etc/nginx/sites-available/gunicorn
- Test configuration: sudo nginx -t
- Reload Nginx: sudo systemctl restart nginx
7. Enable HTTPS (Optional)
Use Certbot to enable HTTPS.
