COAP-RD(5)
π COAP-RD(5) β the coap-rd manual, bestie edition π
okay so quick vibe check: this is the manual for coap-rd (and its whole little friend group: coap-rd-gnutls, coap-rd-mbedtls, coap-rd-openssl, coap-rd-notls) β sitting in section 5 of the manual, living its best life. grab a boba, we're doing this. π§β¨
πΈ NAME πΈ
coap-rd, coap-rd-gnutls, coap-rd-mbedtls, coap-rd-openssl, coap-rd-notls β a CoAP Resource Directory built on libcoap. literally the whole squad. π
β¨ SYNOPSIS β¨
coap-rd [-g group] [-p port] [-v num] [-w [port][,secure_port]] [-A
address] [-G group_if] [-T max_token_size] [-V num] [[-h hint] [-k key]]
[[-c certfile] [-n] [-C cafile] [-R trusted_casfile]]
so here's the tea β β depending on which (D)TLS library your libcoap got compiled against, you might get coap-rd-notls, coap-rd-gnutls, coap-rd-openssl, coap-rd-mbedtls or coap-rd-tinydtls as separate binaries. and if none of those are around? no stress, plain old coap-rd just rolls with the default libcoap (D)TLS support. π¦
π¦ DESCRIPTION π¦
coap-rd is a simple CoAP Resource Directory server β and when we say simple we mean it's not doing the most, it's just doing its job. it handles resource registrations using the protocol CoAP (RFC 7252). that's it, that's the gig. iconic behavior honestly. π
π OPTIONS π
-ggroup β joins the multicast group you name, right at startup. π«Ά note: DTLS over multicast is not currently supported, so don't come for it.-pport β the port on the given address that's listening for incoming connections. if (D)TLS is supported, thenport + 1also gets listened on for (D)TLS connections. the default port is5683if you don't give it anything else. slay.-vnum β the verbosity level for general CoAP logging. default is4, maximum is8. (yes there is a ceiling, bestie.)-w[port][,secure_port] β turns on WebSockets support on port (WS) and/or secure_port (WSS), comma separated. two for one, we love to see it. β¨-Aaddress β the local address of the interface the server has to listen on. this is your main character address. π-Ggroup_if β use this interface for listening for the multicast group. this can be different from the implied interface if the-Aoption is used. yes, they can be two different things, keep up. π-Tmax_token_size β sets the maximum token length (8β65804). that is a very specific range and we respect it.-Vnum β verbosity level for (D)TLS library logging. default is3, maximum is7. (different numbers than-v, don't @ me, that's just how it is.)
π OPTIONS - PSK π
(if supported by the underlying (D)TLS library β if, okay? check first π)
-hhint β the Identity Hint to send. default isCoAP. zero length means no hint at all.-kkey β the pre-shared key to use for inbound connections. this cannot be empty if defined. π«Ά note: if-c cafileis defined, you need to define-k keyas well to have the server support both PSK and PKI. both or nothing, babe.
π OPTIONS - PKI π
(again: if supported by the underlying (D)TLS library π)
-ccertfile β use the specified PEM file, which contains theCERTIFICATEandPRIVATE KEYinformation. π«Ά note: if-k keyis defined, you need to define-c certfileas well to have the server support both PSK and PKI. (it's giving mutual commitment.)-nβ disables remote peer certificate checking. this gives clients the ability to use PKI, but without any defined certificates. convenient? yes. a little unhinged? also yes. π-Ccafile β a PEM file that contains a list of one or more CAs that are to be passed to the client so the client can figure out which client certificate to use. normally this list of CAs would be the root CA plus any intermediate CAs. ideally the server certificate should be signed by the same CA so mutual authentication can actually happen. the contents of cafile get added to the trusted store of root CAs. using the-Cor-Roptions will trigger the validation of the client certificate unless overridden by the-noption. π-Rtrust_casfile β a PEM file containing the set of trusted root CAs that are to be used to validate the client certificate. alternatively, this can point to a directory containing a set of CA PEM files. the-C cafileCA doesn't have to be in this list and is trusted for the validation. using-R trust_casfiledisables common CA mutual authentication, which can only be done by using-C cafile. using the-Cor-Roptions will trigger the validation of the server certificate unless overridden by the-noption. (this one's a little dramatic, read it twice. π)
π EXAMPLES π
- Example
coap-rd -A ::1
lets the server listen on localhost (port 5683). baby's first server. π£
- Example
coap-rd -A ::1 -k mysecretKey -h myhint
lets the server listen on localhost (port 5683 and 5684) with the server set up for PSK authentication. two ports, one server, main character energy. β¨
- Example
coap-rd -A ::1 -p 13011
quite the same, except the listening port is 13011 (and not the default port 5683). we're customizing today, bestie. π
- Example
coap-rd -A 2001:db8:81a8:0:6ef0:dead:feed:beef -v 5
the listening address is set to 2001:db8:81a8:0:6ef0:dead:feed:beef and the verbosity level is set to 5. look at that address, it ate. π₯
- Example
coap-rd -A 2001:db8:81a8:0:6ef0:dead:feed:beef -g FF02::FD
sets the listening address to 2001:db8:81a8:0:6ef0:dead:feed:beef and joins the All CoAP Nodes multicast group FF02::FD. group chat, but make it multicast. π«Ά
π§ FILES π§
there are no configuration files. nothing to edit, nothing to break, nothing to obsess over. it's giving minimalism. β¨
π EXIT STATUS π
0β Success. slay, it worked. π1β Failure (syntax or usage error; configuration error; document processing failure; unexpected error). something went sideways, five separate ways possible, take your pick. π
π BUGS π
found a bug? please raise an issue on GitHub at https://github.com/obgm/libcoap/issues so it can be reported. π«Ά
got a fix instead? please raise a Pull Request at https://github.com/obgm/libcoap/pulls so it can be fixed. we love a problem-solver. π₯
π AUTHORS π
The libcoap project <libcoap-developers@lists.sourceforge.net> β the actual icons behind all of this. π
and that's the whole page, bestie π¦β¨ β this was coap-rd version 4.3.5, dated 08/24/2026, and that's a wrap on section 5. go forth and register some resources. π
π
π¦ where this page comes from
- ubuntu stonking: libcoap3-bin 4.3.5-4ubuntu1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms