THINGSD.CONF(5)

NAME
thingsd.conf - thingsd OpenBSD proxy daemon configuration file

DESCRIPTION
thingsd.conf is the configuration file for the things proxy daemon, thingsd(8).

SECTIONS
thingsd.conf is divided into two main sections:

Global Configuration
    Global settings for thingsd(8). Do note that global settings should never be placed after the things section has been defined.

things
    things are the configuration areas for each thing a client can communicate with.

The current line can be extended over multiple lines using a backslash (‘\’). Comments can be put anywhere in the file using a hash mark (‘#’), and extend to the end of the current line. Care should be taken when commenting out multi-line text: the comment is effective until the end of the entire block.

Argument names not beginning with a letter, digit, or underscore must be quoted.

GLOBAL CONFIGURATION
Here are the settings that can be set globally:

bind interface string
    Specify a single interface to create sockets on. If this is not set, thingsd(8) will attempt to open the default port on all network interfaces.

connection retry number
    Set the lost connection thing watchdog interval. Default is 30 seconds. Range is 30-600 seconds.

default port number
    Set the default port for things to communicate on. This is a required setting.

max clients number
    Set the default maximum number of clients allowed to connect to each thingsd(8) thing.

max subscriptions number
    Set the maximum number of things a client can subscribe to at a time.

prefork number
    Run the specified number of things processes. This increases the performance and prevents delays when connecting to a thing. thingsd(8) runs 3 things processes by default.

THINGS
things represent a serial, TCP/IP, or UDP listener thing for thingsd(8) to communicate with. thingsd(8) will setup sockets and bind to things depending on the settings for each thing.

baud number
    Set the baud rate for a serial thing location.

bind interface string
    Specify a single interface to create a location or ipaddr thing socket.

connect on port number
    Set the TCP/IP port to connect to for an ipaddr thing. This setting is required for ipaddr things.

data number
    Set the data bits for a serial thing location.

hardware number
    Set to 1 to turn on hardware control for a serial thing location.

ipaddr string {...}
    Create a thing connection to a hostname or IP address.

listen on [tls] port number
    Set a local socket port for a location, udp, or ipaddr thing, other than the global default port. If TLS is used, the chosen port must be unique from the default port and all other things.

location string {...}
    Create a thing connection to serial interface. These are any valid /dev things, for example /dev/ttyU0. Set the owner of a thing to _thingsd to allow for autoreconnect in a privdrop environment, in the event of a serial thing disconnect.

max clients number
    Set the maximum clients allowed to connect to a thing location or ipaddr.

parity string
    Set the parity for a serial thing location. Parity options are none, odd, even, or space.

password string
    Set the subscription password for a thing location or ipaddr.

persistent number
    Set whether thingsd(8) binds to an ipaddr thing. If persistent is set to 0, thingsd(8) will create a socket, send a client packet, and close that socket. Clients cannot receive on a non-persistent ipaddr thing.

receive on port number
    Set the udp port to listen on for a UDP packet. This setting is required for udp things.

software number
    Set to 1 to turn on software control for a serial thing location.

stop number
    Set the stop bit for a serial thing location.

thing string {...}
    Declaration of a thing for thingsd(8) to setup and the name thingsd(8) will use for client subscriptions.

tls option
    Set the TLS configuration for a thing. These options are only used if TLS has been enabled via the listen directive. Valid options are:

    certificate file
        Specify the certificate to use for this thing. The file should contain a PEM encoded certificate. The default is /etc/ssl/thing.crt.

    ciphers string
        Specify the TLS cipher string. If not specified, the default value "HIGH:!aNULL" will be used (strong crypto cipher suites without anonymous DH). See the CIPHERS section of openssl(1) for information about SSL/TLS cipher suites and preference lists.

    client ca cafile [crl crlfile] [optional]
        Require ( or, if optional is specified, request but do not require) TLS client certificates whose authenticity can be verified against the CA certificate(s) in cafile in order to proceed beyond the TLS handshake. With crl specified, additionally require that no certificate in the client chain be listed as revoked in the CRL(s) in crlfile. CA certificates and CRLs should be PEM encoded.

    dhe params
        Specify the DHE parameters to use for DHE cipher suites. Valid parameter values are none, legacy and auto. For legacy a fixed key length of 1024 bits is used, whereas for auto the key length is determined automatically. The default is none, which disables DHE cipher suites.

    ecdhe curves
        Specify a comma separated list of elliptic curves to use for ECDHE cipher suites, in order of preference. The special value of "default" will use the default curves; see tls_config_set_ecdhecurves(3) for further details.

    key file
        Specify the private key to use for this thing. The file should contain a PEM encoded private key and reside outside of the chroot(2) root directory of httpd. The default is /etc/ssl/private/thing.key.

    ocsp file
        Specify an OCSP response to be stapled during TLS handshakes with this thing. The file should contain a DER-format OCSP response retrieved from an OCSP server for the certificate in use, and can be created using ocspcheck(8). The path to file is not relative to the chroot. If the OCSP response in file is empty, OCSP stapling will not be used. The default is to not use OCSP stapling.

    protocols string
        Specify the TLS protocols to enable for this thing. If not specified, the value "default" will be used (secure protocols; TLSv1.2-only). Refer to the tls_config_parse_protocols(3) function for other valid protocol string values.

udp string {...}
    Create a thing which listens for user datagram protocol packets.

FILES
/etc/thingsd.conf
    thingsd(8) configuration file.

EXAMPLES
This configuration file would create a serial thing and a TCP/IP host thing. The serial thing would communicate on the default port, while the local network ipaddr thing would communicate on a separate port.

    #
    # Global Options
    #
    prefork 5
    default port 50000
    max clients 10
    max suscriptions 5
    thing "serial_thing" {
    	location "/dev/ttyU0" {
    		listen on tls port 50060
    		baud 9600
    		max clients 1
    		data 8
    		parity "none"
    		stop 1
    		tls certificate "/etc/ssl/my_thing.crt"
    		tls key "/etc/ssl/private/my_thing.key"
    		#no password required for our one allowed client
    	}
    }
    thing "ipaddr_thing" {
    	ipaddr "10.0.0.1" {
    		connect on port 8080
    		password "password"
    	}
    }
    thing "udp_thing" {
    	udp "my_name" {
    		receive on port 8095
    		listen on port 50010
    		password "password"
    	}
    }

SEE ALSO
thingsctl(8), thingsd(8)

HISTORY
The thingsd.conf file format first appeared with busybeed development on OpenBSD 5.9.

AUTHORS
-nosplit The thingsd(8) program was written by Tracey Emery <tracey@traceyemery.net>.