1. DMRHub
  2. Reference
  3. Configuration

Configuration

On this page

This page tells where DMRHub reads its settings, and lists every setting. To install DMRHub, see Install DMRHub.

Where DMRHub reads its settings

DMRHub takes each setting from the first of these sources that has it:

  1. Command-line flags, such as --http.port 8080.
  2. Environment variables, such as HTTP_PORT=8080. See Environment variables.
  3. The configuration file, in YAML.
  4. The Setup settings, which admins save on the Setup page and DMRHub keeps in the database. See Setup settings.
  5. The defaults in the table below.

DMRHub reads one configuration file, and never writes it, so the file can be read-only, such as a Kubernetes ConfigMap. With --config <file> (or -c <file>), it reads that file, and stops with an error when the file does not exist. Without --config, it reads the first of these files that exists:

  1. config.yaml in the working directory
  2. config.yml in the working directory
  3. $XDG_CONFIG_HOME/DMRHub/config.yaml. When XDG_CONFIG_HOME is not set, this is $HOME/.config/DMRHub/config.yaml.
  4. $XDG_CONFIG_HOME/DMRHub/config.yml

With no file, DMRHub uses the flags, the environment, the Setup settings and the defaults.

The setup wizard

DMRHub starts the setup wizard, and opens your browser to it, when its configuration is not valid, when no admin user exists yet, or when it cannot reach its database. See First start and the setup wizard. The wizard:

  1. Fixes the database settings when DMRHub cannot reach its database.
  2. Shows all the settings, and checks them while you type.
  3. Saves the settings that you change in the database.
  4. Makes the first admin user.

When no config file, environment variable or flag sets secret or password-salt, DMRHub makes a strong random value for each at its first start and keeps it in the database. Every later start and every replica uses the same values. A value that the deployment sets wins over the one DMRHub made. Do not change password-salt after users exist: their passwords stop working.

When DMRHub cannot reach its database, the wizard lets you fix the database settings. DMRHub tries the new settings at once. When they work, it keeps them in dmrhub-database.json in its working directory, which is where the default SQLite database lives too, readable by its owner only, and uses that file at each start. It cannot keep them in the database that it could not reach. Once this file exists, or the default SQLite file has a user, the wizard cannot change the database again. When DMRHub cannot reach that database at a later start, fix the database in the config file, the environment or the flags, then restart DMRHub. DMRHub uses this file only when the config file, the environment and the flags set no database setting. When the deployment sets any database setting, or the working directory is read-only, such as on a Kubernetes mount, the wizard cannot fix the database: set it in the config file or the environment of the deployment.

The Setup page

Admins can change the settings on the Setup page (<siteurl>/admin/setup). A menu on the left has one tab for each area, in four groups:

  • Server: General, HTTP, Database, Redis, SMTP and Metrics and PProf
  • Users: Accounts. See Users.
  • DMR: DMR and MMDVM, IPSC, OpenBridge, WebTransport, Modem, Transcoding, IP lists and Routing (see Routing settings)
  • Features: Positions and APRS, Messages, Plugins and Private call routing

Each tab has its own link, such as <siteurl>/admin/setup#ipsc, and its own Save and Reset buttons at the bottom. Save checks and saves only the settings on that tab. A dot in the menu marks a tab with changes that are not saved yet.

Next to each setting, a chip shows where its value comes from: Default, Saved in Setup, Config file, Environment with the name of the variable, or Command line with the name of the flag. A setting that is saved in Setup and differs from its default has a Use the default link.

The Setup page under Admin

Setup settings

The Setup page changes most settings while DMRHub runs. DMRHub saves them in the database, and every replica puts them into effect at once, without a restart. For example, the MMDVM, IPSC and OpenBridge servers and the modem start, stop, or restart with their new settings. If a server cannot take its new settings, for example because the new port is in use, it keeps its old settings, and the page shows the replicas that could not put the save into effect.

A setting that the config file, an environment variable or a flag sets is locked. It wins at each start, and the Setup page shows it as set by the deployment, with a lock, and cannot change it. A list, such as dmr.transcoding.ambe-servers, is locked as a whole. When you remove a locked setting from the config file or the environment, the value saved on the Setup page comes back at the next start, or the default when no value was saved.

These settings take effect at start only. They come from the config file, the environment and the flags only, and DMRHub never keeps them in the database:

  • secret, password-salt, hibp-api-key and the passwords of SMTP, the database and Redis (DMRHub makes secret and password-salt when no deployment sets them; see The setup wizard)
  • database.* and redis.*
  • http.bind, http.port, http.trusted-proxies and http.cors.*
  • metrics.* and pprof.*
  • dmr.plugins.enabled, dmr.plugins.bind, dmr.plugins.port, dmr.plugins.cert-file and dmr.plugins.key-file

When replicas run with different config files or environments, each one runs with its own locked values. The Setup page shows the settings in which the replicas disagree, and the replicas that could not put a save into effect.

Upgrade from a version that wrote the config file

Earlier versions wrote the settings of the Setup page, with the secrets, to $XDG_CONFIG_HOME/DMRHub/config.yaml. At the first start after the upgrade, DMRHub copies the Setup settings of that file to the database, but only when that file is the config file it loads. It copies no setting that the environment or a flag overrides, and no value that is equal to its default. You can then remove those settings from the file and change them on the Setup page. The secrets and the other settings that take effect at start only must stay in the file or move to the environment.

DMRHub copies nothing when it loads another file, such as ./config.yaml. In that case, earlier versions still wrote the Setup page to $XDG_CONFIG_HOME/DMRHub/config.yaml, but the hub never ran with that file, so its values can be old or wrong.

Configuration reference

The table lists every setting with its YAML key, its type, its default, its environment variable and its flag. A sample file with every setting and its default is config.example.yaml. The table and the sample file come from the code: the configulator tool makes them from the tags of internal/config, and CI checks that they are current.

Key Type Default Environment Flag Description
log-level string info LOG_LEVEL --log-level Logging level for the application. One of debug, info, warn, or error
redis.enabled boolean false REDIS_ENABLED --redis.enabled Enable Redis support
redis.host string REDIS_HOST --redis.host Redis host address
redis.port integer 6379 REDIS_PORT --redis.port Redis port
redis.password string REDIS_PASSWORD --redis.password Redis password
database.driver string sqlite DATABASE_DRIVER --database.driver Database driver to use. One of sqlite, postgres, or mysql
database.database string DMRHub.db DATABASE_DATABASE --database.database Database name or path
database.host string DATABASE_HOST --database.host Database host address (postgres and mysql only)
database.port integer DATABASE_PORT --database.port Database port (postgres and mysql only)
database.username string DATABASE_USERNAME --database.username Database username (postgres and mysql only)
database.password string DATABASE_PASSWORD --database.password Database password (postgres and mysql only)
database.extra-parameters list of string _pragma=foreign_keys(1),_pragma=journal_mode(WAL),_pragma=synchronous(NORMAL) DATABASE_EXTRA_PARAMETERS --database.extra-parameters Additional parameters for the database connection, e.g., sslmode=disable
secret string SECRET --secret Secret key for the application, used for signing and encryption of the user session. Required; use a random value of at least 15 characters
password-salt string PASSWORD_SALT --password-salt Salt used for hashing user passwords. Required; use a random value of at least 15 characters, different from secret
http.bind string [::] HTTP_BIND --http.bind HTTP server listen address
http.port integer 3005 HTTP_PORT --http.port HTTP server port
http.robots-txt.mode string disabled HTTP_ROBOTS_TXT_MODE --http.robots-txt.mode Mode for serving robots.txt. One of allow, disabled, or custom
http.robots-txt.content string HTTP_ROBOTS_TXT_CONTENT --http.robots-txt.content Content of the robots.txt file when mode is custom
http.cors.enabled boolean false HTTP_CORS_ENABLED --http.cors.enabled Enable CORS support for the HTTP server
http.cors.extra-hosts list of string HTTP_CORS_EXTRA_HOSTS --http.cors.extra-hosts List of additional allowed CORS origins
http.trusted-proxies list of string HTTP_TRUSTED_PROXIES --http.trusted-proxies List of trusted proxy IPs for the HTTP server
http.canonical-host string HTTP_CANONICAL_HOST --http.canonical-host URL the HTTP server is reached at, used for generating absolute URLs, e.g. https://dmrhub.example.com. Required
http.session-length string 720h HTTP_SESSION_LENGTH --http.session-length How long a login lasts, such as 720h. A shorter length also ends the older logins. 0 is 720h
dmr.mmdvm.bind string [::] DMR_MMDVM_BIND --dmr.mmdvm.bind MMDVM server listen address
dmr.mmdvm.port integer 62031 DMR_MMDVM_PORT --dmr.mmdvm.port MMDVM server port
dmr.mmdvm.webtransport.enabled boolean false DMR_MMDVM_WEBTRANSPORT_ENABLED --dmr.mmdvm.webtransport.enabled Accept browser hotspots and radios over WebTransport
dmr.mmdvm.webtransport.port integer 62032 DMR_MMDVM_WEBTRANSPORT_PORT --dmr.mmdvm.webtransport.port UDP port of the WebTransport listener
dmr.mmdvm.webtransport.cert-file string DMR_MMDVM_WEBTRANSPORT_CERT_FILE --dmr.mmdvm.webtransport.cert-file TLS certificate file, such as the one that cert-manager mounts. Empty makes DMRHub use short-lived certificates of its own, which browsers accept through the hashes that DMRHub publishes
dmr.mmdvm.webtransport.key-file string DMR_MMDVM_WEBTRANSPORT_KEY_FILE --dmr.mmdvm.webtransport.key-file TLS key file of the certificate file
dmr.mmdvm.webtransport.allowed-origins list of string DMR_MMDVM_WEBTRANSPORT_ALLOWED_ORIGINS --dmr.mmdvm.webtransport.allowed-origins Origins of the web pages that may open a session, such as https://radio.example. Empty allows every origin
dmr.openbridge.enabled boolean false DMR_OPENBRIDGE_ENABLED --dmr.openbridge.enabled Enable OpenBridge server support
dmr.openbridge.bind string [::] DMR_OPENBRIDGE_BIND --dmr.openbridge.bind OpenBridge server listen address
dmr.openbridge.port integer 62035 DMR_OPENBRIDGE_PORT --dmr.openbridge.port OpenBridge server port
dmr.openbridge.server-id integer DMR_OPENBRIDGE_SERVER_ID --dmr.openbridge.server-id Server ID of 4 to 7 digits that DMRHub sends to enhanced (FreeDMR) OpenBridge peers as the source server. 0 sends the network ID of each peer
dmr.ipsc.enabled boolean false DMR_IPSC_ENABLED --dmr.ipsc.enabled Enable IPSC server support
dmr.ipsc.bind string [::] DMR_IPSC_BIND --dmr.ipsc.bind IPSC server listen address
dmr.ipsc.port integer 50000 DMR_IPSC_PORT --dmr.ipsc.port IPSC server port
dmr.ipsc.network-id integer DMR_IPSC_NETWORK_ID --dmr.ipsc.network-id DMR network ID that identifies this server to IPSC peers. Required when IPSC is enabled
dmr.ipsc.call-hang-hold string 2.5s DMR_IPSC_CALL_HANG_HOLD --dmr.ipsc.call-hang-hold Wait for data and CSBK calls to IPSC after a voice call on a slot; 0 is off
dmr.ipsc.data-hang-hold string 1.2s DMR_IPSC_DATA_HANG_HOLD --dmr.ipsc.data-hang-hold Wait for data and CSBK calls to IPSC after a data call on a slot; 0 is off
dmr.modem.enabled boolean false DMR_MODEM_ENABLED --dmr.modem.enabled Drive an MMDVM modem board (MMDVM_HS hat, MMDVM repeater board, DVMega) on a serial port as a hotspot or repeater of this server
dmr.modem.port string DMR_MODEM_PORT --dmr.modem.port Serial device of the modem, such as /dev/ttyAMA0 or /dev/ttyACM0. Required when the modem is enabled
dmr.modem.baud integer 115200 DMR_MODEM_BAUD --dmr.modem.baud Speed of the serial port in baud: 9600, 19200, 38400, 57600, 115200, 230400, 460800 or 921600
dmr.modem.repeater-id integer DMR_MODEM_REPEATER_ID --dmr.modem.repeater-id ID of the repeater that the modem is on the network. DMRHub makes it a modem repeater when the modem connects, and refuses network logins with its ID. A repeater that does not exist is made with no owner, and an admin assigns its owner. Required when the modem is enabled
dmr.modem.duplex boolean false DMR_MODEM_DUPLEX --dmr.modem.duplex Run the modem as a duplex repeater with two timeslots. Off runs it as a simplex hotspot, whose one channel is timeslot 2
dmr.modem.color-code integer 1 DMR_MODEM_COLOR_CODE --dmr.modem.color-code Color code of the modem, 0 to 15
dmr.modem.rx-frequency integer DMR_MODEM_RX_FREQUENCY --dmr.modem.rx-frequency Receive frequency in Hz. Required when the modem is enabled
dmr.modem.tx-frequency integer DMR_MODEM_TX_FREQUENCY --dmr.modem.tx-frequency Transmit frequency in Hz. Required when the modem is enabled
dmr.modem.rx-offset integer 0 DMR_MODEM_RX_OFFSET --dmr.modem.rx-offset Correction in Hz added to the receive frequency, for the frequency error of the board
dmr.modem.tx-offset integer 0 DMR_MODEM_TX_OFFSET --dmr.modem.tx-offset Correction in Hz added to the transmit frequency, for the frequency error of the board
dmr.modem.rf-level number 100 DMR_MODEM_RF_LEVEL --dmr.modem.rf-level Transmit power in percent, on boards that set it, such as MMDVM_HS hats
dmr.modem.rx-level number 50 DMR_MODEM_RX_LEVEL --dmr.modem.rx-level Receive audio level in percent
dmr.modem.tx-level number 50 DMR_MODEM_TX_LEVEL --dmr.modem.tx-level Transmit deviation level in percent
dmr.modem.rx-dc-offset integer 0 DMR_MODEM_RX_DC_OFFSET --dmr.modem.rx-dc-offset Receive DC offset, -128 to 127
dmr.modem.tx-dc-offset integer 0 DMR_MODEM_TX_DC_OFFSET --dmr.modem.tx-dc-offset Transmit DC offset, -128 to 127
dmr.modem.rx-invert boolean false DMR_MODEM_RX_INVERT --dmr.modem.rx-invert Invert the receive audio
dmr.modem.tx-invert boolean true DMR_MODEM_TX_INVERT --dmr.modem.tx-invert Invert the transmit audio, which most boards need
dmr.modem.ptt-invert boolean false DMR_MODEM_PTT_INVERT --dmr.modem.ptt-invert Invert the PTT output
dmr.modem.tx-delay integer 100 DMR_MODEM_TX_DELAY --dmr.modem.tx-delay Time in milliseconds, 0 to 500, that the transmitter is on before the first burst
dmr.modem.dmr-delay integer 0 DMR_MODEM_DMR_DELAY --dmr.modem.dmr-delay Delay of the duplex receiver in symbols, 0 to 255
dmr.modem.debug boolean false DMR_MODEM_DEBUG --dmr.modem.debug Ask the modem for its debug messages and log them
dmr.modem.rssi-mapping-file string DMR_MODEM_RSSI_MAPPING_FILE --dmr.modem.rssi-mapping-file Path to an RSSI.dat file in the MMDVMHost format, which maps the raw RSSI of the board to dBm. Without it the RSSI of modem calls is not known
dmr.modem.cw-id.enabled boolean false DMR_MODEM_CW_ID_ENABLED --dmr.modem.cw-id.enabled Send a morse station ID while the channel is idle
dmr.modem.cw-id.time integer 10 DMR_MODEM_CW_ID_TIME --dmr.modem.cw-id.time Minutes between station IDs, 1 to 1440. The first goes out a quarter of this time after the modem connects or the channel goes idle
dmr.modem.cw-id.callsign string DMR_MODEM_CW_ID_CALLSIGN --dmr.modem.cw-id.callsign Callsign to send in morse: letters, digits, spaces and / ? , - = . Required when the station ID is on
dmr.modem.beacons.enabled boolean false DMR_MODEM_BEACONS_ENABLED --dmr.modem.beacons.enabled Key up the transmitter of a duplex modem at each interval while the channel is idle
dmr.modem.beacons.interval integer 60 DMR_MODEM_BEACONS_INTERVAL --dmr.modem.beacons.interval Seconds between beacons, 1 to 86400
dmr.modem.beacons.duration integer 3 DMR_MODEM_BEACONS_DURATION --dmr.modem.beacons.duration Seconds that each beacon keys up, at least 1 and less than the interval
dmr.disable-radio-id-validation boolean false DMR_DISABLE_RADIO_ID_VALIDATION --dmr.disable-radio-id-validation Turn off all the RadioID checks of radio-id-checks, whatever they are set to
dmr.radio-id-checks.user-id boolean true DMR_RADIO_ID_CHECKS_USER_ID --dmr.radio-id-checks.user-id Refuse a registration whose DMR ID does not have 7 digits
dmr.radio-id-checks.callsign boolean true DMR_RADIO_ID_CHECKS_CALLSIGN --dmr.radio-id-checks.callsign Refuse a registration or a callsign change whose callsign RadioID does not list under the DMR ID of the account, and list on the RadioID drift page the accounts whose callsign RadioID no longer lists
dmr.radio-id-checks.radio-ids boolean true DMR_RADIO_ID_CHECKS_RADIO_IDS --dmr.radio-id-checks.radio-ids Refuse an added radio ID that RadioID does not list under the callsign of the user, and list on the RadioID drift page the added radio IDs that RadioID no longer lists under it
dmr.radio-id-checks.repeater-ids boolean true DMR_RADIO_ID_CHECKS_REPEATER_IDS --dmr.radio-id-checks.repeater-ids Refuse a 6-digit repeater ID that RadioID does not list under the callsign of its owner, and fill in the details of the repeater from RadioID
dmr.radio-id-checks.hotspot-ids boolean true DMR_RADIO_ID_CHECKS_HOTSPOT_IDS --dmr.radio-id-checks.hotspot-ids Refuse a 9-digit hotspot ID that does not start with the DMR ID of its owner
dmr.radio-id-url string https://www.radioid.net/static/users.json DMR_RADIO_ID_URL --dmr.radio-id-url URL to fetch radio ID information for validation and display purposes. Expected JSON format is the same as RadioID.net.
dmr.repeater-id-url string https://www.radioid.net/static/rptrs.json DMR_REPEATER_ID_URL --dmr.repeater-id-url URL to fetch repeater information for validation and display purposes. Expected JSON format is the same as RadioID.net.
dmr.public-address string DMR_PUBLIC_ADDRESS --dmr.public-address Host name or IP address that hotspots and repeaters connect to, as the enroll page shows it, such as dmr.example.org. Empty uses the host name of the canonical host of the HTTP server
dmr.retention.messages integer 0 DMR_RETENTION_MESSAGES --dmr.retention.messages Days to keep text and data messages, with their raw bytes. 0 keeps them forever
dmr.retention.transmissions integer 0 DMR_RETENTION_TRANSMISSIONS --dmr.retention.transmissions Days to keep the last heard entries of voice, data and control traffic. 0 keeps them forever
dmr.retention.bursts integer 0 DMR_RETENTION_BURSTS --dmr.retention.bursts Days to keep the raw DMR bursts of each transmission. 0 keeps them forever
dmr.messages.hold-days integer 7 DMR_MESSAGES_HOLD_DAYS --dmr.messages.hold-days Days that store and forward keeps a text for a radio that is off the air. 0 is 7
dmr.messages.hold-max integer 50 DMR_MESSAGES_HOLD_MAX --dmr.messages.hold-max Most texts that store and forward keeps for one user. 0 is 50
dmr.positions.min-interval integer 5 DMR_POSITIONS_MIN_INTERVAL --dmr.positions.min-interval Shortest report interval, in minutes, that an owner can pick for a radio: 5, 10, 15, 30 or 60
dmr.positions.max-retention integer 30 DMR_POSITIONS_MAX_RETENTION --dmr.positions.max-retention Longest time, in days, that an owner can keep the positions of a radio, from 1 to 365
dmr.positions.aprs-is.callsign string DMR_POSITIONS_APRS_IS_CALLSIGN --dmr.positions.aprs-is.callsign Callsign with SSID that the hub logs in to APRS-IS as. Empty sends nothing to APRS-IS
dmr.positions.aprs-is.server string rotate.aprs2.net:14580 DMR_POSITIONS_APRS_IS_SERVER --dmr.positions.aprs-is.server APRS-IS server, as host:port
dmr.plugins.in-process boolean true DMR_PLUGINS_IN_PROCESS --dmr.plugins.in-process Run the parrot, the location server and the uploaded plugins inside DMRHub. Turn it off only when every plugin runs as its own program
dmr.plugins.enabled boolean false DMR_PLUGINS_ENABLED --dmr.plugins.enabled Accept plugins that run as their own programs
dmr.plugins.bind string [::] DMR_PLUGINS_BIND --dmr.plugins.bind Address the plugin listener binds to
dmr.plugins.port integer 3006 DMR_PLUGINS_PORT --dmr.plugins.port TCP port that plugins connect to
dmr.plugins.cert-file string DMR_PLUGINS_CERT_FILE --dmr.plugins.cert-file TLS certificate file of the plugin listener. Empty makes DMRHub use a certificate of its own, which plugins check by its fingerprint
dmr.plugins.key-file string DMR_PLUGINS_KEY_FILE --dmr.plugins.key-file TLS key file of the certificate file
dmr.transcoding.ambe-servers list of objects — — AMBE servers (AMBEserver protocol, usually UDP port 2460) that convert calls between Codec2 and AMBE, in the order a call tries them. Each converted call holds one server for its whole length. None turns transcoding off, and calls pass through in their own codec. Each server must accept the setting that makes it report the decoder status of each frame (PKT_SPCHFMT); a server that refuses it converts no call
dmr.transcoding.ambe-servers[].address string — — Host and UDP port of the AMBE server, such as ambeserver:2460
dmr.transcoding.ambe-servers[].calls integer — — Calls the server converts at once. 0 is no limit; use 1 for an AMBE server with one chip, which answers only its last client
dmr.private-calls.voice.reach string hybrid DMR_PRIVATE_CALLS_VOICE_REACH --dmr.private-calls.voice.reach Radios that private traffic reaches. One of hybrid (any radio heard on a repeater of this network; a radio ID that a user owns counts only where that user owns the repeater or an admin trusts it), members (only the radio IDs that users own, on the repeaters of their owner or trusted ones), or anyone (any radio, wherever it was last heard)
dmr.private-calls.voice.unknown string drop DMR_PRIVATE_CALLS_VOICE_UNKNOWN --dmr.private-calls.voice.unknown What happens to private traffic to a radio that the reach allows but that DMRHub has not heard, or not within the max age. One of drop (drop it and log it) or flood (send it to every repeater)
dmr.private-calls.voice.max-age string 0s DMR_PRIVATE_CALLS_VOICE_MAX_AGE --dmr.private-calls.voice.max-age Longest time since a radio was last heard on a repeater that private traffic still goes there, such as 24h. 0 is no limit
dmr.private-calls.data.reach string DMR_PRIVATE_CALLS_DATA_REACH --dmr.private-calls.data.reach Radios that private SMS and data reach, as for voice. Empty takes the voice reach
dmr.private-calls.data.unknown string DMR_PRIVATE_CALLS_DATA_UNKNOWN --dmr.private-calls.data.unknown What happens to private SMS and data to a radio that DMRHub has not heard, as for voice. Empty takes the voice setting
dmr.private-calls.data.max-age string 0s DMR_PRIVATE_CALLS_DATA_MAX_AGE --dmr.private-calls.data.max-age Longest time since a radio was last heard that private SMS and data still go there. 0 takes the voice max age; a negative value, such as -1s, is no limit
dmr.ip-lists.mmdvm.mode string off DMR_IP_LISTS_MMDVM_MODE --dmr.ip-lists.mmdvm.mode Which list applies. One of off (accept every address), block (refuse the addresses of the block list) or allow (refuse every address but those of the allow list)
dmr.ip-lists.mmdvm.block list of string DMR_IP_LISTS_MMDVM_BLOCK --dmr.ip-lists.mmdvm.block Addresses and CIDR ranges, IPv4 or IPv6, such as 203.0.113.7 or 2001:db8::/32, that the block mode refuses
dmr.ip-lists.mmdvm.allow list of string DMR_IP_LISTS_MMDVM_ALLOW --dmr.ip-lists.mmdvm.allow Addresses and CIDR ranges, IPv4 or IPv6, that the allow mode accepts
dmr.ip-lists.webtransport.mode string off DMR_IP_LISTS_WEBTRANSPORT_MODE --dmr.ip-lists.webtransport.mode Which list applies. One of off (accept every address), block (refuse the addresses of the block list) or allow (refuse every address but those of the allow list)
dmr.ip-lists.webtransport.block list of string DMR_IP_LISTS_WEBTRANSPORT_BLOCK --dmr.ip-lists.webtransport.block Addresses and CIDR ranges, IPv4 or IPv6, such as 203.0.113.7 or 2001:db8::/32, that the block mode refuses
dmr.ip-lists.webtransport.allow list of string DMR_IP_LISTS_WEBTRANSPORT_ALLOW --dmr.ip-lists.webtransport.allow Addresses and CIDR ranges, IPv4 or IPv6, that the allow mode accepts
dmr.ip-lists.ipsc.mode string off DMR_IP_LISTS_IPSC_MODE --dmr.ip-lists.ipsc.mode Which list applies. One of off (accept every address), block (refuse the addresses of the block list) or allow (refuse every address but those of the allow list)
dmr.ip-lists.ipsc.block list of string DMR_IP_LISTS_IPSC_BLOCK --dmr.ip-lists.ipsc.block Addresses and CIDR ranges, IPv4 or IPv6, such as 203.0.113.7 or 2001:db8::/32, that the block mode refuses
dmr.ip-lists.ipsc.allow list of string DMR_IP_LISTS_IPSC_ALLOW --dmr.ip-lists.ipsc.allow Addresses and CIDR ranges, IPv4 or IPv6, that the allow mode accepts
dmr.ip-lists.openbridge.mode string off DMR_IP_LISTS_OPENBRIDGE_MODE --dmr.ip-lists.openbridge.mode Which list applies. One of off (accept every address), block (refuse the addresses of the block list) or allow (refuse every address but those of the allow list)
dmr.ip-lists.openbridge.block list of string DMR_IP_LISTS_OPENBRIDGE_BLOCK --dmr.ip-lists.openbridge.block Addresses and CIDR ranges, IPv4 or IPv6, such as 203.0.113.7 or 2001:db8::/32, that the block mode refuses
dmr.ip-lists.openbridge.allow list of string DMR_IP_LISTS_OPENBRIDGE_ALLOW --dmr.ip-lists.openbridge.allow Addresses and CIDR ranges, IPv4 or IPv6, that the allow mode accepts
dmr.routing.disable-dynamic-links boolean false DMR_ROUTING_DISABLE_DYNAMIC_LINKS --dmr.routing.disable-dynamic-links Do not link a talkgroup as the dynamic talkgroup of a timeslot when someone transmits on it or a hotspot dials it. Calls still reach the repeaters that carry the talkgroup
dmr.routing.dynamic-timeout string 15m DMR_ROUTING_DYNAMIC_TIMEOUT --dmr.routing.dynamic-timeout Time with no transmission from a repeater on its dynamic talkgroup after which DMRHub unlinks it from that timeslot, such as 15m. 0 never unlinks it
dmr.routing.auto-create-talkgroups boolean false DMR_ROUTING_AUTO_CREATE_TALKGROUPS --dmr.routing.auto-create-talkgroups Make a talkgroup when a repeater or hotspot of this network sends a group voice call to an ID that is not a talkgroup, rather than drop the call
dmr.routing.ephemeral-talkgroups boolean false DMR_ROUTING_EPHEMERAL_TALKGROUPS --dmr.routing.ephemeral-talkgroups Delete a talkgroup that DMRHub made by itself when no call is made on it for the ephemeral TTL. A talkgroup that an admin edits is kept
dmr.routing.ephemeral-ttl string 24h DMR_ROUTING_EPHEMERAL_TTL --dmr.routing.ephemeral-ttl Time with no call on a talkgroup that DMRHub made by itself after which it deletes the talkgroup, when ephemeral talkgroups are on, such as 24h
dmr.routing.transmit string any DMR_ROUTING_TRANSMIT --dmr.routing.transmit Radios that may transmit through the repeaters and hotspots of this network. One of any (any radio ID), radioid (the radio IDs that the RadioID list has) or members (the DMR IDs of accounts and the radio IDs that their users added)
dmr.routing.max-transmission string 0s DMR_ROUTING_MAX_TRANSMISSION --dmr.routing.max-transmission Longest voice transmission that DMRHub routes, such as 3m. DMRHub drops the rest of a longer one. 0 is no limit
dmr.routing.on-air-unlock string 24h DMR_ROUTING_ON_AIR_UNLOCK --dmr.routing.on-air-unlock How long a right on-air code unlocks a radio ID on the repeater or hotspot timeslot that it came through, such as 24h. Users who turn the on-air code on in Settings unlock their radio IDs with a private call to 9 and the 6 digits of the code
dmr.routing.contention string mix DMR_ROUTING_CONTENTION --dmr.routing.contention What a repeater gets when two group calls reach the same timeslot of it at once, such as two radios on one talkgroup. One of mix (both calls, their bursts interleaved) or first (the first call holds the timeslot until it ends, and DMRHub drops the other call there)
dmr.routing.local-talkgroups list of integer 8,9 DMR_ROUTING_LOCAL_TALKGROUPS --dmr.routing.local-talkgroups Talkgroup numbers that users can make local groups on. A group call to one of them goes only to the other repeaters of the local group of the repeater on that number and timeslot, and never to a network talkgroup or an OpenBridge peer. On a repeater in no such group, the call goes nowhere
dmr.routing.spoken-refusals boolean false DMR_ROUTING_SPOKEN_REFUSALS --dmr.routing.spoken-refusals Answer a voice transmission that DMRHub refuses from a repeater, hotspot or the browser radio with a short spoken prompt, such as Talkgroup not found, as a private call to the radio about 1 second after it stops transmitting
dmr.routing.prompt-service-id integer 9999 DMR_ROUTING_PROMPT_SERVICE_ID --dmr.routing.prompt-service-id DMR ID that the spoken prompts come from, as the source of their private calls
dmr.routing.prompt-voice string kitten-mini-luna DMR_ROUTING_PROMPT_VOICE --dmr.routing.prompt-voice Voice of the spoken prompts for users who did not pick their own voice in Settings
dmr.repeater-quota integer 100 DMR_REPEATER_QUOTA --dmr.repeater-quota Most repeaters and hotspots that a user can add. Admins have no limit. 0 is no limit
dmr.drain-timeout integer 25 DMR_DRAIN_TIMEOUT --dmr.drain-timeout Longest time, in seconds, that a replica that stops keeps serving its repeaters, peers, browser radios and plugins while other replicas take them over. It must be shorter than the time the orchestrator gives the replica to stop. 0 stops at once
smtp.enabled boolean false SMTP_ENABLED --smtp.enabled Enable SMTP support for sending emails
smtp.host string SMTP_HOST --smtp.host SMTP server host address
smtp.port integer 25 SMTP_PORT --smtp.port SMTP server port
smtp.tls string none SMTP_TLS --smtp.tls SMTP TLS mode. One of none, starttls, or implicit
smtp.username string SMTP_USERNAME --smtp.username SMTP server username
smtp.password string SMTP_PASSWORD --smtp.password SMTP server password
smtp.from string SMTP_FROM --smtp.from Email address to use as the sender
smtp.auth-method string none SMTP_AUTH_METHOD --smtp.auth-method SMTP authentication method. One of none, plain, or login
network-name string DMRHub NETWORK_NAME --network-name Name of the DMR network, shown in the web interface
metrics.enabled boolean false METRICS_ENABLED --metrics.enabled Enable metrics collection and export
metrics.bind string [::] METRICS_BIND --metrics.bind Metrics server listen address
metrics.port integer 9000 METRICS_PORT --metrics.port Metrics server port
metrics.trusted-proxies list of string METRICS_TRUSTED_PROXIES --metrics.trusted-proxies List of trusted proxy IPs for the metrics server
metrics.otlp-endpoint string METRICS_OTLP_ENDPOINT --metrics.otlp-endpoint OTLP endpoint for exporting OpenTelemetry tracing data
pprof.enabled boolean false PPROF_ENABLED --pprof.enabled Enable PProf profiling and debugging support
pprof.bind string [::] PPROF_BIND --pprof.bind PProf server listen address
pprof.trusted-proxies list of string PPROF_TRUSTED_PROXIES --pprof.trusted-proxies List of trusted proxy IPs for the PProf server
pprof.port integer 6060 PPROF_PORT --pprof.port PProf server port
hibp-api-key string HIBP_API_KEY --hibp-api-key API key for the Have I Been Pwned service, used for checking if passwords have been compromised
auto-approve-users boolean AUTO_APPROVE_USERS --auto-approve-users Approve new users when they register, so they can log in at once without waiting for an admin
registration string open REGISTRATION --registration Who can register. One of open (anyone), invite (only a person with an invite from an admin) or closed (nobody). The first admin can register in any mode
visibility string public VISIBILITY --visibility What visitors who are not logged in see. One of public (the last heard calls, talkgroups, nets and RadioID details), login (nothing until they log in) or hide-names (the same as public, without the names and positions of the radios)
login-backoff boolean true LOGIN_BACKOFF --login-backoff Refuse the logins of an account for up to 15 minutes after 10 failed logins of it in 15 minutes
listen.listeners integer 200 LISTEN_LISTENERS --listen.listeners Most listeners at once on each server. 0 turns the monitor off
listen.per-address integer 4 LISTEN_PER_ADDRESS --listen.per-address Most listeners at once from one IP address on each server. 0 is no limit

Required settings

DMRHub needs these settings. DMRHub makes secret and password-salt when no deployment sets them, and the setup wizard asks for http.canonical-host.

Setting What it is
secret A random value that DMRHub uses to sign the sessions. Use 15 or more random characters.
password-salt A random value that DMRHub uses to hash the passwords. Use 15 or more random characters, and a value that is not the same as secret. If you change it, no user can log in with their old password.
http.canonical-host The address where users open DMRHub, such as https://dmrhub.example.com. DMRHub uses it in links, for example in emails.

DMRHub checks only that secret and password-salt are not empty. It does not check their length.

Database

SQLite

SQLite is the default, and needs no other settings. The database file is DMRHub.db in the working directory. Set database.database to a full path to put it in another place, for example /data/DMRHub.db.

The default database.extra-parameters set the SQLite options foreign_keys(1), journal_mode(WAL) and synchronous(NORMAL). When you set your own parameters for SQLite, DMRHub adds _pragma=synchronous(NORMAL) when none of your parameters sets synchronous, and adds _txlock=immediate when none of them sets _txlock or cache=shared.

PostgreSQL

database:
  driver: postgres
  host: postgres.example.com
  port: 5432
  username: dmrhub
  password: <password>
  database: dmrhub
  extra-parameters: []

Set extra-parameters to PostgreSQL parameters, such as sslmode=disable, or to []. DMRHub adds each parameter to the connection string. It leaves out the SQLite parameters that start with _pragma=, such as those of the default, so the default works too. With environment variables, set DATABASE_EXTRA_PARAMETERS= (empty) for no parameters.

To make the database:

CREATE USER dmrhub WITH ENCRYPTED PASSWORD '<password>';
CREATE DATABASE dmrhub OWNER dmrhub;
\c dmrhub
GRANT ALL ON SCHEMA public TO dmrhub;

MySQL and MariaDB

MySQL and MariaDB both use the mysql driver.

database:
  driver: mysql
  host: mysql.example.com
  port: 3306
  username: dmrhub
  password: <password>
  database: dmrhub
  extra-parameters: []

To make the database:

CREATE DATABASE dmrhub CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'dmrhub'@'%' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON dmrhub.* TO 'dmrhub'@'%';

Notes:

  • DMRHub connects with charset=utf8mb4&parseTime=True&loc=Local, and adds each of extra-parameters with &, for example tls=true. It leaves out the SQLite parameters that start with _pragma=, such as those of the default.
  • DMRHub makes its tables with the utf8mb4_bin collation, so that names compare by their bytes as on PostgreSQL and SQLite. The first time this version starts, it changes every table of the database that has another collation to utf8mb4_bin.
  • DMRHub sets the session sql_mode to ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION. This is the MySQL 8.4 default without NO_ZERO_DATE and NO_ZERO_IN_DATE, because DMRHub stores unset times as 0000-00-00. If you set sql_mode in extra-parameters, DMRHub uses yours, and it must allow zero dates.
  • loc=Local stores times in the time zone of the DMRHub process. Run every replica in the same time zone.
  • MySQL has no partial indexes. To allow one active net per talkgroup, the nets table has a virtual column active_talkgroup_id with a unique index.
  • Replicas take turns to migrate the database with GET_LOCK. This needs no extra privilege.

Supported databases

The tests run on each of these databases:

Database Version
SQLite built in
PostgreSQL 16
MySQL 8.4 (LTS)
MariaDB 12.3 (LTS)

Environment variables

The name of the environment variable of a setting is its YAML key in upper case, with _ in place of each . and -. For example, http.canonical-host is HTTP_CANONICAL_HOST, and dmr.ipsc.call-hang-hold is DMR_IPSC_CALL_HANG_HOLD. The names have no prefix. For a list, separate the values with commas, for example HTTP_TRUSTED_PROXIES=10.0.0.1,10.0.0.2. The Environment column of the Configuration reference lists every variable.

Command-line flags

Each setting also has a flag, which is its YAML key with -- in front, such as --dmr.mmdvm.port 62031. DMRHub --help lists the flags. --config (-c) picks the configuration file, and --version (-v) shows the version.

Edit this page on GitHub