Steps to install and run VerliHub are described. The guide is written for a Debian-like distribution, e.g. Debian itself or Ubuntu. The difference from other distributions is probably only the package manager and the specific names of the prerequisites. On some distributions, VerliHub might even be a part of the main repository, making a large part of this text superfluous.


sudo aptitude install libgeoip1 libgeoip-dev libpcre3 libpcre3-dev mysql-client-5.1 libmysqlclient16-dev

You also need a MySQL server running somewhere. To install it, run

sudo aptitude install mysql-server-5.1

I already had a database server on the LAN, so I used that instead.

Obtaining and compiling VerliHub and plugins

The source is available at VerliHubs homepage. Download latest version of VerliHub (or grab it from Git, instructions on the page) and the plugins you want. I needed the ISP plugin.

Open a terminal and go to the directory with the downloaded sources.

To compile and install VerliHub, run (using the currently latest version numbers, change accordingly):

tar jxvf verlihub-0.9.8e-r2.tar.bz2
cd verlihub-0.9.8e-r2/
sudo make install
cd -

To compile and install the ISP plugin, run:

tar zxvf isp-1.1.tar.gz
cd isp/
sudo make install

Make the ISP plugin autoload upon hub startup:

ln -s /usr/local/lib/ ~/.verlihub/plugins/

Initial setup

Run vh_install. This will trigger a guide where user details of master user and other settings are defined.

If you have access to the MySQL superuser account, enter those details to automatically setup database and tables. My database server don't allow remote root logins, so I manually created the verlihub user and granted it full privileges on a database called verlihub. I then supplied vh_install with the verlihub user details.

I'll assume you choose to store the configuration in ~/.verlihub/.

Start hub

Either simply run verlihub, preferably in GNU Screen/tmux/dtach/something similar, or install it as a service. The latter solution is more robust.

Install Verlihub as a service

Edit ${EXECUSER} to wanted value, make sure ${CFGDIR} is correct, and write this minimal initscript to /etc/init.d/verlihub (and make it executable!): Show script.


# Provides:             verlihub
# Required-Start:       mysql
# Required-Stop:        mysql
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Verlihub Direct Connect hub startup script
# Description:          Provides system startup capabilities to Verlihub.


VERLIHUBCMD="sudo -u ${EXECUSER} VERLIHUB_CFG=${CFGDIR} /usr/local/bin/vh_runhub"

case "$1" in
        echo "Starting up verlihub..."
        echo "Stopping verlihub..."
        ${VERLIHUBCMD} --stop
        echo "Restarting verlihub..."
        ${VERLIHUBCMD} --restart
        echo "Usage: /etc/init.d/verlihub {start|stop|restart}"
        exit 1

exit 0

Hide script.

Afterwards, run:

sudo update-rc.d verlihub defaults

and that should do it. Verlihub will now start automatically at boot and is controlled as other services (sudo service verlihub restart and such).

Modifying hub settings

Log in as master user and type !getconfig in main chat or in a PM to the hub security bot to see a list of configuration options and their current values. To change an option, execute e.g. !set min_share 5120.

Also, look at the ~10-15 text files situated in the ~/.verlihub/ directory and modify them to your needs.

To apply configuration settings at runtime, issue !reload as hub admin. The help says that some options require a restart, but it doesn't specify which these are.

Applying rules to certain IP ranges

This is the task for which I needed the ISP plugin. As an example, to force everyone in to prefix their username with [ABC] and name this rule "ISP rule" run

!addisp -N "ISP rule" -n \[ABC\]

The expression after -n is a regular expression, and can thus be quite advanced (VerliHub regex support). One caveat I ran into is that it is possible to define very long expressions, and they work fine during the current hub session due to rule caching. They are, however, stored in the MySQL database and read for the next session, and the field for storage is VARCHAR(64), which means that character 65 and onwards are truncated. I tried to change the column type to VARCHAR(128) and manually inserting the rule, but VerliHub resets the column type upon startup. Simply keep your regular expressions below 64 characters to avoid fighting (unless you want to dig in the sources of VerliHub).

Another comment of the !addisp command is that many of the switches it announces to support simply don't work. Make additional configuration directly in the MySQL table instead.

To additionally restrict all other IP:s from accessing the hub, the simplest way I found was to use !banrange and specify all ranges outside the permitted one. In the above case this would be

!banrange Outside allowed IP range.
!banrange Outside allowed IP range.

The trailing message is shown when someone outside the allowed range tries to connect.

An interesting (and undocumented?) feature is that registered users override the IP bans, from some testing I've done (class 1 and upwards). This was usable for me, but might be unwanted for others.

This was just an example of the idea, in practice you might want to allow the private ranges (,,

Connect from within a LAN

It is tricky to connect to the hub from with a client within the hub's LAN and be able to connect to external computers. The hub will relay the clients' IP addresses for their initial communication, and if the client connected through LAN, the hub will relay the local client's internal IP address, which is not to much use for the external client.

This has to be solved on the hub side, for vulnerability reasons in letting clients report arbitrary external IP numbers. To do this, the LAN user must be a registered user, whereafter their external IP should be defined with the (also quite completely undocumented) alternate_ip setting:

!regset [RY]dapub alternate_ip

This in practice also binds this registered user to this particular external IP. This could probably be used as a feature.

Where is the documentation?

Relevant question. On the official VerliHub page, information is very much lacking. There was a more extensive wiki documentation online in the past, but it seems to have been lost in ~2006 and not been recreated. Enter: the Wayback Machine! Here you will find the VerliHub Wiki as of 2006-09-01.

Documentation is not the project's forte, and neither is spelling or consistency regarding variable/command naming. When the hub is up and running, it is very lean and stable, though. Direct Connect is no longer the hippest protocol cat in the club, so alternatives are not aplenty.