CloudPanel: Node.js, Python, static site and reverse proxy

In the examples 203.0.113.10 is your server address and my-site.com is your domain. The server address and panel password are in the e-mail with your credentials.

All types share: a domain, a site user (also SSH/SFTP), automatic redirect to HTTPS.

Node.js

The web server forwards requests to the application on the App Port. The application must listen on that port on 127.0.0.1.

Node.js site form
Node.js site form

Application files go to /home/myapp/htdocs/my-app.com/. Run it with pm2 (restarts the app after a crash and a reboot). Via SSH as the site user:

cd ~/htdocs/my-app.com
npm install
npm install pm2@latest -g
pm2 start npm --name my-app -- start
pm2 save

pm2 status — state. pm2 logs — application output. pm2 restart my-app — restart.

Python

Set the Python version and the app port. The application runs on that port (gunicorn, uvicorn, uWSGI).

Python site form
Python site form

Static HTML

A site without a backend. Upload index.html and the other files to /home/mylanding/htdocs/my-landing.com/.

Static site form
Static site form

Reverse proxy

The domain is forwarded to another address: an application in Docker on this server (http://127.0.0.1:8080) or another server. The certificate is issued in the panel as usual.

Reverse proxy form
Reverse proxy form

The port and the Node.js/Python version are changed on the site "Settings" tab. After a version change reconnect via SSH.