How to Install Verlihub on Linux - DC++ Hub Guide

Learn how to install, configure, and run a Verlihub DC++ hub on Linux. Complete step-by-step guide covering dependencies, MariaDB, ports, TLS, administration.

Category: Other
Tutorial Description

This step-by-step guide explains how to compile, install, configure and run a Verlihub NMDC Hub on Debian or Ubuntu Linux. It covers MariaDB, database setup, administrator accounts, Hub configuration, firewall rules, systemd startup, TLS, backups and troubleshooting.

Target platform: Debian / Ubuntu VPS or dedicated Linux server. The commands assume a recent Verlihub source release and may need small adjustments for your distribution or release.

1. What is Verlihub?

Verlihub is a Direct Connect Hub server for the NMDC protocol. It provides the central services needed to operate a DC++ community: user connections, chat, registration, permissions, moderation and Hub configuration.

Verlihub uses MySQL or MariaDB to store Hub data and configuration. It can be extended with plugins and scripts, including Lua support when built with the required Lua development library.

  • NMDC Hub server for Linux.
  • MySQL / MariaDB database backend.
  • User registration and permission classes.
  • Hub commands, moderation and configurable settings.
  • Plugins and scripting support, depending on build options.
  • TLS-encrypted NMDC connections (NMDCS) in supported releases.
  • Tools for managing and monitoring Hub processes.

Official Verlihub GitHub repository · Installation documentation

Protocol: Verlihub is an NMDC Hub. Users normally connect with dchub://your-hostname:port. Supported TLS connections use the NMDCS protocol and an address such as nmdcs://your-hostname:port. This is not an ADC Hub.

2. Server requirements

Component Practical starting point
Operating system Debian or Ubuntu Linux
CPU 2 cores recommended for a growing Hub
RAM 2 GB or more, depending on users and plugins
Storage 10 GB SSD or more for system, database and logs
Database MySQL or MariaDB supported by your Verlihub release
Network Stable public IP or a correctly configured public hostname

These are general hosting recommendations, not official minimum specifications. Actual resource use depends on the number of users, database activity, plugins and logging.

3. Prepare your Linux server

Connect to your Debian or Ubuntu server using SSH. Update the package index and installed packages:

sudo apt update
sudo apt upgrade -y

It is recommended to use a clean server or a dedicated environment for your Hub and database.

4. Install and secure MariaDB

Verlihub requires a MySQL-compatible database. MariaDB is a common choice on Debian and Ubuntu.

Step 1 – Install MariaDB

sudo apt install -y mariadb-server mariadb-client

Step 2 – Enable and start MariaDB

sudo systemctl enable --now mariadb
sudo systemctl status mariadb

Step 3 – Run the security configuration

sudo mariadb-secure-installation

Follow the prompts to apply the security options appropriate for your server. In particular, avoid remote root database access and remove anonymous accounts if they exist.

Step 4 – Test database access

sudo mariadb

If the MariaDB prompt opens, the database server is running. Exit with:

EXIT;
Important: During the Verlihub installation wizard, you will be asked for database details and database administrator credentials if the Hub database or application account needs to be created. Use a strong password. Do not publish database credentials or place them in a public web directory.

5. Install Verlihub build dependencies

Install the compiler, CMake, database client development libraries and other libraries used by Verlihub.

sudo apt install -y \
  g++ \
  make \
  cmake \
  git \
  pkg-config \
  libpcre2-dev \
  libssl-dev \
  zlib1g-dev \
  default-libmysqlclient-dev \
  libmaxminddb-dev \
  libicu-dev \
  gettext \
  libasprintf-dev

The current source documentation lists these as the Debian/Ubuntu dependency set for the newer build. Package names can vary between distribution releases.

Optional – Install Lua development files

If you want to build the Lua plugin, install a supported Lua development package. For example:

sudo apt install -y liblua5.4-dev

Verlihub's current documentation describes Lua support for versions 5.2 through 5.5. CMake detects the installed version during configuration. Install only the Lua version you intend to use for the build.

6. Download and compile Verlihub

Step 1 – Download the source code

Clone the official repository:

cd /usr/local/src
sudo git clone https://github.com/Verlihub/verlihub.git
sudo chown -R "$USER":"$USER" verlihub
cd verlihub

For a production server, consider checking out a specific stable release or tag rather than building an unpinned development branch. Review the repository's release notes before upgrading an existing Hub.

Step 2 – Create a build directory

mkdir -p build
cd build

Step 3 – Configure the build

cmake ..

CMake checks for the installed compiler and required libraries. Read its output carefully. If a required dependency is missing, install the matching development package and run CMake again.

Optional – Disable a plugin

The source build can compile optional plugins when their dependencies are available. The project documents options in the form

-DWITH_PLUGINNAME=OFF

for excluding a plugin. Check the source's CMake options for the exact plugin names.

Step 4 – Compile

make -j"$(nproc)"

Compilation may take a few minutes. If it finishes without errors, continue with installation.

Step 5 – Install

sudo make install

On Linux, the install step requires elevated permissions. If the program later reports that a shared library cannot be found, run:

sudo ldconfig

Check that the command is available:

verlihub --help

Also check the version using the version option shown by your installed build:

verlihub --version

Verlihub's source documentation and command options may differ between release branches. If an option is not recognized, use

verlihub --help

and the documentation shipped with that exact version.

7. Install and initialize a new Hub

After compiling and installing Verlihub, initialize a new Hub using its installation wizard. Do not start a fresh Hub before completing this step.

Step 1 – Run the installation wizard

sudo verlihub --install

The wizard asks for database and Hub settings. Press Enter to accept a displayed default when it is appropriate for your setup.

Step 2 – Configure database details

The installer asks for values similar to these:

Prompt Typical value Purpose
Database name verlihub Name of the Hub database.
Database user verlihub Account used by the Hub.
Database password Your own strong password Password for the Hub database account.
Database host localhost Database server address.
Database charset Installer default Character encoding for stored data.

If the database or application account does not exist, the installer can ask for database administrator credentials so it can create them. If your database is on another server, enter the appropriate hostname and ensure that database access is restricted to the Hub server.

Step 3 – Select the configuration directory

When run as root on Linux, the installer offers system-wide configuration locations, commonly including:

/etc/verlihub

Choose the location you want and remember it. The configuration directory contains the database connection file, default text files, scripts, plugins and logs. Protect it because it contains sensitive configuration information.

Step 4 – Create the master account

The wizard asks for a master nickname and password. The master account receives the highest Hub permission class (class 10 in the documented setup). Choose a unique nickname and a strong password, and store the credentials securely.

Step 5 – Set the initial Hub details

The installer asks for basic information such as:

  • Hub listening port.
  • Hub hostname or address.
  • Hub name.
  • Master account details.

For an unprivileged process, the documented default listening port is typically

4111

. A process binding to a port below 1024, such as the traditional NMDC port

411

, generally needs additional privileges or a suitable capability. Prefer an unprivileged port unless you have deliberately configured a secure way to bind to port 411.

Step 6 – Finish installation

After confirming the settings, the installer creates the database tables, writes the configuration files and initializes the master account. Check the install log in the configuration directory if the wizard reports an error.

8. Start Verlihub and check its status

Once initialization is complete, start the Hub with:

sudo verlihub --run

The

--run

command starts the Hub under its watchdog process according to the current Verlihub utilities documentation. The Hub's output and errors are written to files in its configuration directory.

Check whether it is running

sudo verlihub --status

Other useful commands include:

# Display command help
verlihub --help

# Run with a specific configuration directory
sudo verlihub --run /etc/verlihub

# Stop the Hub using its configuration directory
sudo verlihub --stop /etc/verlihub

# Restart the Hub using its configuration directory
sudo verlihub --restart /etc/verlihub

Use the actual configuration path selected during installation. The command-line syntax is release-dependent; consult

verlihub --help

if your installed version does not accept one of these forms.

9. Connect and configure your Hub

Step 1 – Connect with a DC++ client

Open a compatible NMDC client, such as AirDC++ or DC++. Add your Hub as a favorite using the hostname and port configured during installation.

dchub://hub.example.com:4111

Replace

hub.example.com

and

4111

with your actual hostname and port. Log in using the master nickname and password created by the installation wizard.

Step 2 – Check the Hub commands

Once connected as the master account, enter:

!help

This displays commands available to your permission class.

Step 3 – Configure basic Hub information

Verlihub stores most Hub settings in its database. The master account can inspect settings with:

!getconfig

Use

!getvar

to search for a setting, and

!set

to change a value. For example, the documented configuration variables include:

!set hub_desc Welcome to my DC++ Hub
!set hub_topic Welcome - please read the rules
!set hub_owner Hub Administration
!set max_users 500

These are examples. Check the current value and expected format before changing a setting. Some settings may require a reload or restart.

Step 4 – Edit welcome and information files

The configuration directory contains text files such as

motd

,

rules

and

faq

. Edit them to provide a welcome message, Hub rules and frequently asked questions. The Hub provides commands such as

+motd

,

+rules

and

+faq

to display these files, depending on the installed version and configuration.

Step 5 – Register operators

Use the user-registration commands documented by your Verlihub version to create operator accounts. The current setup guide gives

!regnew 3

as an example for registering a user with class 3. Confirm the permission-class definitions in your Hub before assigning privileges.

10. Configure firewall, ports and DNS

Your Hub must be reachable from the internet. Open the TCP port configured during installation in the server firewall and any cloud-provider firewall.

Allow the port with UFW

If your Hub listens on port 4111:

sudo ufw allow 4111/tcp
sudo ufw status

If you configured port 411 instead, allow that port:

sudo ufw allow 411/tcp

Only open the port you actually use. If UFW is not enabled, review your server's existing firewall policy before enabling it, especially on a remote VPS, so you do not lock yourself out of SSH.

Check the listening port

sudo ss -lntp | grep -E ':4111|:411'

Test from another machine:

nc -vz hub.example.com 4111

Configure DNS

Create an A record for your Hub hostname that points to your public IPv4 address:

hub.example.com  A  YOUR_PUBLIC_IPV4

Use an AAAA record only if IPv6 is configured end-to-end on the server, firewall and network.

Home server port forwarding

If hosting at home, reserve a local IP for the Linux machine and forward the Hub's TCP port from your router to that address. If your ISP uses CGNAT, normal port forwarding may not work; request a public IP or use a VPS.

11. Enable secure NMDC connections (NMDCS)

Supported Verlihub releases can provide TLS-encrypted NMDC connections using the NMDCS protocol. The current project FAQ documents TLS support and automatic creation of a self-signed certificate when the expected certificate file is missing or expired.

Clients connect using an address such as:

nmdcs://hub.example.com:4111

For a production public Hub, use a certificate appropriate for your hostname and configure it according to the TLS documentation for your exact Verlihub release. A self-signed certificate may cause client trust warnings. Do not assume that TLS is correctly configured merely because the Hub starts.

The project documentation describes settings including

tls_enable

and

tls_only_mode

. Check their current defaults and behavior before changing them. If you enable TLS-only mode, make sure your users' clients support NMDCS first.

Verlihub FAQ – TLS connections

12. Start Verlihub automatically with systemd

For production use, configure the Hub to start automatically after a reboot. The Verlihub source repository includes a systemd service template. The project documentation recommends using its supplied service file because Verlihub has its own process and multi-Hub management commands.

Step 1 – Locate the service template

If you cloned the source into

/usr/local/src/verlihub

, inspect:

ls -l /usr/local/src/verlihub/scripts/verlihub.service

Read the comments in that file and follow the installation instructions for your version. The template may expect a Hub entry in Verlihub's multi-Hub configuration.

Step 2 – Review the service template

sudo less /usr/local/src/verlihub/scripts/verlihub.service

Do not blindly copy a service file without checking its executable path, configuration path, user and start/stop commands.

Step 3 – Install and enable the service

Follow the service template's comments for the correct destination and setup. Then reload systemd and enable the service using the unit name supplied by the project:

sudo systemctl daemon-reload
sudo systemctl enable --now verlihub

The unit name may differ if you use a custom service filename. Use

systemctl list-unit-files | grep -i verlihub

to find the installed unit.

Step 4 – Check service status and logs

sudo systemctl status verlihub
sudo journalctl -u verlihub -f

If you prefer not to use the supplied service template, create a custom systemd unit only after verifying the exact Verlihub start and stop commands for your release. Avoid running two watchdogs or service managers for the same Hub.

13. Administration and useful commands

Command Purpose
!help Show commands available to your account class.
!getconfig / !gc Display configuration variables.
!getvar / !gv Search configuration variables.
!set Change a Hub setting.
!reload / !re Reload configuration and caches.
!regnew Register a user with a permission class, where permitted.

Command availability depends on the account's permission class and installed plugins. Use

!help

and the official command documentation for the exact syntax in your version.

Update GeoIP databases

Verlihub can use MaxMind databases for IP geolocation features. The project documents a utility command for updating these databases:

sudo verlihub --geoip

Run it only if your installation uses this feature and follow the documentation for the database path and permissions. The project also documents scheduling periodic updates with cron.

Multiple Hubs

Verlihub includes a multi-Hub manager on Linux and BSD. The

vhm

command or

verlihub -m

can list, add, start, stop and restart configured Hub instances. Each Hub should have its own configuration directory and database. Consult the official Multiple Hubs documentation before using these commands.

14. Backups and maintenance

A Verlihub backup should include both its configuration directory and its database. The configuration directory contains the database connection settings, Hub text files, scripts, plugins and logs. The database contains registered users and Hub settings.

Back up the configuration directory

If you used

/etc/verlihub

:

sudo tar -czf /root/verlihub-config-backup.tar.gz \
  /etc/verlihub

Back up the MariaDB database

For a database named

verlihub

, use a database account with appropriate backup permissions:

sudo mariadb-dump verlihub \
  > /root/verlihub-database-backup.sql

On installations that require database authentication, use a secure credential method rather than putting passwords directly into shell history or command-line arguments.

Store backups off the server, restrict access to them and test restoration periodically. Coordinate backups with database activity so that the dump is consistent.

Keep the server updated

sudo apt update
sudo apt upgrade

Before upgrading Verlihub itself, back up the database and configuration, read the release notes and check whether database migrations or configuration changes are required.

15. Troubleshooting common problems

Problem What to check
Verlihub command not found Check whether installation completed and whether the install prefix is in PATH.
Compilation fails Review CMake output and install missing development libraries.
Database connection fails Check MariaDB status, database credentials, hostname and permissions.
Installation wizard cannot create database Check the database administrator credentials and whether the database server is accepting local connections.
Hub does not start Inspect the configuration directory's log, err and install_log files.
Connection refused Check Hub status, listening port and bind address.
Connection timeout Check UFW, cloud firewall, router forwarding and CGNAT.
Users cannot connect by domain Check DNS records and use the correct hostname and port.
NMDCS connection fails Check client support, TLS certificate and Verlihub TLS settings.
Hub stops after reboot Check the installed systemd unit and its enablement.

Useful diagnostic commands

Check MariaDB:

sudo systemctl status mariadb

Check listening ports:

sudo ss -lntp

Check Verlihub processes:

pgrep -a -i verlihub

Check systemd units:

systemctl list-units --type=service | grep -i verlihub

Inspect the installation log (adjust the path if you chose a different configuration directory):

sudo less /etc/verlihub/install_log

Inspect Hub error and runtime logs in the selected configuration directory:

sudo ls -lah /etc/verlihub/
sudo tail -n 100 /etc/verlihub/err
sudo tail -n 100 /etc/verlihub/log

16. Official resources

Conclusion

Verlihub is a capable NMDC Hub server for Linux. The main installation steps are to install MariaDB and the build dependencies, compile Verlihub, run

verlihub --install

, configure the Hub and database, then start it with

verlihub --run

. Once local client access works, configure the firewall, DNS, TLS and automatic startup before opening the Hub to the public.

Always use the documentation that matches the exact Verlihub release you build. Package names, build options, command-line arguments and systemd integration can change between versions.


Added: 5 hours ago Modified: 5 hours ago
Add Add Feedback

You must be logged in to comment.

Credits

Authors & Contributors

Tutorial Author(s):

  • poison Search

Added by

poisoN avatar
Offline poisoN
Offline
5 hours ago
Report Report tutorial

Ratings

Tutorial rating & score by users

?/10 [+]
You cannot assess yet!
tutorial rating is in your hands - when you assess a submission your vote determines its success or failure.

To vote on this tutorial register or login.

Interactions

Tutorial Add to Favorite & more

You cannot favorite yet!
You like this tutorial? You can add in your favorites list and return anytime from your list.

To add to favorite this tutorial register or login.

Tutorial Stats

Statistics about submission

Views: 2
Favorites: 0
Ratings Added: 0
Skill Level: Undefined
Feedback: 0
Shares: 0

Share

Send this submission on social media