Configuration directives

General

hub_name = "uhub"
Description:Configures the name of the hub
Syntax:String
Since:µHub 0.1.0
Example:hub_name = "my hub"
hub_description = ""
Description:This is the description of the hub, as seen by users and hub lists
Syntax:String
Since:µHub 0.1.0
Example:hub_description = "a friendly hub for friendly people"
max_users = 500
Description:The maximum amount of users allowed on the hub. No new users will be allowed to enter the hub if the number of users is greater than this.
Operators (and above) are still able to log in.
Syntax:Number > 0
Since:µHub 0.1.0
Example:max_users = 25
show_banner = 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"
Syntax:boolean
Since:µHub 0.1.0
Example:show_banner = no
registered_users_only = 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).
Syntax:boolean
Since:µHub 0.1.1
chat_only = no
Description:If this is enabled the hub will refuse to relay messages for search and connection setup. This effectively makes the hub viable for chat only.
Syntax:boolean
Since:µHub 0.1.1
chat_is_privileged = no
Description:If enabled only operators and admins are allowed to chat in the main chat.
Syntax:boolean
Since:µHub 0.2.4
low_bandwidth_mode = no
Description:If this is enabled the hub will remove excessive information from each client's INF message before broadcasting to all connected users. Things like description, e-mail address will be removed.
Syntax:boolean
Since:µHub 0.2.2
file_motd = "/etc/uhub/motd.txt"
Description:This can be specified as a message of the day file. If a valid file is given here it's content will be sent to all users after they have logged in to the hub. If the file is missing or empty this configuration entry will be ignored.
Syntax:file
Since:µHub 0.1.3
Example:

Unix users:
file_acl = "/etc/uhub/motd.txt"

Windows users:
file_acl = "c:\uhub\motd.txt"

file_acl = "/etc/uhub/users.conf"
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.
Syntax:file
Since:µHub 0.1.3
Example:

Unix users:
file_acl = "/etc/uhub/users.conf"

Windows users:
file_acl = "c:\uhub\users.conf"

server_bind_addr = "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.
Syntax:String, IP address, "any" or "loopback"
Since:µHub 0.1.2
Example:

To listen to a specific IP:server_bind_addr = "192.168.12.69"

To listen to any IP:server_bind_addr = "0.0.0.0"

Or: server_bind_addr = "any"

server_port = 1511
Description:This is specifies the port number the hub should listen on.
Syntax:number > 0 and < 65536
Since:µHub 0.1.0
server_listen_backlog = 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.

Syntax:number > 5
Since:µHub 0.3.0
limit_max_hubs_user = 0
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.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_max_hubs_reg = 0
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.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_max_hubs_op = 0
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.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_max_hubs = 0
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.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_min_hubs_user = 0
Description:Only allow users that are logged into other hubs with guest privileges to enter this hub.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_min_hubs_reg = 0
Description:Only allow users that are logged into other hubs as a registered user to enter this hub.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_min_hubs_op = 0
Description:Only allow users that are logged into other hubs with operator privileges to enter this hub.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_min_share = 0
Description:Minimum share limit in megabytes (MiB). Users sharing less than this will not be allowed to enter the hub.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
Example:

To require users to share at least 1 GB in order to enter the hub:

limit_min_share = 1024
limit_max_share = 0
Description:Maximum share limit in megabytes (MiB). Users sharing more than this will not be allowed to enter the hub.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_min_slots = 0
Description:Minimum number of upload slots required. Users with less than this will not be allowed to enter the hub.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
limit_max_slots = 0
Description:Maximum number of upload slots allowed. Users with more than this will not be allowed to enter the hub.
Syntax:number, 0 = disabled
Since:µHub 0.2.0
tls_certificate =
Description:Path to a TLS/SSL certificate (PEM format).
Syntax:file
Since:µHub 0.3.0
tls_private_key =
Description:Path to a TLS/SSL private key (PEM format).
Syntax:file
Since:µHub 0.3.0
tls_enable = no
Description:Enables/disables TLS/SSL support. tls_certificate and tls_private_key must be set if this is enabled..
Syntax:boolean
Since:µHub 0.3.0
tls_require = yes
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.
Syntax:boolean
Since:µHub 0.3.0

Translation & customization

These directives can be used in the configuration file to give customized or translated messages and error strings.

msg_hub_full = "Hub is full"
Description:This will be sent if the hub is full
Syntax:String
Since:µHub 0.2.0
msg_hub_disabled = "Hub is disabled"
Description:This will be sent if the hub is disabled (hub_enable = no)
Syntax:String
Since:µHub 0.2.0
msg_hub_registered_users_only = "Hub is for registered users only"
Description:This will be sent if the hub is configured to only accept registered users (registered_users_only = yes)
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_missing = "No nickname given"
Description:This is an error message that will be sent to clients that do not provide a nick name
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_multiple = "Multiple nicknames given"
Description:This is an error message that will be sent to clients that provide multiple nick names
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_invalid = "Nickname is invalid"
Description:This is an error message that will be sent to clients that provides an invalid nick name
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_long = "Nickname too long"
Description:This is an error message that will be sent to clients that provides a too long nick name
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_short = "Nickname too short"
Description:This is an error message that will be sent to clients that provides a too short nick name
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_spaces = "Nickname cannot start with spaces"
Description:This is an error message that will be sent to clients that provides a nick name that starts with a space
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_bad_chars = "Nickname contains invalid characters"
Description:This is an error message that will be sent to clients that provides invalid characters in the nick name
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_not_utf8 = "Nickname is not valid utf8"
Description:This is an error message that will be sent to clients that provides a nick name that is not valid utf-8 encoded
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_taken = "Nickname is already in use"
Description:This message will be sent to clients if their provided nick name is alredy in use on the hub.
Syntax:String
Since:µHub 0.2.0
msg_inf_error_nick_restricted = "Nickname cannot be used on this hub"
Description:This message will be sent to clients if they provide a restricted nick name. Restricted nick names can be configured in the acl.
Syntax:String
Since:µHub 0.2.0
msg_inf_error_cid_invalid = "CID is not valid"
Description:This is an error message that will be sent to clients that provides an invalid client ID (CID)
Syntax:String
Since:µHub 0.2.0
msg_inf_error_cid_missing = "CID is not specified"
Description:This is an error message that will be sent to clients that does not provide a client ID (CID)
Syntax:String
Since:µHub 0.2.0
msg_inf_error_cid_taken = "CID is taken"
Description:This is an error message that will be sent to clients that provides a client ID (CID) already in use on the hub.
Syntax:String
Since:µHub 0.2.0
msg_inf_error_pid_missing = "PID is not specified"
Description:This is an error message that will be sent to clients that does not provide a private ID (PID)
Syntax:String
Since:µHub 0.2.0
msg_inf_error_pid_invalid = "PID is invalid"
Description:This is an error message that will be sent to clients that provides an invalid private ID (PID)
Syntax:String
Since:µHub 0.2.0
msg_ban_permanently = "Banned permanently"
Description:This message is sent to users if they are banned (see acl)
Syntax:String
Since:µHub 0.2.0
msg_ban_temporarily = "Banned temporarily"
Description:This message is sent to users if they are banned temporarily
Syntax:String
Since:µHub 0.2.0
msg_auth_invalid_password = "Password is wrong"
Description:This message is sent to users if they provide a wrong password.
Syntax:String
Since:µHub 0.2.0
msg_user_share_size_low = "User is not sharing enough"
Description:This message is sent to users if they are not sharing enough.
Syntax:String
Since:µHub 0.2.0
msg_user_share_size_high = "User is sharing too much"
Description:This message is sent to users if they are sharing too much.
Syntax:String
Since:µHub 0.2.0
msg_user_slots_low = "User have too few upload slots."
Description:This message is sent to users if they do not have enough upload slots.
Syntax:String
Since:µHub 0.2.0
msg_user_slots_high = "User have too many upload slots."
Description:This message is sent to users if they have too many upload slots.
Syntax:String
Since:µHub 0.2.0
msg_user_hub_limit_low = "User is on too few hubs."
Description:This message is sent to users if they are on too few other hubs.
Syntax:String
Since:µHub 0.2.0
msg_user_hub_limit_high = "User is on too many hubs."
Description:This message is sent to users if they are on too many other hubs.
Syntax:String
Since:µHub 0.2.0

Advanced settings

These are advanced settings and should not be used unless you really know what you are doing!

hub_enabled = yes
Description:Use this to disable the hub for a while.
Syntax:boolean
Since:µHub 0.1.3
max_recv_buffer = 4096
Description:Maximum receive buffer allowed before commands are procesed. If a single ADC message exceeds this limit, it will be discarded by the hub. Use with caution.
Syntax:number
max_send_buffer = 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.
Syntax:number
max_send_buffer_soft = 98304
Description:Same as max_send_buffer, however low priority messages may be discarded if this limit is reached. Use with caution.
Syntax:number

ACL file settings

These directives should be used in the access control file. The location of this file must configured using the file_acl directive in the main configuration file.

user_admin = username:password
Description:This specifies an administrator user. An administrator has full access to configure the hub, in addition to operator privileges.
Since:µHub 0.1.2
user_super = username:password
Description:This specifies a super user. A super user has more privileges than an operator, but less than the administrator
Since:µHub 0.2.1
user_op = username:password
Description:This specifies an operator user. An operator can kick and ban users from the hub.
Since:µHub 0.1.2
user_reg = username:password
Description:This specifies a registered user. A registered user has no particular privileges, except the username is protected by password, and the user is able to log in to a hub for registered users only.
Since:µHub 0.1.2
deny_nick = username
Description:This specifies a bad username. Any user identifying with this particular user name is denied access.
Since:µHub 0.1.2
Example:deny_nick Administrator
deny_nick root
deny_nick Hub-Security
ban_nick = username
Description:This specifies a user banned by the nickname. The difference between this and "deny_nick" is the message the user receives when trying to log in.
ban_cid = cid
Description:This specifies a user banned by CID (client ID). The CID is a 39 byte base32-encoded identifier unique to every user.
Since:µHub 0.1.2
Example:ban_cid FOIL5EK2UDZYAXT7UIUFEKL4SEBEAJE3INJDKAY
deny_ip = ip range/mask
Description:This directive allows the hub to deny access to users coming from certain IP addresses. This can be specified as IP-address ranges or IP-addresses with a bitmask.
Since:µHub 0.1.2
Example:

These two are equivalent

deny_ip 192.168.0.1-192.168.0.255
deny_ip 192.168.0.0/24

This works for IPv6 also:

deny_ip ::1/128
nat_ip = ip range/mask
Description:This directive allows users behind the same NAT router as the hub itself to "spoof" their IP addresses in order to provide a public IP for users outside the NAT. The hub will automatically rewrite the IP address for other users on the same NATed network to use the private IP.
Since:µHub 0.2.1
Example:

For instance when the hub is located at IP 192.168.1.1, and a clients at 192.168.1.2 and 192.168.1.3 as well as public IPs on the internet, the following can be used:

nat_ip 192.168.1.0/24

Note: This only works for IPv4