Every directive there is to know. Type to filter; click a directive to expand it.
No directives match your search.
Server & network
server_portdefault: 1511
Description
This specifies the port number the hub should listen on.
Type
number (1–65535)
Default
1511
Since
uhub 0.1.0
server_bind_addrdefault: "any"
Description
Specify the IP address the local hub should bind to. This can be an IPv4 or IPv6 address, or one of the special addresses "any" or "loopback".
When "any" or "loopback" is used, the hub will automatically detect if IPv6 is supported and prefer that.
Type
String
Default
"any"
Since
uhub 0.1.2
Syntax
IPv4 address, IPv6 address, "any" or "loopback"
Example
To listen to a specific IP:
server_bind_addr = "192.168.12.69"
To listen to any IPv4 address:
server_bind_addr = "0.0.0.0"
Or to listen to any address including IPv6 (if supported):
server_bind_addr = "any"
server_listen_backlogdefault: 50
Description
This specifies the number of connections the hub will be able to accept in the backlog before they must be processed by the hub.
A too low number here will mean the hub will not accept connections fast enough when users are reconnecting really fast. The hub should under normal circumstances be able to empty the listen backlog several times per second.
Type
number ≥ 5
Default
50
Since
uhub 0.3.0
server_alt_portsdefault: ""
Description
In addition to the server_port the hub can listen to a list of alternative ports.
Type
String
Default
""
Since
uhub 0.3.0
Example
server_alt_ports = 1295,1512,53990
server_reuseportdefault: no
Description
Set SO_REUSEPORT on the listening socket so that multiple hub processes can bind the same
server_port; the kernel then load-balances incoming client connections across them. This is
the basis for running one logical hub as several worker processes on a multi-core machine
(linked together so they share one roster and SID space).
Enabled automatically when "workers" is greater than 1. Only set it by hand if you supervise
the worker processes yourself (e.g. a systemd template).
Type
boolean
Default
no
Since
uhub 0.7.0
Hub options
hub_enableddefault: yes
Description
Use this to disable the hub for a while.
Type
boolean
Default
yes
Since
uhub 0.1.3
show_bannerdefault: yes
Description
If enabled, the hub will announce the software version running to clients when they connect with a message like: "Powered by uhub/0.x.y"
Type
boolean
Default
yes
Since
uhub 0.1.0
show_banner_sys_infodefault: yes
Description
If enabled, the hub will announce the operating system and CPU architecture to clients when they join.
This option has no effect if show_banner is disabled.
Type
boolean
Default
yes
Since
uhub 0.3.0
max_usersdefault: 500
Description
The maximum amount of users allowed on the hub.
No new users will be allowed to enter the hub if this number is exceeded, however privileged users (operators, admins, etc) are still able to log in.
Type
number (1–1048576)
Default
500
Since
uhub 0.1.0
Example
To run a hub for max 25 users:
max_users = 25
registered_users_onlydefault: no
Description
If this is enabled only registered users will be able to use the hub. A user must be registered in the acl file (file_acl).
Type
boolean
Default
no
Since
uhub 0.1.1
register_selfdefault: no
Description
If this is enabled guests can register their nickname on the hub using !register command.
Otherwise only operators can register users.
Type
boolean
Default
no
Since
uhub 0.4.0
obsolete_clientsdefault: no
Description
If this is enabled users using old ADC clients are allowed to enter the hub,
however they cannot log in using passwords since the protocols are incompatible.
Type
boolean
Default
no
Since
uhub 0.3.1
chat_is_privilegeddefault: no
Description
If enabled only operators and admins are allowed to chat in the main chat.
Type
boolean
Default
no
Since
uhub 0.2.4
hub_namedefault: "uhub"
Description
Configures the name of the hub
Type
String
Default
"uhub"
Since
uhub 0.1.0
Example
hub_name = "my hub"
hub_descriptiondefault: "no description"
Description
This is the description of the hub, as seen by users and hub lists.
Type
String
Default
"no description"
Since
uhub 0.1.0
Example
hub_description = "a friendly hub for friendly people"
redirect_addrdefault: ""
Description
This is the redirect address used when the hub wants to redirect a client for not fulfilling some requirements.
Type
String
Default
""
Since
uhub 0.3.2
low_bandwidth_modedefault: no
Description
If this is enabled the hub will remove excessive information from each user's info message before broadcasting to all connected users.
Description, e-mail address will be removed. This saves upload bandwidth for the hub.
Type
boolean
Default
no
Since
uhub 0.2.2
Hub information
hub_addressdefault: ""
Description
The DNS name or IP address clients use to reach this hub. Sent to clients
that support the ADC PING extension and to a registration server (the "HH"
field). It is normalized to a complete adc:// or adcs:// URL with a port:
a missing scheme (adcs:// when tls_enable is set, otherwise adc://) and a
missing port (server_port) are filled in automatically, so a bare host is
accepted. Leave empty to omit.
Type
String
Default
""
Since
uhub 0.7.0
Example
hub_address = "adc://hub.example.com:1511"
A bare host such as "hub.example.com" is expanded to adc(s)://hub.example.com:<server_port>.
hub_websitedefault: ""
Description
The hub's website. Sent to clients that support the ADC PING extension
(the "WS" field). Leave empty to omit.
Type
String
Default
""
Since
uhub 0.7.0
Example
hub_website = "https://www.example.com"
hub_networkdefault: ""
Description
The name of the network this hub belongs to. Sent to clients that support
the ADC PING extension (the "NE" field). Leave empty to omit.
Type
String
Default
""
Since
uhub 0.7.0
Example
hub_network = "Example Network"
hub_ownerdefault: ""
Description
The name of the hub owner. Sent to clients that support the ADC PING
extension (the "OW" field). Leave empty to omit.
Type
String
Default
""
Since
uhub 0.7.0
Example
hub_owner = "Jane Doe"
reg_server_urldefault: ""
Description
The HTTP/HTTPS URL of an ADC hub-list registration server. When set, the
hub sends a single POST request to this URL at startup with its own IINF
line as the body, expecting a "202 Accepted" reply, so hub lists can pick
the hub up automatically. Leave empty (the default) to disable; this is
the on/off switch, so leave it empty for private hubs. The path defaults
to /register and the port defaults to 80 (http) or 443 (https). For the
announce to carry a usable address, also configure hub_address (the HH
field): it is normalized to an adc:// or adcs:// URL including the port,
so a missing scheme (adcs:// when tls_enable is set, otherwise adc://)
and a missing port (server_port) are filled in automatically. No retries
are attempted; the outcome is logged.
Limits how many connections a single IP address may hold at once, counting both connections still in the pre-login (probe) phase and logged-in users. This bounds connection-slot exhaustion from a single source (a flood of connections that never complete login, or are churned to keep every slot occupied).
If this is 0 the limit is disabled. Note that clients sharing one public IP (behind NAT) all count against the same limit, so pick a value that accommodates your largest expected shared address.
Type
number (0–1048576)
Default
0
Since
uhub 0.7.1
Syntax
0 = off
Example
To allow at most 10 concurrent connections per IP:
max_connections_per_ip = 10
limit_max_hubs_userdefault: 10
Description
This limits the number of hubs a user can be logged into as a guest user. If this number is exceeded, the user will not be allowed to enter the hub.
Type
number ≥ 0
Default
10
Since
uhub 0.2.0
Syntax
0 = off
limit_max_hubs_regdefault: 10
Description
This limits the number of hubs a user can be logged into as a registered user. If this number is exceeded, the user will not be allowed to enter the hub.
Type
number ≥ 0
Default
10
Since
uhub 0.2.0
Syntax
0 = off
limit_max_hubs_opdefault: 10
Description
This limits the number of hubs a user can be logged into as an operator. If this number is exceeded, the user will not be allowed to enter the hub.
Type
number ≥ 0
Default
10
Since
uhub 0.2.0
Syntax
0 = off
limit_max_hubsdefault: 25
Description
Limit the number of hubs a user can be logged into in total regardless of registrations or privileges.
If this number is exceeded, the user will not be allowed to enter the hub.
Type
number ≥ 0
Default
25
Since
uhub 0.2.0
Syntax
0 = off
limit_min_hubs_userdefault: 0
Description
Only allow users that are logged into other hubs with guest privileges to enter this hub.
Type
number ≥ 0
Default
0
Since
uhub 0.2.0
Syntax
0 = off
limit_min_hubs_regdefault: 0
Description
Only allow users that are logged into other hubs as a registered user to enter this hub.
Type
number ≥ 0
Default
0
Since
uhub 0.2.0
Syntax
0 = off
limit_min_hubs_opdefault: 0
Description
Only allow users that are logged into other hubs with operator privileges to enter this hub.
Type
number ≥ 0
Default
0
Since
uhub 0.2.0
Syntax
0 = off
limit_min_sharedefault: 0
Description
Minimum share limit in megabytes (MiB). Users sharing less than this will not be allowed to enter the hub.
Type
number ≥ 0
Default
0
Since
uhub 0.2.0
Syntax
0 = off
Example
To require users to share at least 1 GB in order to enter the hub:
limit_min_share = 1024
limit_max_sharedefault: 0
Description
Maximum share limit in megabytes (MiB). Users sharing more than this will not be allowed to enter the hub.
Type
number ≥ 0
Default
0
Since
uhub 0.2.0
Syntax
0 = off
limit_min_slotsdefault: 0
Description
Minimum number of upload slots required. Users with less than this will not be allowed to enter the hub.
Type
number ≥ 0
Default
0
Since
uhub 0.2.0
Syntax
0 = off
limit_max_slotsdefault: 0
Description
Maximum number of upload slots allowed. Users with more than this will not be allowed to enter the hub.
Type
number ≥ 0
Default
0
Since
uhub 0.2.0
Syntax
0 = off
limit_min_searchdefault: 0
Description
Minimum length (in bytes) of a substring search term. Searches whose
longest include term ("AN") is shorter than this are rejected. Very
short terms (such as a single letter) match a huge number of files and
generate a lot of traffic through the hub, so requiring a few characters
keeps searches precise and reduces load. Exact content (TTH) searches and
searches from operators and above are never restricted.
Type
number (0–255)
Default
0
Since
uhub 0.7.0
Syntax
0 = off
Example
To require search terms to be at least 3 characters long:
limit_min_search = 3
Flood control
flood_ctl_intervaldefault: 0
Description
This is the time interval that will be used for all flood control calculations.
If this is 0 then all flood control is disabled.
Type
number (1–60)
Default
0
Since
uhub 0.3.1
Syntax
0 = off
Example
To limit maximum chat messages to 5 messages on 10 seconds:
flood_ctl_interval = 10
flood_ctl_chat = 5
flood_ctl_chatdefault: 0
Description
If this is 0 then no flood control is disabled for chat messages.
Type
number
Default
0
Since
uhub 0.3.1
Syntax
0 = off
flood_ctl_connectdefault: 0
Description
If this is 0 then no flood control is disabled for connection requests.
Type
number
Default
0
Since
uhub 0.3.1
Syntax
0 = off
flood_ctl_searchdefault: 0
Description
If this is 0 then no flood control is disabled for search requests.
Type
number
Default
0
Since
uhub 0.3.1
Syntax
0 = off
flood_ctl_updatedefault: 0
Description
If this is 0 then no flood control is disabled for info updates (INF messages).
Type
number
Default
0
Since
uhub 0.3.1
Syntax
0 = off
flood_ctl_extrasdefault: 0
Description
Extra messages are messages that don't fit into the category of chat, search, update or connect.
Type
number
Default
0
Since
uhub 0.3.1
Syntax
0 = off
TLS
tls_enabledefault: no
Description
Enables/disables TLS/SSL support. tls_certificate and tls_private_key must be set if this is enabled.
Type
boolean
Default
no
Since
uhub 0.3.0
tls_requiredefault: no
Description
If TLS/SSL support is enabled it can either be optional or mandatory.
If this option is disabled then SSL/TLS is not required to enter the hub, however it is possible to enter either with or without.
This option has no effect unless tls_enable is enabled.
Type
boolean
Default
no
Since
uhub 0.3.0
tls_require_redirect_addrdefault: ""
Description
This is the redirect address used when the hub wants to redirect a client for not using ADCS.
For instance a hub at adc://adc.example.com might redirect to adcs://adc.example.com
Type
String
Default
""
Since
uhub 0.3.3
tls_certificatedefault: ""
Description
Path to a TLS/SSL certificate or certificate chain (PEM format).
This is a colon separated list of preferred ciphers in the OpenSSL format.
It only affects TLS 1.2 and earlier; the TLS 1.3 cipher suites are
configured separately with tls_ciphersuites.
High security with emphasis on forward secrecy:
tls_ciphersuite = "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS"
Allow ChaCha20/Poly1305 which are secure, yet generally faster:
tls_ciphersuite = "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA"
This is a colon separated list of preferred TLS 1.3 cipher suites in the
OpenSSL format. TLS 1.3 uses a separate, fixed set of cipher suites that
are named differently from earlier versions, so they cannot be mixed with
tls_ciphersuite. The default enables all standard TLS 1.3
suites. This setting has no effect unless TLS 1.3 is negotiated.
Prefer AES-256-GCM, then ChaCha20/Poly1305, then AES-128-GCM:
tls_ciphersuites = "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
tls_versiondefault: "1.2"
Description
This allows you to specify the minimum TLS version the hub requires from connecting clients in order to
connect to the hub. Valid values are "1.2" and "1.3".
TLS version 1.2 is recommended and enabled by default.
TLS version 1.3 can be required to admit only the most modern clients.
TLS versions below 1.2 are deprecated and no longer supported.
Type
String
Default
"1.2"
Since
uhub 0.5.0
Metrics
metrics_enabledefault: no
Description
When enabled, the hub answers HTTP GET requests for the metrics path
(see metrics_path) on the regular server port(s) with a Prometheus
text-exposition document. A valid bearer token (metrics_token) is
required; if no token is configured the endpoint stays disabled.
The endpoint is served on the same port(s) as ADC, both over plain HTTP and, when
tls_enable is set, over HTTPS (scrape with https://). Use
HTTPS to keep the bearer token confidential: plain HTTP is also accepted on the same
port, so over plain HTTP the token is exposed on an untrusted network -- scrape over
loopback/a trusted network, or use HTTPS.
Type
boolean
Default
no
Since
uhub 0.7.0
metrics_tokendefault: ""
Description
The token that scrapers must present in an Authorization: Bearer <token>
request header. The metrics endpoint is refused unless this is set to a non-empty value.
Type
String
Default
""
Since
uhub 0.7.0
Example
metrics_token = "a-long-random-secret"
metrics_pathdefault: "/metrics"
Description
The HTTP path that returns metrics. Requests for any other path receive 404. Change this
to obscure the endpoint if desired. Must begin with a slash.
Type
String
Default
"/metrics"
Since
uhub 0.7.0
Federation & scaling
workersdefault: 1
Description
Number of worker processes to run as a single logical hub on a multi-core machine. With
workers greater than 1, the hub forks that many processes that share the client port
(SO_REUSEPORT, so the kernel spreads connections across cores) and link to each other over
Unix sockets, presenting one unified roster and SID space to clients. Each worker is a normal
single-threaded hub, so this scales the CPU-bound work (especially TLS) across cores without
any threading.
1 (the default) runs a single process. 0 means auto: one worker per online CPU. The master
process only supervises the workers (restarting any that exit); it serves no clients itself.
Type
number (0–256)
Default
1
Since
uhub 0.7.0
worker_socket_dirdefault: "/tmp"
Description
Directory in which the master creates the Unix domain sockets that worker processes use to
link to each other (one per worker). Must be a short path (the socket path is limited to about
108 bytes) on a local filesystem, and should be private to the hub user. Only used when
workers is greater than 1.
Type
String
Default
"/tmp"
Since
uhub 0.7.0
dns_thread_pool_sizedefault: 4
Description
Hostname resolution (for hub linking and registration server announcements) runs on a pool
of background threads so the main event loop never blocks on a slow DNS lookup. This option
sets the number of worker threads in that pool.
A small pool is plenty for a typical hub; raise it only if a large number of outbound lookups
must run concurrently. Changing this value takes effect on restart, not on a configuration reload.
Type
number (1–64)
Default
4
Since
uhub 0.7.0
link_peerdefault: ""
Description
Address (host:port) of an upstream hub to establish a persistent link to. Empty disables outbound linking.
Type
String
Default
""
Since
uhub 0.7.0
Example
link_peer = hub2.example.org:1512
link_secretdefault: ""
Description
Shared secret that both ends of a link must hold. Links authenticate by proving knowledge of
this secret via a nonce challenge-response; the secret itself is never sent over the wire.
Type
String
Default
""
Since
uhub 0.7.0
auth_proxydefault: no
Description
Master-slave authentication for linked hubs. When enabled this node is an auth slave: it holds
no user accounts of its own and defers registered-user login to its upstream linked hub (the
master), which keeps the only copy of the account database. The slave asks the master whether a
nick is registered, and forwards the password challenge-response to the master to verify, so
passwords never leave the master.
Leave disabled on the master (the hub that loads the auth plugin with the accounts). Guests are
unaffected and log in locally.
Type
boolean
Default
no
Since
uhub 0.7.0
link_socketdefault: ""
Description
Path to a Unix domain socket this hub listens on for inbound links from other hub processes
on the same machine. Used to link worker processes of one logical hub without routing link
traffic through the shared client port. Empty disables the Unix-socket listener (TCP links on
the normal port still work). A link_peer that begins with "/" connects to such a socket.
Protect the socket with filesystem permissions; it grants the same privileges as any link.
Type
String
Default
""
Since
uhub 0.7.0
Example
link_socket = /run/uhub/worker-0.sock
node_countdefault: 1
Description
Total number of nodes in a linked cluster. The ~1M ADC SID space is split into this many
disjoint windows so each node allocates globally-unique SIDs without coordination. 1 = stand-alone.
Type
number (1–1048576)
Default
1
Since
uhub 0.7.0
node_iddefault: 0
Description
Zero-based index of this hub within the cluster; must be unique per node and less than node_count.
Selects which SID window this node allocates from. Ignored when node_count is 1.
Set to -1 to lease a SID window dynamically from the cluster over the link instead of
configuring a fixed index (the node defers local logins until the lease is granted).
Type
number (-1–1048575)
Default
0
Since
uhub 0.7.0
hbri_enabledefault: no
Description
When enabled, the hub advertises the HBRI extension and lets dual-stack clients prove
reachability on both IPv4 and IPv6. After a client logs in over one protocol, the hub
asks it to open a short-lived secondary connection over the other protocol; on success the
client's INF will carry both an IPv4 (I4) and an IPv6 (I6) address, so users behind either
protocol can connect to each other.
This requires the hub to be reachable on both IPv4 and IPv6 and both hbri_address4 and
hbri_address6 to be configured. If either is empty, HBRI is not advertised.
Type
boolean
Default
no
Since
uhub 0.7.0
hbri_address4default: ""
Description
The public IPv4 address clients should connect to for HBRI secondary-protocol validation.
Must be an address the hub actually listens on (it shares server_port). Leave empty to
disable HBRI.
Type
String
Default
""
Since
uhub 0.7.0
Example
hbri_address4 = "192.0.2.10"
hbri_address6default: ""
Description
The public IPv6 address clients should connect to for HBRI secondary-protocol validation.
Must be an address the hub actually listens on (it shares server_port). Leave empty to
disable HBRI.
Type
String
Default
""
Since
uhub 0.7.0
Example
hbri_address6 = "2001:db8::10"
Files & buffers
max_recv_bufferdefault: 4096
Description
Maximum receive buffer allowed before commands are processed. If a single ADC message exceeds this limit, it will be discarded by the hub. Capped at MAX_RECV_BUF (65535), the size of the per-thread receive buffer the hub reads into.
Type
number (1024–65535)
Default
4096
Since
uhub 0.1.3
max_send_bufferdefault: 131072
Description
Maximum amount of bytes allowed to be queued for sending to any particular user before the hub will disconnect the user. The lower the limit, the more aggressive the hub will be to disconnect slow clients. Use with caution.
Type
number ≥ 2048
Default
131072
Since
uhub 0.1.3
max_send_buffer_softdefault: 98304
Description
Same as max_send_buffer, however low priority messages may be discarded if this limit is reached. Use with caution.
Type
number ≥ 1024
Default
98304
Since
uhub 0.1.3
max_chat_historydefault: 20
Description
This specifies the number of main chat messages that are kept in the history buffer.
Users can use the "!history" command to list these messages.
Type
number (0–250)
Default
20
Since
uhub 0.3.0
max_logout_logdefault: 20
Description
Operators can use the "!log" command to list users who have recently left the hub.
This option specifies the maximum size of this log.
Type
number (0–2000)
Default
20
Since
uhub 0.3.0
file_acldefault: ""
Description
This is an access control list (acl) file.
In this file all registered users, bans, etc should be stored.
If the file is missing, or empty no registered users, or ban records are used.
Type
file
Default
""
Since
uhub 0.1.3
Example
Unix users:
file_acl = "/etc/uhub/users.conf"
Windows users:
file_acl = "c:\uhub\users.conf"
file_pluginsdefault: ""
Description
Plugin configuration file.
Type
file
Default
""
Since
uhub 0.3.3
Example
file_plugins = "/etc/uhub/plugins.conf"
Access control (users.conf)
These directives live in the ACL file (the file_acl path), not in uhub.conf.
user_adminusername:password
Description
An administrator user with full access to configure the hub, plus operator privileges.
Syntax
user_admin username:password
Since
uhub 0.1.2
user_superusername:password
Description
A super user with more privileges than an operator but fewer than an administrator.
Syntax
user_super username:password
Since
uhub 0.2.1
user_opusername:password
Description
An operator who can kick and ban users from the hub.
Syntax
user_op username:password
Since
uhub 0.1.2
user_regusername:password
Description
A registered user with no special privileges, but a password-protected username that can enter registered-only hubs.
Syntax
user_reg username:password
Since
uhub 0.1.2
deny_nickusername
Description
A denied username. Any user identifying with this nickname is denied access.