I want to install a module in webmin by command line (bash). How do you do this?


wget https://download.webmin.com/download/modules/text-editor.wbm.gz

inside this .gz: text-editor.wbm

sudo tar -xf text-editor.wbm.gz

enter image description here

The module (in this case text-editor) when installed via GUI:

enter image description here

It sends the files to several places. Example:

To /usr/share/webmin/text-editor

enter image description here

To : /etc/webmin/text-editor

enter image description here

To: /var/webmin/modules/text-editor (empty):

enter image description here


Webmin installation methods used in my test:

Method 1:

sudo sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list'
wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -
sudo apt -y install webmin

Method 2:

wget https://prdownloads.sourceforge.net/webadmin/webmin_1.910_all.deb
sudo dpkg --install webmin_1.910_all.deb

I asked the author (Jamie Cameron) no response to the date, because he is the author of webmin and the author of the module that I try to install

Text Editor 1.4
Description Provides a simple interface for editing text files, with a history of recently-edited files.
Download    text-editor.wbm.gz
Author  Jamie Cameron
Last updated    2007-04-18 11:27:19


I have managed to make a script that installs the text-editor module. It is not very "elegant", but it works:

sudo chmod +x text-editor.sh && sudo ./text-editor.sh



if [ ! -d $fshare ]; then mkdir -p $fshare; fi
if [ ! -d $fetc ]; then mkdir -p $fetc; fi
if [ ! -d $fvar ]; then mkdir -p $fvar; fi
touch $fetc/files
wget -c https://download.webmin.com/download/modules/text-editor.wbm.gz
tar -xf text-editor.wbm.gz
cp -f -R text-editor/* $fshare
cp text-editor/config $fetc
sed -i '$ s/$/ text-editor/' /etc/webmin/webmin.acl
sh -c 'echo "text-editor=1" >> /etc/webmin/installed.cache'
/etc/init.d/webmin restart

However, there should be a better method to install any webmin module by command line

  • This is exactly what I was looking for. Thanks!
    – Recognizer
    Jun 15, 2019 at 17:45

3 Answers 3


Introduction --------- Webmin is designed to allow the easy addition of new modules without changing any of the existing code. A module can be thought of as something like a Photoshop plugin or iPhone application - it can be written by someone other than the developers of Webmin and distributed under a license the developer chooses.

A module should be written to administer one service or server, such as the Unix password file or the Apache web server. Some complex system functions may even be split over several modules - for example, disk partitioning, mounting disks, and disk quota management are 3 separate modules in the standard Webmin distribution.

Modules can theoretically be written in any language. However, to make use of the Webmin API Perl version 5.8 or above should be used. A module should be written entirely in Perl, with no C functions or external binary programs. The aim is for modules to be as portable as possible across different Unix systems and CPU types.

Modules written in other languages will not be displayed using the standard Webmin UI and will not be able to call its API. For these reasons, using Perl is strongly recommended.

At their simplest, modules are really just directories of CGI programs that Webmin's web server runs. However, there are certain rules that should be followed to make sure that they work with the Webmin API, main menu, and access control system. Even though you can just stick any existing CGI script into a module directory, this is not a good idea.

Required Files

Every module has its own directory under the Webmin base directory, in which all the module's CGI programs and configuration files must be stored. For example, if the Webmin base was /usr/libexec/webmin, a module called foobar would be created or installed in /usr/libexec/webmin/foobar.

You can find this base directory by looking at the root line in your /etc/webmin/miniserv.conf file. It will differ depending on which operating system Webmin is installed.

For a module to be displayed on the main Webmin menu, it should contain at least the following files. Only module.info is mandatory though.

module.info This file contains information about the module and the operating systems it runs under. See below for details on its format. images/icon.gif The icon displayed on the main menu for this module. The icon should be 48x48 pixels and should use the same colour scheme as the other icons on the main menu. lang/en The text strings used by this module, as explained in the Internationalization section of this documentation. install_check.pl Program that checks to see if the service or program is installed and usable, returning a non-zero value if so.

Each module name on Webmin's left menu is a link to the module directory. Thus you must have an index.cgi file to be displayed when the user clicks on the link. A typical module contains many .cgi programs that are linked to from index.cgi, each of which performs some function such as displaying a form or saving inputs from a form.

When you first create a new module, it will not be in the allowed list of any Webmin user and so you will not be able to see it in the main menu. To fix this, you must first delete the file /etc/webmin/module.infos.cache to clear the cache of known modules. Then to make your module visible, either edit the file /etc/webmin/webmin.acl or use the Webmin Users module to grant yourself access.


I found a guide to the webmin module installation and removal like you are trying:



and here:

Here is a module download page:


here are all third party modules:


Use a prebuilt rpm or deb package:

The current Webmin distribution is available in various package formats for download from:

https://prdownloads.sourceforge.net/webadmin/webmin_1.910_all.deb 14.8 MB


If you want to use the apt command for deb files, use it like this:

sudo apt install path_to_deb_file

If you want to use dpkg command for installing deb packages, here’s how to do it:

sudo dpkg -i path_to_deb_file

In both commands, you should replace the path_to_deb_file with the path and name of the deb file you have downloaded.

From the github page:


Perl 5.10 or higher. Installation

Webmin can be installed in two different ways:

By downloading a pre-built package, available for different distributions (CentOS, Fedora, SuSE, Mandriva, Debian, Ubuntu, Solaris and other) from our download page;

Note: It is highly recommended to add repository to your system for having automatic updates.

By downloading, extracting source file, and running setup.sh script, with no arguments, which will setup to run it directly from this directory, or with a command-line argument, such as targeted directory.

Note: If you are installing Webmin on Windows system, you must run the command perl setup.pl instead. The Windows version depends on several programs, and modules that may not be part of the standard distribution. You will need process.exe commmand, sc.exe command, and Win32::Daemon Perl module.

  • Please read my question carefully. Thank you
    – acgbox
    Jun 5, 2019 at 15:32
  • @ajcg Yes I saw this later, sorry, does the first link help?? Jun 5, 2019 at 15:37
  • Now test your method (.deb) and the same result. I can not install the module via command line (which is what I ask). The "howto" you put in your answer are for GUI. Anyway, I appreciate your explanation
    – acgbox
    Jun 5, 2019 at 15:40
  • @ajcg thank you again sorry for rushing into it Jun 5, 2019 at 15:43
  • 1
    Even though your answer does not answer the question, the explanation is very good and illustrative and complements the question. Thank you for your contribution
    – acgbox
    Jun 5, 2019 at 15:49

The *.wbm.gz seems to be a tar ball file of the directory of the webmin module. So, I believe but have not utterly checked it yet that you can simply extract the archive in the Webmin directory as follows. On RHEL, the Webmin directory is /usr/libexec/webmin. On Ubuntu, the Webmin directory is /usr/share/webmin. please check.

To remove the module, simply

 # Be carefull with rm -rf, no *,?,. !
 # RH
 rm -rf /usr/libexec/webmin/text-editor
 # Debian-Ubuntu
 rm -rf /usr/share/webmin/text-editor

But someone has already created a installer

 # Debian-Ubuntu

According to creator Jamie Cameron it runs like this:

enter image description here

So, In my case it would be:

sudo /usr/share/webmin/install-module.pl text-editor.wbm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .