Rconsole docs · v1.4.2 GitHub

Hosting web apps

Two ways, both behind Rconsole's login (unless you use expose --public):

expose — you start the program, Rconsole publishes it. Works for anything that serves HTTP, on the host or inside any VM:

$ python main.py &              # or: flask run -p 8000, npm run dev, uvicorn app:app --port 8000, …
$ expose 8000 myapp             # -> https://<your-domain>/myapp/
$ expose list                   # [up]/[down] status
$ expose rm myapp

Apps that don't know they live under a path prefix can use expose 8000 myapp --rewrite (fixes root-relative links in HTML/CSS). The proxy sends X-Forwarded-Prefix, so prefix-aware frameworks work natively. Details and limits (no WebSockets) are in COMMANDS.md.

service — Rconsole starts and keeps the app running (this replaces sudo serve / sudo gunicorn, removed in 1.2.2):

$ service add site --vm debian --cwd /root/site --expose 8000:site python3 -m http.server 8000
$ service add app  --vm debian --cwd /root/app  --expose 8000:app  gunicorn -b 127.0.0.1:8000 app:app
$ service logs app

Edit this page on GitHub