VirtualMin Manual Django Installation

Operating system: Ubuntu 20.04 LTS
OS version: Latest

Hello, I recently installed VirtualMin GPL and I couldn’t set up a django project. I saw that django is not supported in GPL anymore but Pro version is not available currently, so this is my only option in order to keep using VirtualMin.

Is there any other way to install django even from the terminal in a virtual server in VirtualMin.

Thanks in advance.

There is nothing stopping you from setting up Django in the usual way (probably with gunicorn app server, Apache or nginx proxying to it). It’s how I recommend running any modern app framework in Virtualmin.

To go further, for Python apps, I create a virtualenv, lately using pipenv to run it. This seems to currently be the most commonly recommended best practice for any Django or Flask app. This gives you the ability to use any Python version, all owned by and running as the domain owner, etc. You can use the Virtualmin init module to allow the user to start the service on boot (or create a systemd unit yourself, if you have root). Jamie was working on adding easier setup for this sort of “app server + proxy + startup” model, but I’m not sure if it’s in 6.16 or still in development. But, you can already setup proxy rules in Virtualmin, if you don’t want to do it on the command line.

I’m not sure if we’re shipping Django in Virtualmin Pro these days, it may have been removed due to being sort of uncomfortable to use and not super actively maintained (most Django users were running it outside of control of Virtualmin because they wanted to do it the way everybody else in the Django community does it). Both Ruby on Rails and Django have changed so much and the way we were setting them up used pretty old-fashioned practices…the proxy-to-app server model is universal with modern web frameworks in most languages (Perl and node.js, too), so it’s what I recommend. If you search the forum for recent Ruby on Rails discussion, you’ll see more commentary on this and notes about what’s coming (and maybe already in 6.16, I’m not sure…I haven’t talked to Jamie or dug into the changelog and code to know).

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.