--minimal flag not working when installing Virtualmin

Operating system: Ubuntu
OS version: 20.04 x64

Hello,

I’m trying to install virtualmin on a 512MB server using the install.sh approach with the –minimal flag but got the following message which is usually shown when I’m not using the –minimal flag:

 The selected package bundle is LAMP and the size of install is
  minimal. It will require up to 500 MB of disk space.

  Exit and re-run this script with --help flag to see available options.

 Continue? (y/n) y
[ERROR] Memory is below 1024 MB. A full installation may not be possible.

  Your system has less than 1024 MB of available memory and swap.
  Installation is likely to fail, especially on Debian/Ubuntu systems (apt-get
  grows very large when installing large lists of packages). You could exit
  and re-install with the --minimal flag to install a more compact selection
  of packages, or we can try to create a swap file for you. To create a swap
  file, you'll need 488MB free disk space, in addition to 200-300MB
  of free space for package installation.

  Would you like to continue? If you continue, you will be given the option to
  create a swap file. (y/n)

How can I install a minimal version of virtualmin?

@shillongserver,

The minimal install removes extras like ClamAV and other optional packages by default. The install still requires at least 1GB of RAM to install, and based on my experience 2GB of RAM is recommended for best performance.

Keep in mind, if you intend to run all services including Web Server, Database Server, and Email you’ll typically need even more RAM and potentially a reasonable amount of CPU resources.

I personally do NOT run Virtualmin installs with less than 2GB of RAM and Webmin installs (when running DNS-only or MySQL-only) with less than 1GB of RAM.

512MB may be possible in some cases, but definitely not recommended for production.

If you’d like help installing and optimizing your install, drop me a line. I have helped countless folks in the past reduce overhead and optimize their installs to run on the slimmest possible VPS’, but again this does not neglect the above recommendations.

Best Regards,
Peter Knowles | TPN Solutions

Affordable, Professional IT Support – https://tpnassist.com

My experience with installing Virtualmin on low resource / low memory servers differs from that of @tpnsolutions.

I have been able to install on servers with 512 MB RAM a minimal version of Virtualmin on CentOS 7 and use it for production as a web server - vps05.indiax.com is one example of this.

Most of my installs were before the lockdown and I understand that the newer versions of Virtualmin which have been released during and after the lockdown have alerts on low memory systems which mention a higher minimal requirment for RAM than before.

I will run some test installs over the weekend and post an update but I still maintain that 512 MB is enough to run a hosting service with web (nginx), mail (without antivirus and antispam) and database hosted remotely on another system.

Note that in both the topic and in your text you have a single long dash, instead of to regular ones (- -).
Don’t know if that’s what you actually entered in the terminal, but the minimal option still works just fine.

512MB is fine for quite a few tasks actually, and a couple of my NS run only on 512MB, whilst my main Virtualmin instance is bigger of course, for running MySQL and so on.
Spam- and virusfiltering is offloaded on separate servers so I don’t run that on my Virtualmin servers.

@shillongserver, @calport, @toreskev,

So let me clarify something, ONCE.

You COULD run a system with less memory, but in my expert opinion, a minimum of 1GB is still HIGHLY recommended. Personally, 2GB gives your system room for growth and allows you to run without having to use SWAP which is not recommended on SSD anyways.

Finally, if you are using any reputable VPS provider, you’re likely gonna get a “minimum” of 1GB with your VPS for a mere $5 USD or less.

Anyways, we could continue chatting about “what may be possible – technically” but what we should really be talking about is what is recommended based on over 2 decades of experience working with servers and what will not leave your system running into problems.

Again, if you are running a “single” service like DNS, or a low, low, low usage MySQL server 512MB is enough, but if you plan on running which I suspect you are…

Apache
MySQL
PHP

At the least…

You will start to feel a pinch running with less than 1GB RAM and eventually wish you hadn’t wasted time cheaping out when again 1GB RAM from most major players is like $5 USD per month.

Enough said, no more on this topic unless things become more “productive” in this thread.

My offer for assistance privately is still available if you decide to use it.

Best Regards,
Peter Knowles | TPN Solutions

1 Like

That’s Discourse behaving like a word processor (a topic for another day). Its markdown editor converted a pair of dashes into an em dash.

That’s what I think also, but might make sure that the OP hasn’t just copy/pasted that into his terminal :slight_smile:

Good catch. Pasting high ASCII in a terminal is something I’ve been known to do. :crazy_face:

Its double - -

The memory checker limits are set, I think, at 1GB for minimal install and 1.5GB for full install. This means it’ll ask about creating a swap file for systems below those limits. You should let it create a swap file, or create one manually and start the install over (if you want a bigger swap than what Virtualmin creates, which will be the smallest it can create and still probably have a fully functioning system at the end).

The message should be improved, I guess, to recognize whether it’s already a minimal install. But, you’re doing the right thing. If you have less than 1GB of real memory, it would be unreasonable to try to run the full stack (running mail at all it is a bad idea, but minimal mode still sets up the basics).

When you choose y here, it will then ask if you want to create a swap file. If you say y again, it’ll try to create a swap file that brings you up a little over 1GB, and then continue if that succeeds. If it can’t create a swap file, it will fail. There’s no reasonable way to proceed without at least a little swap on such a small system. We probably need an even smaller mode just for web service. I’ll consider adding one for Virtualmin 7.

The code that makes these decisions is here:

In short, to answer your question, “How can I install a minimal version”, just say “y” to both of the questions it asks about proceeding. I’ll try to get that error more aware that it’s already in minimal mode soon. But, it just isn’t very smart right now.

That’s it right there.

It’s like a video game: just because your system makes the “minimum requirements” of the game doesn’t mean you’re going to have a very enjoyable experience. Meeting the “recommended requirements” means you’ll have a full, enjoyable experience and not be frustrated as hell when you start trying to push it a bit and wind up having issues.

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