Jun 11, 2025

Proxmox VE : Turn Off "No Valid Subscription" Message

This "No Valid Subscription" message will be displayed on each login in Proxmox VE server. Some Hobbyist may find it annoying at times.

Disabling this message is NOT recommended for Users with valid subscriptions and on Production servers. It is only for Home Lab environment.


1. First, login via SSH to Proxmox VE server.


2. Change the working directory to :-

cd /usr/share/javascript/proxmox-widget-toolkit


3. Make a backup of the following file.

cp proxmoxlib.js proxmoxlib.js.bak


4. Search for the following block of code.


if (res === null || undefined || !res || res
     .data.status.toLowerCase() !== 'active') {
     Ext.Msg.show({
               title: gettext('No valid subscription'),
               icon: Ext.Msg.WARNING,
               message: Proxmox.Utils.getNoSubKeyHtml(res.data.url),
               buttons: Ext.Msg.OK,
               callback: function(btn) {
                     if (btn !== 'ok') {
                          return;



5. Modify the block of code as show below.


if (false) {
     Ext.Msg.show({
               title: gettext('No valid subscription'),
               icon: Ext.Msg.WARNING,
               message: Proxmox.Utils.getNoSubKeyHtml(res.data.url),
               buttons: Ext.Msg.OK,
               callback: function(btn) {
                     if (btn !== 'ok') {
                          return;



6. Proceed to save the configuration and exit.


7. Now, restart PVE service as shown below.

systemctl restart pveproxy


8. Next, login back to Proxmox VE Web UI and upon successful login, the "No Valid Subscription" message is longer displayed.








!!! HAPPY COMPUTING !!!

Apr 15, 2025

Windows 10/11 : Batch File to Start and Check Windows Services

Create a batch file to check the status of a Windows Service(s) and start it if its not started. The batch file can also be run inside "Task Scheduler" at an interval basis.


1. First, you need to find out the Service Name that you want to monitor, in this example let's say the service you need to monitor is an Exchange Server IMAP4 service.


2. Open --> Services and browse through the list until you found the IMAP4 service.


3. Right-click the Service Name --> Properties.


4. Take note of the "Service name:", copy the name to Notepad. As per below screenshot, the service name is "MSExchangeImap4".



5. Create a batch file as below :-


@ECHO OFF
CLS
SETLOCAL ENABLEDELAYEDEXPANSION
SET /A RETRY_IMAP=0
SET /A MAX_RETRIES=3
SET EXCH_IMAP= MSExchangeImap4

REM To check current status of the service.
:check_imap
SC QUERY %EXCH_IMAP% | FIND "RUNNING" >NUL
IF %ERRORLEVEL%==0 (
    ECHO Exchange IMAP4 Service is Running.
        GOTO end
)

REM To start the service if the status is stopped.
ECHO Exchange IMAP4 Service is Stopped.
SC START %EXCH_IMAP%
TIMEOUT /T 10 >NUL

REM To re-check the service status again for confirmation.
SC QUERY %EXCH_IMAP% | FIND "RUNNING" >NUL
IF %ERRORLEVEL%==0 (
    ECHO Exchange IMAP4 Service is Running.
        GOTO end
)

REM Retrying to start the service with a maximum of 3 retries only.
SET /A RETRY_IMAP+=1
IF !RETRY_IMAP! LSS %MAX_RETRIES% (
    ECHO Retrying Start %EXCH_IMAP% (Attemp: !RETRY_IMAP!).
    GOTO check_imap
) ELSE (
    ECHO Max Retries Reached for %EXCH_IMAP%, will stop retrying.
        GOTO end
)

:end
EXIT



6. You can now test run the batch file and create a "Task Scheduler" to run the check at an interval basis (eg. every 2 hours or at Startup of the server).



!!! HAPPY COMPUTING !!!

Ubuntu : Nginx Proxy Manager (NPM)

Nginx Proxy Manager (NPM) is a user friendly, open source tool that simplifies the management of Nginx Reverse Proxy configurations. It have a Web UI for creating and managing Proxy Hosts, SSL Certificates and User Management and Permissions.

NPM makes managing services exposed to the Internet easily and securely. For easy installation and consistent environment, NPM runs on Docker.

Let's Get Started !

1. Install Docker's GPG Key.

sudo apt install ca-certificates curl gnupg -y


2. Modify the permission for "keyrings".

sudo install -m 0755 -d /etc/apt/keyrings


3. Download Docker's GPG Key.


sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc



4. Grant required permissions.

sudo chmod a+r /etc/apt/keyrings/docker.asc


5. Add Docker to the Repository.

echo \


"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \



$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \


sudo tee /etc/apt/sources.list.d/docker.list > /dev/null


6. Update the Repository.

sudo apt update


7. Install Docker.


sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y



8. Test Docker installation.

sudo docker run hello-world


9. Enable and Start Docker.

sudo systemctl enable docker

sudo systemctl start docker


10. Add "docker" to User group.

sudo usermod -aG docker $USER


11. Install Docker Compose.


sudo curl -SL https://github.com/docker/compose/releases/download/v2.34.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose



12. Modify Docker Compose Permission.

sudo chmod +x /usr/local/bin/docker-compose


13. Test the Docker Compose.

sudo docker-compose


14. Create a installation folder for Nginx Proxy Manager.

sudo mkdir ~/nginx-proxy


15. Change directory into the newly created folder.

cd ~/nginx-proxy


16. Create sub-folders inside "nginx-proxy" folder.

sudo mkdir {data,letsencrypt}


17. Create Docker Compose file inside "nginx-proxy" folder.

sudo nano docker-compose.yml


18. Copy and Paste the following codes into the file. You might want to check for the latest configuration at (https://nginxproxymanager.com/setup/#using-mysql-mariadb-database)


services:
    app:
        image: 'jc21/nginx-proxy-manager:latest'
        restart: unless-stopped
        ports:
            # These ports are in format <host-port>:<container-port>
            - '80:80' # Public HTTP Port
            - '443:443' # Public HTTPS Port
            - '81:81' # Admin Web Port
            # Add any other Stream port you want to expose
            # - '21:21' # FTP
        environment:
            # Mysql/Maria connection parameters:
            DB_MYSQL_HOST: "db"
            DB_MYSQL_PORT: 3306
            DB_MYSQL_USER: "npm"
            DB_MYSQL_PASSWORD: "npm"
            DB_MYSQL_NAME: "npm"
            # Uncomment this if IPv6 is not enabled on your host
            # DISABLE_IPV6: 'true'
        volumes:
            - ./data:/data
            - ./letsencrypt:/etc/letsencrypt
        depends_on:
            - db

    db:
        image: 'jc21/mariadb-aria:latest'
        restart: unless-stopped
        environment:
            MYSQL_ROOT_PASSWORD: 'npm'
            MYSQL_DATABASE: 'npm'
            MYSQL_USER: 'npm'
            MYSQL_PASSWORD: 'npm'
            MARIADB_AUTO_UPGRADE: '1'
        volumes:
            - ./mysql:/var/lib/mysql



19. Create Docker Network for Nginx Proxy Manager.

sudo docker network create npm-nw


20. Start Nginx Proxy Manager.

sudo docker-compose up -d


21. Check the Docker Status.

sudo docker ps


22. Open favorite browser (eg. Google Chrome) and browse the following address. You should be able to see a Nginx Proxy Manager Welcome Page.

http://[IP Address]


23. Now login to Nginx Proxy Manager Admin Web UI, please note the port number is 81.

http://[IP Address]:81


24. Login with the default Username and Password as below.


Default Username    : admin@example.com

Default Password    : changeme



25. After successfully login, you will be prompted to change the Username and Password, please proceed to change it accordingly and remember the new Username and Password.



!!! HAPPY COMPUTING !!!

Mar 14, 2025

[UPDATE] Crypto : Duino Coin

[UPDATE] CRYPTO : DUINO COIN.

An updated tutorial on how to mine Duino Coin (DUCO) on an Android Mobile Device. For more information please refer to my previous post (https://danielcheah.blogspot.com/search/label/Duino-Coin)

This new method have been successfully tested on the latest version of Termux and Ubuntu-in-Termux system.


(A) INSTALL F-DROID.
  1. Download and Install F-Droid Store (https://f-droid.org/en/)
  2. You need to allow installation from "Unknown Sources" option.
  3. Once installed, open F-Droid Apps.
  4. It will automatically update its own repositories, wait for it to complete.

(B) INSTALL TERMUX (TERMINAL EMULATOR).
  1. Inside F-Droid Store, search for --> Termux (Terminal Emulator).
  2. Download and install it.
  3. You need to allow installation from "Unknown Sources" option.

(C) INSTALL UBUNTU IN TERMUX.
  1. pkg upgrade
  2. pkg install wget
  3. pkg install proot
  4. pkg install git
  5. termux-setup-storage     # Allow the access when prompted.
  6. git clone https://github.com/MFDGaming/ubuntu-in-termux.git
  7. cd /ubuntu-in-termux
  8. chmod +x ubuntu.sh
  9. ./ubuntu.sh     #wait for the installation to complete.
  10. ./startubuntu.sh

(D) INSTALL DUINO MINER IN UBUNTU.
  1. apt update && apt upgrade -y
  2. apt install wget -y
  3. apt install proot -y
  4. apt install git -y
  5. apt install python3 -y
  6. apt install python3-pip -y
  7. apt install python3-dev -y
  8. git clone https://github.com/revoxhere/duino-coin.git
  9. cd duino-coin
  10. pip install requests --break-system-packages
  11. pip install colorama --break-system-packages
  12. pip install py-cpuinfo --break-system-packages
  13. pip install psutil --break-system-packages
  14. pip install pypresence --break-system-packages

* Note : The option "--break-system-packages" is only required should you encountered any error during "pip" installations. Thus run the command without these option first.

* Note : If you still encountered errors, try install full Python3 by using "apt install python3-full" method.


(E) START DUINO MINER.
  1. python3 PC_Miner.py
  2. You will be prompted to key-in your Duino e-Wallet Username & Mining Key.
  3. You will be prompted to select the Intensity, Cores and Donation level.
  4. You can also specify the Miner's Hostname when prompted.
  5. Wait for 1-2 minutes and the new miner will be reflected in your Duino e-Wallet website.

EDIT : 4-Apr-2025
For Ubuntu Server v.24.04.1 LTS or later. For some unknown reasons, either due to latest Python3 version or due to latest Duino v.4.3 version, it seems to the below command will works.

1. sudo pip3 install requests --break-system-packages
2. sudo pip3 install colorama --break-system-packages
3. sudo pip3 install py-cpuinfo --break-system-packages
4. sudo pip3 install psutil --break-system-packages
5. sudo pip3 install pypresence --break-system-packages

OR

1. sudo python3 -m install requests --break-system-packages
2. sudo python3 -m install colorama --break-system-packages
3. sudo python3 -m install py-cpuinfo --break-system-packages
4. sudo python3 -m install psutil --break-system-packages
5. sudo python3 -m install pypresence --break-system-packages



!!! HAPPY COMPUTING !!!


Jan 2, 2025

Nomodeset : Proxmox and Ubuntu

At times where the connected Monitor or Graphics card are unable to support certain resolution, either the wordings is too small to read or overly large making some info or buttons unable to be seen.

A simple fix is to "edit" the grub boot file and this can be done on-the-fly easily.


1. During the boot-up, select the appropriate install option and Press [E] to edit the boot-up configuration.


2. Append the "nomodeset" word at the end of the following line.

for Proxmox :-
linux     /boot/linux26 ro randisk_size=16777216 rw quiet splash=silent proxtui vga=788 nomodeset

for Ubuntu :-
linux - /boot/vmlinuz-4.4.0-41-generix.efi.signed root=UUID=7x357f9a-47e7-946e-499eBee8adic ro quiet splash nomodeset svt_handoff


3. Proceed to save and exit the configuration file, Press [CTRL] + [X].



If you want the changes to be permanent after installation completed, you will need to modify "GRUB" file with the same option.

4. Edit the "GRUB" configuration file.
sudo nano /etc/default/grub


5. Append the "nomodeset" as shown below.
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"


6. Update the "GRUB" configuration.
sudo update-grub


7. Finally reboot the server for the new configurations to take effects.


!!! HAPPY COMPUTING !!!

Nov 27, 2024

AntMedia Server : Install and Configure in Ubuntu Server

AntMedia Server (AMS) is an Open-Source, Self-Hosted Video Streaming Platform. It supports steaming of pre-recorded videos to supported website such as Youtube, Twitch, HTML etc.

For more information, visit their official website at (https://antmedia.io/)


1. Ensure that you already have Ubuntu installed and updated with the latest packages. Also you need to have Apache2 web server pre-installed, up and running.


2. First, download the latest version of AntMedia Server Community Edition.


sudo wget https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.11.3/ant-media-server-community-2.11.3.zip



3. Next is to download Installer Script file from AntMedia.


sudo wget -O install_ant-media-server.sh https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh



4. Now change the installer file to executable format.

sudo chmod +x install_ant-media-server.sh


5. To install the Community Edition, run the following command.

sudo ./install_ant-media-server.sh -i ant-media-server-community-2.11.3.zip


6. Configure the Apache Web Server.

sudo nano /etc/apache/sites-available/[domain.com].conf

Add the following configuration


<VirtualHost *:80>
   ServerAdmin webmaster@localhost
   ServerName [domain.com]

   ErrorLog /var/log/apache2/[domain.com]/error.log
   CustomLog /var/log/apache2/[domain.com]/access.log

   ProxyRequest off
   ProxyPass / http://127.0.0.1:5080/
   ProxyPassReverse / http://127.0.0.1:5080/

</VirtualHost>



7. Enable Apache modules accordingly.

sudo a2enmod proxy proxy_http


8. Enable the new virtual site.

sudo a2ensite [domain.com].conf


9. Enable SSL for AntMedia Server.

cd /usr/local/antmedia

sudo ./enable_ssl.sh -d [domain.com]


10. Ensure the following ports is accessible to the server.

Port Number

Protocol

Descriptions

80

TCP

SSL

5080

TCP

HTTP

5443

TCP

HTTPS

4200

UDP

SRT

1935

TCP

RTMP

50000 - 60000

UDP

WebRTC

5000

TCP

Multi-Nodes Cluster (optional)



11. Restart Apache Server.

sudo systemctl restart apache2


12. Open your favorite browser (eg. Google Chrome), browse the following URL.

http://[domain.com]:5080


13. Once the page have been loaded, you will be prompted to create the first administrator account. Procced to create the admin account and login afterward.


Added tutorial video.





!!! HAPPY COMPUTING !!!

Nov 21, 2024

Proxmox Backup Server (PBS) : Setup No Subscription Repository

For the Proxmox Backup Server (PBS), to use it as a Community Edition. We need to setup the "No Subscriptions" repository.

This methods is only for Hobbyist, Developer and alike, not recommended for Production environment.


1. Login to PBS WebUI and select "Console", then type the following command.

nano /etc/apt/sources.list.d/pve-enterprise.list


2. Comment out the Enterprise Repository by adding a "#" sign at the front.


3. Then add the following line for the No Subscription Repository.

deb http://download.proxmox.com/debian/pbs bookworm pbs-no-subscription

* The "bookworm" is the debian release code name and may change, thus change the name accordingly.


4. Next, is to run the Update.

apt update && apt upgrade -y


5. Finally, restart the server.

reboot



!!! HAPPY COMPUTING !!!