It’s not “in Virtualmin”. Web applications don’t run in Virtualmin.
You can generally follow the documentation for the application you are wanting to run. Usually, it will involve running it under an app server like unicorn, gunicorn, uvicorn, etc. and proxying to it from your web server, whether that’s Apache on nginx (most web apps provide documentation for both).
Virtualmin does nothing unusual that would prevent most web application documentation from being relevant and applicable.
Installing a different Python version can be done in a variety of ways. For development or one-off web applications, I have recently begun using uv
for this problem. I install a local (to my user) Python version and create a virtualenv
(also local to my user) so I can have exactly the version of Python and versions of libraries I need for my applications. uv
But, there are many ways to do it. Python has a cacophony of packaging and installation options, all terrible and incompatible in various ways. uv
is the least terrible I have found thus far.
You may also find your OS (which you have kept secret from us, which prevents specific suggestions) has options for installing other Python versions. e.g. the deadsnakes project for Ubuntu: deadsnakes · GitHub
I use the latter for production, I always use native system packages, so deadsnakes is where I get my Python versions (for my day job, where I am required to use Ubuntu and Python). I still build a virtualenv
for each application, because the Python community hates backward compatibility and has seemingly intentionally user-hostile deprecation and versioning practices that result in minor version changes in libraries or tools causing cascading dependency hell or breakages. So, the only sane way to handle it is to rebuild the whole virtualenv with some tool (uv
, pipenv
, poetry
, in order of least horrifying to most horrifying).
Note that you can use tools like uv
, pipenv
, poetry
, and virtualenv
, without root privileges, so domain owner users can do this all by themselves, with no administrator assistance, assuming they have ssh access and aren’t in a restrictive jail. They can also start application servers (we also have a module for creating init services for non-root users, so they can start app servers on boot…I’m not sure if that module is installed by default, though, I think it’s just called virtualmin-init
). And proxy rules can be created by non-privileged users, though some applications require something more complicated than the Proxy Paths Virtualmin feature can create and that might need some root assistance.