Bugs cloudmin Debian 12 and install script. Keeping track brainsheet

The script below shirehosting’s comment is to remedy some of the oddities with Debian 12 (not all of them)

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
This will ensure suspend is disabled as it is wonky in debian 12 from my expirence and your server will shut down if not in use.

apt install bridge-utils
Will need this for setting up bridges.

sudo apt install qemu-system libvirt-daemon-system
This will enable you to setup KVM instances as cloudmin does not properly fetch the files for you from the repo’s.

There have been other “fixes” incorporated.
DHCP3 error fix need updated package name
AJAXTERM or root shell not working because it can’t find python3

Other unfixed bugs:
VNC software within cloudmin shows port 5701 and its actually port 5901 that should be used. Also the software for VNC is fairly dated a “flash based vnc” Flash has long been discontinued. So VNC viewing and management of emulated machines needs an overhaul not quite easily or readily done as those I feel are integrated cloudmin features. Cloudmin KVM server Status SSH what next?

File management gives errors concerning Java

APT keys the way they are stored doesn’t follow suit with the modern approach.

KEA-DHCP appears to be the migration that is being headed to thus DHCP3 and the new relevant package ISC-DHCP may not be the best route to continue traveling. And ISC-DHCP fails to start with an error if you install it dunno still odd but DHCP3 was replaced so it isn’t an option as a package.

Also of note may be a personal bug but the terminal overlay when you click the terminal button in the menu at the bottom appears to not show inputs and the output is a mess tested on several browsers and PC’s same result. Sometimes it freezes and don’t accept input as well. But the regular terminal in the webmin menu seems to operate fine. Maybe its a resolution or DPI setting seeing as how you need to run 4k monitors at 200%DPI to make it readable for my middle aged eyes at least :wink: I am unsure I did post on github but seems the Dev can’t recreate the problem anyone else with this problem I’d urge you to report it as well.

I will list more as I find them. This thread contains more than one issue it is a documentation of many issues sometimes it is advantageous to do this and in this case I believe it is while I understand the need to be issue specific in most cases there is simply a lot of bugs and issues it it is a lot harder for me to keep track of what I might have mentioned already as I’m trying not to make double and triple posts here. So one thread to kinda condense things is needed for my own sanity so I can quit spamming the form and stay focused on discovery and proposal.

Still trying to work out some more pointers as I go.

If you notice any bugs in cloudmin and debian 12 also share them with me I am new to using it so that is a bug in itself :wink: knowing is half the battle. So I’m trying to get to know what works and whats broken as I go but maybe you already know of some other things if you do share it!
Hope this helps someone.


Whilst I appreciate your post I think we should be getting the installer script sorted so that people dont keep having the same issues over and over.

You’ll need to enter your serial and key but this should do the trick I believe the only thing I didn’t fix was the keyring issue I’d have to look into how to do that in the script a little further
Maybe something like:

retrieve the key and add the key :

curl -s URL | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/NAME.gpg --import

authorize the user _apt :

sudo chown _apt /etc/apt/trusted.gpg.d/NAME.gpg

dunno though for sure on that one maybe not the secure way to do things beats me.

but if you put your key there and your serial there where it says it should do those 3 things I’ve mentioned :wink: yeah not impossible.
Added in 2 or 3 more fixes I found that fix some of the errors or behavior

This is in no way or shape the legit install script for anyone reading use at your own risk :wink: Debian 12 just trying to get things running a bit better.

I put an echo and description with my nickname to easily pick out the things that are updated in the script so that the staff can pickup wherever or copy it and make it their own whatever works.
DHCP is not ISC DHCP thats why it fails. and I think it might even be migrating to something different now as well to complicate matters even further like KEA

Kea has robust support for host reservations, but it is different from ISC DHCP’s. In ISC DHCP all host reservations are global; in Kea, host reservations are by default per-subnet, although global host reservations are also supported. So those are the two avenues to take for cloudmin virtualmin so it depends what works best for the future of the software it seems like KEA is being suggested as a replacement to ISC so IDK things change fast.

Personally I’d say KEA provides more configuration so … But yeah its on the debian wiki DHCP_Server - Debian Wiki that its being framed as the replacement so could get ahead of the curve on this one.

Still Need Fix for:
Also depreciated key error fix info is here Fix apt key depreciated error but I have yet to incorporate it into the install script.

Also need to know if we are going to get ahead of the curve with KEA instead of using ISC-DHCP and having to transition later…

Update fixed perl-sha1 script no longer needed
Update fixed cgroup-bin upgraded to cgroup-tools

# cloudmin-debian-install.sh
# Copyright 2005-2009 Virtualmin, Inc.
# Installs Cloudmin and all dependencies on a Debian or Ubuntu system

if [ "$SERIAL" = "" ]; then
if [ "$KEY" = "" ]; then

# Define functions
yesno () {
	while read line; do
		case $line in
			y|Y|Yes|YES|yes|yES|yEs|YeS|yeS) return 0
			n|N|No|NO|no|nO) return 1
			printf "\nPlease enter y or n: "

# Ask the user first
cat <<EOF
*           Welcome to the Cloudmin installer, version $VER           *

 Operating systems supported by this installer are:

 Debian 4.0 or later on i386 and x86_64
 Ubuntu 8.04 or later on i386 and x86_64

 If your OS is not listed above, this script will fail (and attempting
 to run it on an unsupported OS is not recommended, or...supported).
printf " Continue? (y/n) "
if ! yesno
then exit
echo ""

# Cleanup old repo files
grep -v cloudmin.virtualmin.com /etc/apt/sources.list >/etc/apt/sources.list.clean
mv /etc/apt/sources.list.clean /etc/apt/sources.list

# Check for apt-get
echo Checking for apt-get ..
if [ ! -x /usr/bin/apt-get ]; then
	echo .. not installed. The Cloudmin installer requires APT to download packages
	echo ""
	exit 1
echo .. found OK
echo ""

# Make sure we have wget
echo "Installing wget .."
apt-get -y install wget
echo ".. done"
echo ""

# Check for wget or curl
echo "Checking for curl or wget..."
if [ -x "/usr/bin/curl" ]; then
	download="/usr/bin/curl -s "
elif [ -x "/usr/bin/wget" ]; then
	download="/usr/bin/wget -nv -O -"
	echo "No web download program available: Please install curl or wget"
	echo "and try again."
	exit 1
echo "found $download"
echo ""

# Validate licence with wget
echo Validating Cloudmin serial number and key ..
$download "http://${SERIAL}:${KEY}@cloudmin.virtualmin.com/images/images.txt" >/dev/null
if [ "$?" != 0 ]; then
	echo .. license does not appear to be valid
	exit 1
echo .. done
echo ""

# Create Cloudmin licence file
echo Creating Cloudmin licence file ..
cat >/etc/server-manager-license <<EOF
chmod 600 /etc/server-manager-license
echo .. done
echo ""

# Download GPG keys
echo Downloading GPG keys for packages ..
$download "http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin" >/tmp/RPM-GPG-KEY-virtualmin
if [ "$?" != 0 ]; then
	echo .. download failed
	exit 1
$download "http://software.virtualmin.com/lib/RPM-GPG-KEY-webmin" >/tmp/RPM-GPG-KEY-webmin
if [ "$?" != 0 ]; then
	echo .. download failed
	exit 1
echo .. done
echo ""

# Import keys
echo Importing GPG keys ..
apt-key add /tmp/RPM-GPG-KEY-virtualmin && apt-key add /tmp/RPM-GPG-KEY-webmin
if [ "$?" != 0 ]; then
	echo .. import failed
	exit 1
echo .. done
echo ""

# Setup the APT sources file
echo Creating APT repository for Cloudmin packages ..
cat >>/etc/apt/sources.list <<EOF
deb http://$SERIAL:$KEY@cloudmin.virtualmin.com/debian binary/
apt-get update
echo .. done
echo Disabling Suspend Mode Debian 12 .. forlotto
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
echo ""

# APT install Perl, modules and other dependencies
echo Installing required Perl modules using APT ..
apt-get -y install perl openssl libio-pty-perl libio-stty-perl libnet-ssleay-perl libwww-perl libdigest-hmac-perl libxml-simple-perl libcrypt-ssleay-perl libauthen-pam-perl cron bind9 openssh-server openssh-client lsof bzip2  
if [ "$?" != 0 ]; then
	echo .. install failed
	exit 1
apt-get install -y libjson-perl
apt-get install -y bind9utils
echo fixing dhcp3 adding newly named package forlotto
echo DHCP3 replacement dont install correctly apt-get install -y isc-dhcp-server naybe if you need it
echo removed apt-get install -y libdigest-sha1-perl no longer needed SHA1 Digest Contains forlotto
echo adding qemu for kvm forlotto
apt-get install -y qemu-system
echo adding libvert for kvm forlotto
apt-get install -y libvirt-daemon-system
echo adding bridge utilities for kvm forlotto
apt-get install -y bridge-utils 
echo fixing ajaxterm root shell forlotto
apt-get install -y python-is-python3
echo fixing cgroup-bin using substitute cgroup-tools forlotto
apt-get install -y cgroup-tools
echo .. done
echo ""

# APT install webmin, theme and Cloudmin
echo Installing Cloudmin packages using APT ..
apt-get -y install webmin
apt-get -y install webmin-server-manager webmin-virtual-server-theme
if [ "$?" != 0 ]; then
	echo .. install failed
	exit 1
apt-get -y install webmin-cloudmin-services
echo .. done
echo ""

# Configure Webmin to use theme
echo Configuring Webmin ..
grep -v "^preroot=" /etc/webmin/miniserv.conf >/tmp/miniserv.conf.$$
echo preroot=authentic-theme >>/tmp/miniserv.conf.$$
cat /tmp/miniserv.conf.$$ >/etc/webmin/miniserv.conf
rm -f /tmp/miniserv.conf.$$
grep -v "^theme=" /etc/webmin/config >/tmp/config.$$
echo theme=authentic-theme >>/tmp/config.$$
cat /tmp/config.$$ >/etc/webmin/config
rm -f /tmp/config.$$
echo .. done
echo ""

# Setup BIND zone for virtual systems
basezone=`hostname -d`
if [ "$basezone" = "" ]; then
echo Creating DNS zone $zone ..
/usr/share/webmin/server-manager/setup-bind-zone.pl --zone $zone --auto-view
if [ "$?" != 0 ]; then
  echo .. failed
  echo xen_zone=$zone >>/etc/webmin/server-manager/config
  echo kvm_zone=$zone >>/etc/webmin/server-manager/config
  echo citrix_zone=$zone >>/etc/webmin/server-manager/config
  echo openvz_zone=$zone >>/etc/webmin/server-manager/config
  echo lxc_zone=$zone >>/etc/webmin/server-manager/config
  echo vserver_zone=$zone >>/etc/webmin/server-manager/config
  echo zone_zone=$zone >>/etc/webmin/server-manager/config
  echo .. done
echo ""

# Open Webmin firewall port
echo Opening port 10000 on host firewall ..
/usr/share/webmin/firewall/open-ports.pl 10000 10001 10002 10003 10004 10005 843
if [ "$?" != 0 ]; then
  echo .. failed
  echo .. done
echo ""

# Tell user
echo Cloudmin has been successfully installed. You can login to it at :
echo https://$hostname:10000/

# All done!


AJAXTERM is going to use websockets that way it will remove python dependencies. As per Joe it will be in one of the updates to Cloudmin.
So you may or may not want to use python-is-python3.

I am unsure if any of the other issues mentioned are being looked into or addressed.

Note I individualized most of these issues because that is how the staff likes it but I’m also trying to track what is being fixed and what is being ignored at the moment so I’m aware of how I have to preform my installation. Which is why you see a wall of posts that I put out there. I’ll try to keep things updated here.

Anyways, it is so much easier doing the install from the GUI for me every dang time I try to install from the Terminal it tells me my Liscense is not valid I check and double check so I’ll have to remember how to login as root with the GUI again I know its a matter of modifying one or two lines in some configurations to allow for it but I so much prefer just being able to copy the download link and paste it for some odd reason I don’t know maybe O’s are 0 or there isn’t space where there is supposed to be space or a colon is a semicolon I cant call it but its down right annoying having to type all that crap and see it with my old eyes. It would be nice if they would’ve create a link with a hash of those two things or kept the key all number instead of random upper and lower case letters and numbers that part is always a bummer but no matter. We’ll get it it’s a first world problem.

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