How to Create a DC++ Hub Server - Windows & Linux
Learn how to create, configure and run your own DC++ Hub server on Windows or Linux. Complete PtokaX and uHub installation, port forwarding, administration.
Learn how to set up, configure and run your own Direct Connect (DC++) Hub on Windows or Linux. This guide covers hub software, installation, network ports, domain names, user administration, public hub listings, security, backups and troubleshooting.
Who is this guide for? Anyone who wants to host a private or public DC++ community using a home computer, VPS or dedicated server.
1. What is a DC++ Hub?
Direct Connect (DC++) is a peer-to-peer file-sharing network. Users connect to central servers called Hubs, where they can chat, discover other users and search for shared files.
A Hub manages the community and its connections. In a typical Direct Connect setup, it does not store users' shared files: file transfers take place directly between users' clients.
- Manage connected users and chat rooms.
- Register nicknames and authenticate members.
- Assign moderators, operators and administrators.
- Set minimum share requirements and Hub rules.
- Welcome users, display announcements and moderate chat.
- Allow compatible clients to discover and connect to one another.
2. Choose your Hub software
Choose the server software according to the Direct Connect protocol you want to support. NMDC and ADC are different protocols; a client must use a protocol supported by the Hub.
| Software | Platform | Protocol | Typical use |
|---|---|---|---|
| PtokaX | Windows / Linux | NMDC | Traditional hubs, Lua scripts and community features. |
| uHub | Linux / Unix | ADC / ADCS | Lightweight ADC hubs, including encrypted connections. |
| Verlihub | Linux | NMDC | NMDC hub deployments with an extensible architecture. |
| ADCH++ | Windows / Linux | ADC | ADC hub software and related tooling. |
PtokaX
PtokaX is a well-known NMDC Hub application. It is suitable for traditional DC++ communities and supports user profiles, moderation and Lua scripting. Check the release notes and included documentation for the exact features and supported operating systems of the version you download.
uHub
uHub is a lightweight ADC Hub server for Unix-like systems. It supports ADC and can be configured for secure ADCS connections using TLS. Follow the documentation for the version you install.
uHub source code on GitHub · uHub documentation
dchub:// address. An ADC Hub uses adc://, while an encrypted ADC connection uses adcs://.
3. Server requirements
A small Hub can run on modest hardware. The resources you need depend on the number of users, scripts, plugins, logging and network activity.
| Component | Basic starting point | Suggested for a growing Hub |
|---|---|---|
| CPU | 1 CPU core | 2 or more cores |
| RAM | 512 MB | 2 GB or more |
| Storage | 1 GB free | 10 GB SSD or more |
| Network | Stable internet connection | Reliable connection with sufficient bandwidth |
| Operating system | Supported Windows or Linux release | Updated Debian or Ubuntu LTS for Linux hosting |
These are practical planning estimates, not official minimum requirements. Check the requirements of your chosen Hub software and release.
A VPS or dedicated server with a stable public IP address is usually the easiest option for a public Hub. A home-hosted Hub may require router configuration and a public IP address.
4. Install PtokaX on Windows
Step 1 – Download PtokaX
Find a Windows build from the PtokaX project or a trusted distribution source. Check that the download is genuine and compatible with your Windows version. Avoid random executable mirrors.
Visit the PtokaX project website
Step 2 – Extract the application
Create a folder such as:
C:\DC-Hub\PtokaX\
Extract the downloaded archive into that folder. Keep the executable, configuration files, scripts and other supplied files together unless the release documentation says otherwise.
Step 3 – Start PtokaX
Run the PtokaX executable. If Windows displays a security warning, verify the source of the download before allowing it to run. Use the administration interface or the configuration files supplied with your build.
Step 4 – Configure the Hub
Set the Hub name, description, listening port, maximum users and other options. The exact names and locations of these settings vary between PtokaX versions.
| Setting | Example |
|---|---|
| Hub name | My DC++ Hub |
| Hub address | hub.example.com |
| TCP listening port | 411 |
| Maximum users | 500 |
| Hub description | Welcome to my DC++ community |
These are example values, not a complete PtokaX configuration file. Use the settings supported by your installed release.
Step 5 – Create an administrator account
Connect to your Hub with a DC++ client, register your chosen nickname using the method provided by your PtokaX build, and assign the appropriate administrator profile from the Hub administration tools. Use a unique, strong password.
Step 6 – Allow the Hub through Windows Firewall
Open Windows Defender Firewall with Advanced Security, select Inbound Rules, then create a new rule:
- Choose Port.
- Select TCP.
-
Enter the Hub's listening port, for example
411. - Select Allow the connection.
- Choose the network profiles that apply to your server.
-
Name the rule, for example
DC++ Hub TCP.
You can also create the rule from an elevated PowerShell window:
New-NetFirewallRule `
-DisplayName "DC++ Hub TCP" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 411 `
-Action Allow
Step 7 – Keep the Hub running
For a test Hub, you can leave PtokaX running. For a production Hub, configure a reliable startup and recovery method, such as Windows Task Scheduler or a properly configured service wrapper. Test that the Hub starts after a reboot and that it restarts if the process exits unexpectedly.
5. Install PtokaX on Linux (Debian / Ubuntu)
Linux is a good choice for a VPS or dedicated server because the Hub can run in the background without a graphical desktop. The commands below show a general source-build workflow. Build dependencies, make targets, executable names and command-line options can differ by PtokaX release. Always follow the README and build instructions included with the exact source archive.
Step 1 – Update the system
sudo apt update
sudo apt upgrade -y
Step 2 – Install build tools
Install the tools and development libraries required by the source release. The package list below is a starting point, not a guaranteed dependency list for every PtokaX version.
sudo apt install -y \
build-essential \
cmake \
make \
g++ \
wget \
tar \
zlib1g-dev \
liblua5.4-dev \
libsqlite3-dev
If the build reports a missing library, check the release documentation and install the matching development package. Some older releases may require a different Lua version or additional libraries.
Step 3 – Download and extract the source
Download the source archive from a trusted PtokaX release source. Do not assume an old direct-download URL is still valid. After downloading the correct archive, extract it, for example:
mkdir -p ~/src/ptokax
cd ~/src/ptokax
tar -xf /path/to/ptokax-source-archive.tar.gz
ls -la
Step 4 – Read the build instructions and compile
Inspect the extracted files:
ls
find . -maxdepth 2 -iname 'readme*' -o -iname 'makefile*'
Use the exact build command documented by that release. For example, if the archive includes a Makefile with a documented target, run that target from the directory specified by its README. Do not assume that every release provides a target named
makefile-sqlite
.
Step 5 – Create a dedicated system user
Do not run a public Hub as root. Create a separate account to run it:
sudo useradd --system \
--home-dir /opt/ptokax \
--create-home \
--shell /usr/sbin/nologin \
ptokax
Install the compiled executable using the actual executable name and path produced by your build. For example:
sudo install -m 755 ./PtokaX /usr/local/bin/PtokaX
Only run that example if your build produced an executable named
PtokaX
in the current directory. Adjust the source and destination paths to match your release.
Step 6 – Initialize and configure PtokaX
Use the initialization and configuration options documented by your version. Some builds provide command-line options for creating a configuration directory; the syntax is not identical across all releases.
Keep the configuration, scripts, text files, databases and logs in the locations expected by your build. Ensure the dedicated
ptokax
user has write access only to the directories it needs.
Step 7 – Test the Hub in the foreground
Before configuring automatic startup, launch PtokaX using the command and configuration path specified by its documentation. Watch the terminal output for errors, confirm that it binds to the intended port, and test a client connection.
Step 8 – Configure automatic startup with systemd
Once you have confirmed the correct executable, arguments and configuration directory, create a systemd unit. This template assumes the program stays in the foreground. If your PtokaX build daemonizes itself, use the service type and startup options documented for that build instead.
sudo nano /etc/systemd/system/ptokax.service
[Unit]
Description=PtokaX Direct Connect Hub
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=ptokax
Group=ptokax
ExecStart=/usr/local/bin/PtokaX --YOUR-DOCUMENTED-OPTIONS
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Replace the example
ExecStart
line with the real command for your PtokaX release. Do not leave the placeholder in the service file.
Then reload systemd and enable the service:
sudo systemctl daemon-reload
sudo systemctl enable --now ptokax
sudo systemctl status ptokax
Useful service commands:
# Follow service logs
sudo journalctl -u ptokax -f
# Restart the Hub
sudo systemctl restart ptokax
# Stop the Hub
sudo systemctl stop ptokax
# Check whether it starts at boot
sudo systemctl is-enabled ptokax
6. Install uHub on Linux (ADC / ADCS)
Use uHub if you want to run an ADC Hub rather than an NMDC Hub. The commands below provide a general source-build outline. Check the project's current README and documentation for the dependencies, build options, configuration keys and authentication setup for the release you use.
Step 1 – Install build dependencies
sudo apt update
sudo apt install -y \
git cmake make gcc g++ \
libssl-dev zlib1g-dev
Step 2 – Get the source code
cd /usr/local/src
sudo git clone https://github.com/janvidar/uhub.git
sudo chown -R "$USER":"$USER" uhub
cd uhub
Step 3 – Build and install
cmake -S . -B build
cmake --build build -j2
Follow the project's current installation instructions for the install step and configuration paths. Build options and installation targets can change between versions.
Step 4 – Configure the Hub
Locate the sample configuration file supplied with the source or installation package. Configure the Hub name, description, listening address, port, user limit, authentication plugin and TLS settings. Do not paste an example configuration from a different uHub version without checking that its options are supported.
Step 5 – Configure authentication and an administrator
Enable and configure an authentication backend supported by your installed uHub build. If you use the SQLite authentication plugin, follow the matching version's instructions for creating its database and adding an administrator account. Keep the database readable and writable only by the Hub service account.
Step 6 – Start and test uHub
Start uHub using the configuration path and options documented for your build. Check its logs and confirm that the listening port is open. Example connection formats are:
adc://YOUR_SERVER_IP:1511
adcs://YOUR_SERVER_IP:1511
Port
1511
is only an example. Use the port configured in your Hub. ADCS also requires a correctly configured TLS certificate and private key.
7. Configure ports, firewall and DNS
A Hub can work on the server itself but still be unreachable from the internet if its listening port is blocked. Configure the operating-system firewall and, when hosting at home, your router.
Common example ports
| Hub type | Transport | Example port |
|---|---|---|
| NMDC / PtokaX | TCP | 411 |
| ADC / uHub | TCP | 1511 |
| Optional Hub features | UDP | As configured by the software |
These ports are examples. Open the ports actually configured in your Hub; do not open extra ports without a reason.
Open a port on Debian / Ubuntu with UFW
# Example: NMDC TCP port
sudo ufw allow 411/tcp
# Example: ADC TCP port
sudo ufw allow 1511/tcp
# Review firewall rules
sudo ufw status
Router port forwarding for home hosting
-
Give the server a reserved local IP address, such as
192.168.1.100. - Open your router's Port Forwarding or Virtual Server page.
- Create a rule for the Hub's TCP port.
- Forward the external port to the same listening port on the server's local IP.
- Save the rule and test from a connection outside your home network.
Example rule:
External port: 411
Internal port: 411
Protocol: TCP
Destination IP: 192.168.1.100
Use a domain name
Create an A record pointing your Hub hostname to the server's public IPv4 address. If you use IPv6, configure an AAAA record only when your server, firewall and clients are correctly configured for IPv6.
hub.example.com A YOUR_PUBLIC_IPV4
Wait for DNS changes to propagate, then test that the hostname resolves to the correct address.
Check that the server is listening
On Linux:
sudo ss -lntup
sudo ss -lntp | grep ':411'
From another machine, test TCP connectivity:
nc -vz hub.example.com 411
A successful TCP test shows that the port can be reached from that test location. It does not by itself verify the Hub protocol, authentication or file transfers.
8. Connect to your Hub with a DC++ client
Install a Direct Connect client that supports the protocol used by your Hub. Examples include:
Add the Hub address
Open the client's Favorite Hubs section and add the correct address format.
PtokaX / NMDC example:
dchub://hub.example.com:411
uHub / ADC example:
adc://hub.example.com:1511
uHub / encrypted ADCS example:
adcs://hub.example.com:1511
Replace the hostname and port with your own settings. Select a nickname, enter your registered password if required, and connect.
Test sharing and downloads
- Configure at least one shared folder in your client.
- Connect to the Hub and confirm that you appear in the user list.
- Check that the client has finished indexing your shared files.
- Search for a test file shared by another user.
- Try downloading it, with permission from the file owner.
Important: Connecting to a Hub and transferring files are separate network operations. A user may connect to the Hub successfully but still be unable to download files because of their client connection mode, NAT or firewall configuration.
9. Manage users and administrators
A public Hub should have clear roles and rules. Typical permission levels include:
| Role | Typical permissions |
|---|---|
| Normal user | Chat, browse users and share files. |
| Registered user | Access using a registered nickname and password. |
| VIP | Additional privileges defined by the Hub owner. |
| Moderator | Moderate chat and enforce Hub rules. |
| Operator | Manage users and moderation tasks. |
| Administrator | Configure and manage the Hub. |
Consider enabling nickname registration, password authentication, temporary bans, IP bans, chat flood protection, sensible user limits, a Message of the Day and automatic welcome messages.
PtokaX supports Lua scripting. Scripts can add custom commands, bots, announcements and moderation features. Only install scripts from sources you trust, and check compatibility with your PtokaX and Lua versions.
10. Make your Hub public
Public Hublists help users discover your community. Each listing service has its own submission process and requirements. Check that the service is currently operating and supports your Hub protocol before submitting.
Prepare the following information:
| Field | Example |
|---|---|
| Hub name | My DC++ Hub |
| Hub address | hub.example.com |
| Port | 411 |
| Protocol | NMDC |
| Description | Public file-sharing community |
| Website | https://example.com |
| Country | Your server's location |
Before submitting your Hub, confirm that it is reachable from outside your network, the DNS record is correct, the Hub is online and the listing details match its actual protocol and port.
Find a current Hublist through a trusted DC++ community or search for public Direct Connect Hublists. Do not assume that an old Hublist URL is still active.
11. Security and maintenance
A public Hub accepts connections from people you may not know. Apply basic server-hardening practices:
- Run the Hub under a dedicated, unprivileged account.
- Use strong, unique passwords for administrators.
- Keep the operating system and Hub software updated.
- Open only the ports that the Hub actually needs.
- Restrict SSH, remote desktop and administration access.
- Enable available flood protection and connection limits.
- Review scripts and plugins before installing them.
- Monitor logs for repeated failed logins and abusive activity.
- Use TLS for ADC connections when operating an ADCS Hub.
- Keep backups in a separate location.
Do not expose database files, private keys or administrator configuration files through a public web directory.
12. Back up your Hub
Back up your configuration, user database, scripts, custom text files and other data required to restore the Hub. The exact folders depend on your installation.
For example, if your PtokaX configuration and data are stored under
/etc/ptokax
and
/opt/ptokax
, you could create an archive with:
sudo tar -czf /root/ptokax-backup.tar.gz \
/etc/ptokax \
/opt/ptokax
Adjust these paths to match your actual setup. For databases that may be changing while the Hub is running, use the database's supported backup method or stop the service before making a file-level copy. Store backups off the server and periodically test that they can be restored.
13. Troubleshooting common problems
| Problem | What to check |
|---|---|
| Connection refused | Confirm the Hub process is running and listening on the configured port. |
| Connection timeout | Check the server firewall, cloud firewall and router port forwarding. |
| Works locally but not externally | Check the public IP, CGNAT, DNS and router configuration. |
| Domain does not connect | Check the A/AAAA record and use the correct protocol and port. |
| Port already in use | Find the process using the port or configure a different listening port. |
| Users cannot download | Check client connection mode, NAT and client-side firewall rules. |
| PtokaX fails to start | Check its dependencies, permissions, configuration and release-specific logs. |
| Lua script errors | Check the script's requirements and Lua/PtokaX compatibility. |
| Hub is offline after reboot | Check the Windows startup task or Linux systemd service. |
| ADCS connection fails | Check TLS certificate configuration, hostname, protocol and listening port. |
Useful Linux diagnostic commands
Check whether PtokaX is running:
pgrep -a -i ptokax
List listening ports:
sudo ss -lntup
Check system resources:
top
Read systemd logs if you created a service:
sudo journalctl -u ptokax -n 100 --no-pager
Test a remote TCP port:
nc -vz hub.example.com 411
14. Which Hub software should you choose?
| Your requirement | Suggested software |
|---|---|
| Traditional NMDC community | PtokaX |
| NMDC Hub with Lua customization | PtokaX |
| ADC Hub on Linux | uHub |
| Encrypted ADC connections | uHub with ADCS configured |
For a first traditional DC++ Hub, PtokaX is a practical starting point. If you specifically want an ADC-based network, evaluate uHub and follow its current documentation.
15. Useful resources and downloads
Add FeedbackYou must be logged in to comment.

