Webmin Official support for Openwrt

This topic is a central for Starting configuring and porting Webmin to Openwrt.
Webmin already can be Installed on OpenWrt, but with a few tweaks. And a little or nothing works on the fly.
I know we have Luci, but Webmin seems to be a good alternative too, and openwrt get a lot of with it.
Now that some devices have 1gb or more of storage, its viable.

So this topic aims:

  • Collect all Information about Webmin running on Openwrt, with all workarounds until or when or if it get released oficially.
  • Release a Oficial Webmin package, with default Openwrt configuration.

Webmin is a web-based system administration tool for Unix-like servers, and services with about 1,000,000 yearly installations worldwide. Using it, it is possible to configure operating system internals, such as users, disk quotas, services or configuration files, as well as modify, and control open-source apps, such as BIND DNS Server, Apache HTTP Server, PHP , MySQL , and many more.

Topic under construction

Links:
Webmin
Webmin on Entware for DD-WRT - Wiki.TerraBase.info
Linksys AC Series Router Configuration Tips for OpenWRT - Wiki.TerraBase.info

1 Like

1. PRE-REQUISITES

  • Perl
    Webmin is fully based on Perl, Its HIGHLY recommended installing all perl modules.
    In future we can list all separated Perl modules. But as described here , Trying installing only some perl modules, will return Webmin installation errors.

To install all Perl modules run on SSH:

opkg list | grep perlbase-| awk '{print $1}' | xargs opkg install
  • Other recommended packages:

I installed some other packages, looking for the install and run errors.
But i dont have the list :grinning: I will add all other requisites as we test install and use of Webmin.

  1. INSTALLING WEBMIN

PRE-INSTALL

Busybox compatibility test ?

This part I need your help! This guide tells to change the Busybox to run the Installer. As described:

With the OpenWrt standard df command, option -i cannot be used and a warning is performed at startup.

I'm using a Custom Selinux openwrt compiled from source, on a X86 n5105 router. First i tryed to change the busybox as described on Guide. It didnt work because i use SElinux.
My solution was compiling the Openwrt with a more complete busybox, without disabling SElinux. It worked for me.

It maybe can be ignored as stated on the tutorial link, please share you experience on BusyBox and install/post-install.

Create Directories and Bin Group:

I recommend installing webmin in /opt/local/, we need to create the folders, and add them to the backup/restore openwrt path.

LOG:
mkdir -p /opt/local/webmin/log

The log output destination could be /var/log/webmin , /var is linked to /tmp and disappears when you reboot, so I made it /opt .

Edit /etc/group:

 # vi /etc/group
        root:x:0:
        daemon:x:1:
        bin:x:2:            # bin 
        adm:x:4:
        :
    :wq!
    #

INSTALL
I'm using at the moment the latest Webmin (2.021).

Get webmin:

wget https://www.webmin.com/download/webmin-current.tar.gz
tar zxvf webmin-current.tar.gz
cd webmin-2.x.x
# ./setup.sh /opt/local/webmin/modules    
***********************************************************************
*          Welcome to the Webmin setup script, version 1.973          *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.

Installing Webmin from /root/webmin-1.973 to /opt/local/webmin/modules ...

***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.

-> Config file directory [/etc/webmin]: # デフォルトにしました
-> Log file directory [/var/webmin]: /opt/local/webmin/log # ログ出力先
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.

-> Full path to perl (default /usr/bin/perl): # デフォルトで良いはず

Testing Perl ...
Perl seems to be installed ok

***********************************************************************
For Webmin to work properly, it needs to know which operating system
type and version you are running. Please select your system type by
entering the number next to it from the list below
---------------------------------------------------------------------------
  1) Pardus Linux           2) SmartOS                3) Sun Solaris          
  4) Lycoris Desktop/LX     5) Caldera OpenLinux eS   6) Caldera OpenLinux    
  7) Asianux Server         8) Asianux                9) Whitebox Linux       
    :
 106) OS X                  107) Mac OS X              108) Darwin               
 109) OpenDarwin            110) Cygwin                111) Sun Java Desktop Sys 
 112) Synology DSM          113) Generic Linux         114) Windows              
---------------------------------------------------------------------------

-> Operating system: 113 #(113.汎用Linuxを指定)

Please enter the version of Generic Linux you are running

-> Version: .* #(適当)

Operating system name:    Generic Linux
Operating system version: *.**

***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
 - What port to run the web server on. There must not be another
   web server already using this port.
 - The login name required to access the web server.
 - The password required to access the web server.
 - If the webserver should use SSL (if your system supports it).
 - Whether to start webmin at boot time.

-> Web server port (default 10000): # 変えたければ適当に
-> Login name (default admin): # 変えたければ適当に
-> Login password: ************ # パスワードは適当に
-> Password again: ************ # パスワードは適当に
The Perl SSLeay library is not installed. SSL not available.
-> Start Webmin at boot time (y/n): n # 自動起動は別に設定するよ
***********************************************************************
Copying files to /opt/local/webmin/modules ..
..done

Creating web server config files..
..done
    :
Enabling background status collection ..
..done

Attempting to start Webmin mini web server..
Starting Webmin server in /opt/local/webmin/modules
..done

***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to

  http://kamosan:10000/

and login with the name and password you entered previously.

Important: It will now work on port 10000, but there is a cookie issue if you use luci on same adress, you can use an anonymous tab on your browser.

Hello.
I followed the procedure you taught me and it worked.
Thank you very much.

By the way, SSL encryption is not available.
Because we don't have Net::SSLeay.

Please let me know if there is a better way.

Seems to be fixed by:

xg-135r3 in ~ # opkg install coreutils-df
Installing coreutils-df (9.3-1) to root...
Downloading http://downloads.cdn.openwrt.org/releases/23.05.3/packages/x86_64/packages/coreutils-df_9.3-1_x86_64.ipk
Configuring coreutils-df.
xg-135r3 in ~ # df --help
Usage: df [OPTION]... [FILE]...
...
  -i, --inodes          list inode information instead of block usage
...

What are the benefits of usin webmin on OpenWrt tho? Also, "official support" implies an easy to install package in either openwrt/packages or openwrt/luci repository, are you working towards that?

Thank you very much.

I have addressed this so far.

It looks like adding perl -devel will solve the problem, but I can't do that.

Currently webmin is useless.

You said it was official, but I waited and got no response.
Are you verifying it yourself and passing it on?

I said what now?

i am so interested in an official webmin support.

It could solve a "problem" of openwrt... have a UI to manage RAID.
We could have many features to manage a RAID, filesystem, LVM...

I'm getting old and the memory is what it is... a UI comes in handy :smiley:

You have a RAID array on your OpenWrt router?

1 Like

yep!

i have raid 5 (mdadm) + docker and directly connected to wan of my isp.
in real the raid is "simply" imported from other centos (cockpit) installation.

works like a sharm!
Is a perfect all-in-one for home use case.

1 Like

Cool, what kind of hardware do you run it on?

1 Like

Supermicro A2SDi-8C-HLN4F miniITX
ASUS XG-C100F PCI Express 10-Gigabit SPF+
Card AW7916-NPD WiFi6E Dual Bands Dual Concurrents mPCIe
5x SSD samsung

i can ceritfy that all of this hardware working fine out of box whit the downloaded packages

as docker container i have (working in progress)
home-assistant
shinobi (reconding)
aMule
nextcloud
portainer

it should be easy to build

Installing perl-net-ssleay (1.94+perl5.28-1) to root...
Installing perl-mozilla-ca (20240730+perl5.28-1) to root...
Package perl-mozilla-ca (20240730+perl5.28-1) installed in root is up to date.
Package perl-net-ssleay (1.94+perl5.28-1) installed in root is up to date.
Configuring perlbase-mime.
Configuring perl-uri.
Configuring perl-mozilla-ca.
Configuring perlbase-threads.
Configuring perlbase-thread.
Configuring ca-certificates.
Configuring perlbase-net.
Configuring perl-net-ssleay.
Configuring perl-io-socket-ssl.
root@OpenWrt:/usr/lib/perl5/5.28/auto/Net/SSLeay# file SSLeay.so
SSLeay.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, no section header