Accidentally deleted the webmin but the server still online

Current System State:

  • Ubuntu 20.04 LTS server
  • Apache and MariaDB running and functional
  • All websites working normally
  • Webmin reinstalled (version 2.202)
  • Virtualmin core installed (version 7.0.0)
  • Server accessible through port 10000

Current Issues:

  1. Login attempts result in an endless loop

Previous Actions Taken:

  1. Purged old Virtualmin/Webmin installation
  2. Reinstalled Webmin packages
  3. Attempted Virtualmin configuration with LAMP bundle

Server Details:

  • Active websites still functioning
  • All databases operational
  • Apache configuration preserved
  • Access to root user available
  • Ports 10000 accessible but always looping when try to login

Additional information, we use Cloudflare for our Custom Name Server Domain.

My question is, How to resolve the Webmin login loop issue while ensuring all existing services remain operational?

That’s a terrible idea. Please don’t do that to try to fix anything, ever.

Your websites are unrelated to Webmin or Virtualmin (Webmin/Virtualmin is not the web server or database for your sites), but reinstalling Virtualmin using the installer has the potential to break things, because it modifies configuration files in a bunch of ways, maybe in ways that conflict with choices you’ve made about your system since you originally installed. The installer expects a freshly installed supported OS, it isn’t safe to run on a production system.

Uninstalling Virtualmin/Webmin is never the right answer to any problem you have, unless what you want is Virtualmin/Webmin to be gone never to return.

Just look at the logs. Nothing in a Virtualmin system ever needs you to uninstall software and reinstall it, and effectively nothing will ever be fixed by doing so. If you look at the relevant logs, you will find answers to whatever problem you have, or you’ll find data you can bring here for help with whatever problem you have. Uninstalling and reinstalling makes new problems you’ll need to solve.

Are you proxying the name you’re using to connect to Webmin? (Cloudflare is a proxy.)

Unless you’re a Webmin and Virtualmin expert, there’s no easy way to handle this. You’ll likely encounter numerous small issues along the way—beyond the one you’re facing now—that will eventually consume much more time and effort than migrating to a new system.

Personally, I’d suggest migrating to a new system. Since you’re on Ubuntu 20.04, this might be the perfect time to move to Ubuntu 24.04.

I tried to migrate from the old server to the new server, but I accidentally ran the wrong command (I was supposed to run it on the new server, but I ran it on the old server instead).

My objective now is to regain access to Webmin. Hopefully, I can or if not is there any other ways?.

Here’s the log I found using CMD:

“Script was not run with full path (failed to find /usr/share/webmin/virtual-server/get-ssl.pl under ) …web-lib-funcs.pl (line 5312)”

Thanks.

I tried to migrate before, but yes, it was my fault. I ran the wrong command on the wrong server.

Anyway, do I need to migrate manually by backing up the current website and adding it to the new server one by one, or can I do it automatically?

And for the Pro License, is it possible to use it on the new server?

Thank you

Oh, I’m really sorry to hear that! But I think we’ve all been there at some point or another.

You could try using the Virtualmin CLI to create the backups… if that works, great—otherwise, you can manually copy the files from the existing system to the new one. Also, I’d strongly advise against migrating to Ubuntu 20.04 in 2025. Instead, go for Ubuntu 24.04 or Debian 12.

Yes, you can use the same Virtualmin Pro license to migrate to the new server. There’s a 21-day grace period. Once the old server is decommissioned, Virtualmin will stop flagging the license being overused.

Here are the CLI commands I use to do backups:

mkdir /backup/singleDomain
/usr/sbin/virtualmin backup-domain --dest /backup/singleDomain --domain mydomain.com --all-features --newformat --all-virtualmin

mkdir /backup/fullBackup
/usr/sbin/virtualmin backup-domain --dest /backup/fullBackup --all-domains --all-features --newformat --all-virtualmin

1 Like