libcoap currently is available only as source archive or (preferably) can be cloned via Git. A debian package is being worked on.

Get the Code

Latest development releases are available as package for download, or from the git repository.

There is also a stable master version which can also be cloned from git.

(Note that the former SF repository is outdated.)


On platforms where POSIX system calls are available, the installation follows the usual configure/make cycle as described below.

Linux, Mac OSX and other POSIX platforms

If you have cloned the sources via git, you need to run ./ to generate the build scripts. This step is optional when a source archive is used.

Next, say ./configure followed by make and make install.

Besides common GNU options, the configure script provides the following switches to control the build process:


An example Contiki application can be found in examples/contiki. You need to run configure (possibly preceded by when cloned from git). The example Makefile will clone a the Contiki repository and create a symbolic link in Contiki’s apps directory to the libcoap root directory where Makefile.libcoap is located. After that, a simple server application is build by Makefile.contiki.

There is currently no DTLS support for libcoap with Contiki.


Using libcoap with LwIP requires a hand-crafted Makefile. Please refer to examples/lwip/Makefile to see how this is done.

There is currently no DTLS support for libcoap with LwIP.


The usage of libcoap with TinyOS is documented in the TinyOS Wiki. Note that this implements an outdated version of the protocol.

There is no DTLS support for libcoap with TinyOS.


  • Olaf Bergmann •  •  2015—2019
  • PGP key fingerprint: 5111 C4C4 4DB3 7FFB 1EA3 E264 606A 6D46 C40B F79B