Webmin on Entware for DD-WRT

Question: Can Webmin be installed on a router running DD-WRT firmware with Entware installed?

Answer: Yes (and I did it)

This is not a step by step list of instructions on how to do it, so it probably isn't for beginners. Instead it is a brain dump of all the important information I used that hopefully will be useful to people somewhat experienced with Linux operating systems and DD-WRT (OpenWRT too).

When making references to downloads or other external resources, see the Helpful Links section at the end of this page

The Beginning

I'm using a Buffalo WZR-600DHP Router with an Atheros AR7161 CPU (AKA System on a Chip) which is based on the MIPS 24Kc foundation (single CPU, not dual). I did the installation September of 2019 and the latest version of Webmin available was 1.930

There are no OPKG installations available, so I downloaded the TAR file (http://www.webmin.com/download.html) and used the instructions (they refer to it as "the old fashion way", but it is the only way as there are no pre-configured packages) on Webmin's Wiki site: https://doxfer.webmin.com/Webmin/Installation

Pick your spot to untar it. Note it will be the installation directory.

To start the script, go to the untarred webmin directory and type: ./setup.sh

I modified all the paths to reflect my Entware directory (IE, the scripts default config file location was set as /etc/webmin, which for DD-WRT is a non-writable area, so that would fail, switched it to /opt/etc/webmin).

For me, my paths for the log file was: /opt/var/log/webmin and the path for the perl executable was: /opt/bin

I picked "110 Generic Linux" for the OS as Entware, Optware, DD-WRT, OpenWRT were not listed.

To get the linux kernel version, use this command: uname -r

Issues during installation

When it got to the PERL section there were a few modules missing, so I installed them from the Entware Repository. The PERL modules are referred to as perlbase, so for installing a specific modules, use this command;

opkg install perlbase-WhatEverModuleName

At the end of the installation there were additional errors which referenced additional PERL modules, so I installed them and reran the ./setup.sh script (it always picked up where it left off, so that saved some time)

Finally got it to run the install all the way through with no errors and it announced that Webmin had been installed and was available at MyIPAddress:10000, but sadly it didn't work. What a bummer.

Even though there were no more errors about missing PERL modules, I'd read that Webmin was written and based on PERL, so I decided there wasn't much to lose at this point by installing all the extra PERL modules. So I did. But there was a problem.

As it turns out the opkg install command doesn't allow for wildcards, so trying the command opkg install perlbase* did not work. After a quick bit of research, I located a webpage (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-a-package-using-opkg-from-a-piped-search-result-4175580790/) where a nice guy named "magische_vogel" had come up with this command;

opkg list | grep WhatEverNamePackagesBeginWith| awk '{print $1}' | xargs opkg install
opkg list | grep perlbase-| awk '{print $1}' | xargs opkg install

It worked great, and Webmin functioned after that.


Post Installation

If you want Webmin to start automatically, you'll need to add a startup script. I also wanted to figure out how to stop and start it manually (which turned out to be simple, but not well documented). See below for various commands (Note: I'm using the paths configured on my system, yours might be different.

To stop Webmin: /opt/etc/webmin/stop

Expand / Collapse the Code Block

To start Webmin: /opt/etc/webmin/start (which is the same thing one would put into DD-WRT's Administration, Commands, Startup section)

Be patient when first accessing the Webmin interface at http:// or https://WhatEverURL:10000 because Wemin's default theme is a resource hog. Wait for it to completely come up. Disabled all the "Real-time monitoring options" in its configuration page (Webmin, Webmin Configuration, Webmin Themes)

My router doesn't have the most powerful CPU and I noticed it was acting very sluggishly after the Webmin installation. It turns out it was a process named "authentic-theme/index.cgi" that was being (the current theme used by Webmin). I switched to the "Old Webmin" theme and that solved the excessive CPU usage issue, but my neck hurt from being jerked so far back in time with the "Old Webmin" theme (they weren't kidding about old). So I switched back to the modern theme and disabled all the "Real-time monitoring options" in its configuration page (Webmin, Webmin Configuration, Webmin Themes). The modern theme is still more intensive when using, but I'm spoiled by its modern interface so I'm not ready to switch back to the old one just for performance.

And as of some time in 2021, in Webmin's grand wisdom the ability to turn off the above mentioned settings disappeared with a Generic Linux Installation. So, the only option was to find a fucking machine that actually worked like it should, figure out where the setting was stored, and copy it to the new router. And the setting is in /etc/webmin/authentic-theme/settings.js or settings-root.js (with no sign in the GUI of these settings). The key line is: settings_sysinfo_real_time_status=0; The full file is below;

settings_sysinfo_query_timeout='1000';
settings_sysinfo_theme_updates_for_usermin=true;
settings_sysinfo_real_time_status=0;
settings_leftmenu_user_html='';
settings_leftmenu_button_refresh=false;
settings_experimental_extended_on_hover=false;
settings_hotkey_toggle_modifier='altKey';
config_portable_module_filemanager_records_per_page='30';
settings_hotkey_custom_4='';
settings_right_page_hide_persistent_vscroll=true;
settings_sysinfo_expand_all_accordions=false;
settings_hotkey_navigation='a';
settings_sysinfo_csf_updates=false;
config_portable_module_filemanager_calculate_size=true;
settings_side_slider_background_refresh_time=0;
settings_hotkey_custom_3_user='';
settings_saturate_level_navigation='1.15';
settings_hotkey_custom_7_user='';
settings_right_reload=true;
settings_enable_container_offset=true;
settings_sysinfo_easypie_charts=true;
settings_cm_view_palette='monokai';
settings_hotkey_custom_3='';
settings_font_family=0;
config_portable_theme_locale_format_full='LLLL';
settings_saturation_level_navigation=1;
settings_hotkey_toggle_key_cloudmin='c';
settings_navigation_always_collapse=false;
config_portable_module_filemanager_hide_actions=true;
settings_leftmenu_netdata=true;
settings_sysinfo_remember_accordions=true;
settings_sysinfo_real_time_stored=false;
settings_hotkey_custom_2='';
config_portable_module_filemanager_tree_expand_search=false;
settings_hotkey_toggle_key_usermin='u';
settings_hotkey_toggle_key_webmin='w';
settings_hotkey_favorites='f';
settings_invert_level_navigation=0;
settings_hotkey_custom_9_user='';
settings_right_page_keep=true;
config_portable_theme_locale_format_short='L';
settings_side_slider_palette='nav';
settings_sysinfo_real_time_timeout='1000';
settings_side_slider_notifications_enabled=true;
settings_side_slider_sysinfo_enabled=true;
settings_theme_make_date=true;
settings_show_terminal_link=true;
settings_hotkey_reload='r';
settings_hotkey_custom_1_user='';
settings_right_animate_table_icons=true;
config_portable_module_xsql_fit_content_screen_height=false;
settings_show_webmin_tab=true;
settings_contrast_mode=false;
config_portable_module_filemanager_force_tar=true;
settings_sysinfo_theme_updates=false;
settings_leftmenu_width='260';
settings_sysinfo_easypie_charts_size='172';
config_portable_module_filemanager_records_for_server_pagination='1000';
settings_hotkey_shell2='k';
settings_mail_ui=true;
settings_hotkey_shell='k';
settings_collapse_navigation_link=true;
config_portable_theme_locale_languages='en';
settings_hotkey_focus_search='s';
settings_perform_content_scrolling=true;
settings_leftmenu_width_initial='260';
settings_hotkey_custom_5='';
settings_show_night_mode_link=true;
settings_hotkey_custom_8_user='';
settings_leftmenu_section_hide_unused_modules=false;
settings_hotkey_toggle_key_webmail='m';
config_portable_module_filemanager_hovered_toolbar=false;
config_portable_module_filemanager_editor_detect_encoding=true;
settings_leftmenu_user_html_only_for_administrator=false;
settings_leftmenu_section_hide_refresh_modules=false;
settings_hotkey_custom_6='';
settings_hotkey_toggle_slider='n';
settings_sysinfo_panels_order='{\'live_stats\':\'A\',\'acl_logins\':\'B\',\'status\':\'C\',\'status_services\':\'D\',\'net_net_info\':\'E\',\'ips\':\'F\',\'mount_disks_info\':\'F\',\'quota\':\'G\',\'bw\':\'I\',\'sysinfo\':\'H\',\'updates\':\'I\',\'ftypes\':\'J\',\'serial\':\'K\'}';
settings_side_slider_enabled=true;
settings_side_slider_fixed=false;
settings_hotkey_custom_7='';
settings_mailbox_slash_delimiter=true;
settings_right_small_table_icons=false;
settings_hide_top_loader=false;
settings_switch_rdisplay=false;
settings_hue_level_navigation=0;
config_portable_theme_locale_format_time='LTS';
settings_grayscale_level_navigation=0;
settings_hotkey_slider='e';
config_portable_module_filemanager_tree_view_depth='3';
settings_hotkeys_active=true;
settings_hotkey_sysinfo='i';
settings_side_slider_favorites_enabled=true;
settings_right_default_tab_usermin='mail';
settings_table_init_datatables='20000';
settings_hotkey_toggle_key_night_mode='l';
config_portable_module_filemanager_editor_maximized=false;
settings_hotkey_custom_6_user='';
settings_hotkey_custom_4_user='';
settings_cm_editor_palette='monokai';
config_portable_module_filemanager_default_sort=0;
settings_leftmenu_custom_links='';
settings_leftmenu_button_language=false;
settings_show_terminal_link2=true;
settings_contrast_level_navigation=1;
settings_hotkey_custom_5_user='';
config_portable_theme_locale_format_long='LL';
settings_sysinfo_max_servers='10';
settings_brightness_level_navigation=1;
config_portable_module_filemanager_move_to_trash=false;
settings_global_palette_unauthenticated='light';
settings_background_color='gainsboro';
config_portable_module_filemanager_hide_tree_view=false;
settings_leftmenu_vm_cm_dropdown_icons=true;
settings_sysinfo_real_time_status_disk=false;
settings_right_hide_table_icons=false;
settings_favorites=true;
settings_sysinfo_easypie_charts_width='2';
settings_navigation_color='blue';
settings_usermin_default_module='sysinfo.cgi';
config_portable_module_filemanager_tree_exclude_on_first_load=true;
settings_hotkey_custom_8='';
settings_sysinfo_easypie_charts_scale='8';
settings_hotkey_custom_1='';
settings_cache_interval='86400';
settings_theme_options_button=true;
settings_sysinfo_real_time_stored_length='600';
config_portable_module_filemanager_hide_toolbar=false;
settings_hotkey_custom_9='';
config_portable_theme_locale_language=false;
settings_hotkey_custom_2_user='';
settings_sepia_level_navigation=0;
config_portable_module_filemanager_remember_tabs=true;
settings_right_virtualmin_default='sysinfo.cgi';
settings_sysinfo_link_mini=false;
settings_hotkey_toggle_key_virtualmin='v';
settings_document_title=1;
config_portable_module_filemanager_switch_users=true;
settings_right_grayscaled_table_icons=true;
config_portable_module_filemanager_checksum_limit='1024000';
config_portable_module_filemanager_view_limit='512000';
settings_right_cloudmin_default='sysinfo.cgi';
settings_global_passgen_format='15|a-z,A-Z,0-9';

Using it

What I discovered is that there were very few modules installed for services and none of them were configured correctly. No big surprise.

I could not get the Webmin, Webmin Configuration, Modules to work with any URL I tried for Standard and Third Party modules downloaded from the internet, so I installed all the ones I wanted by manually downloading them and installing them from a local directory. The next thing I discovered (with Samba) was that not all of the modules I installed showed up anywhere. My solution was to "Clone" them into the category they were supposed to be in in the first place. That worked

 
BIND Module System Configuration Section for Webmin on DD-WRT with Entware

Anyway, the first full module I configured was for BIND / NAMED, and it is now fully functional. See the screen shot of the BIND module's configuration, System configuration section (again, these are my paths, yours might be different)

Helpful Links

Webmin Downloads (pick which ever version you want and select the WhatEverName.tar.gz file)

"Old Fashion" Installation Instructions from the Webmin Wiki

Entware Repositories for my router (go up one level for other CPU types) and for older versions, look for the archive directory at the top.

OpenWRT Repositories for my router (go up one level for other CPU types)

Webmin Modules (No URL I could find worked in making it possible for the Webmin Module GUI to download standard or third party modules via the GUI, all had to be installed from a local directory)