{"id":19908818,"url":"https://github.com/farlepet/coapserver","last_synced_at":"2026-02-13T21:01:39.762Z","repository":{"id":150477163,"uuid":"355753611","full_name":"farlepet/coapserver","owner":"farlepet","description":"Flexible CoAP Server","archived":false,"fork":false,"pushed_at":"2022-12-15T20:35:20.000Z","size":174,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-14T07:29:37.654Z","etag":null,"topics":["coap","iot","msgpack"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farlepet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-08T03:35:34.000Z","updated_at":"2023-01-19T09:14:39.000Z","dependencies_parsed_at":"2023-06-26T22:41:04.826Z","dependency_job_id":null,"html_url":"https://github.com/farlepet/coapserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/farlepet/coapserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fcoapserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fcoapserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fcoapserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fcoapserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farlepet","download_url":"https://codeload.github.com/farlepet/coapserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farlepet%2Fcoapserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29417705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coap","iot","msgpack"],"created_at":"2024-11-12T21:13:34.131Z","updated_at":"2026-02-13T21:01:39.757Z","avatar_url":"https://github.com/farlepet.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Coap Server\n===========\n\nThis CoAP server is designed to be highly configurable to allow its use with a\nvariety of IoT devices, for testing or for low-scale use.\n\n__Docker images__:\n\n[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/farlepet/coapserver?label=coapserver)](https://hub.docker.com/r/farlepet/coapserver)\n\n[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/farlepet/coapserver-extra?label=coapserver-extra)](https://hub.docker.com/r/farlepet/coapserver-extra)\n\n__Current Features__:\n - CoAP via UDP, DTLS, TCP, and TLS\n    - Currently only PEM keys/certificates are supported\n - GET, PUT, and POST\n    - GET: Returns the value of the resource\n    - PUT,POST: Print the sent data, and/or set the current value of the resource\n - Resource observation\n - Multiple data format support\n    - `STRING`  - Plaintext\n    - `HEX`     - Raw data represented as hex\n    - `BASE64`  - Raw data represented as base64\n - Logging to a separate file for each resource\n - Execute external command on request data\n   - By piping request data via stdin, or passing in via environment variable\n - Templated resource configuration for creating multiple similar resources\n - Regex-based on-the-fly resource creation\n - Backing resource data by data files\n   - Including notifying observers when file changes\n - Multi-block requests\n    - Currently no support for multi-block responses\n\n__Planned Features__:\n - See GitHub issues: https://github.com/farlepet/coapserver/issues\n\n\nRunning via Docker\n------------------\n\n`coapserver` images are build to support amd64, arm64, armv6, armv6, and i386\ntargets. `coapserver-extra` is currently only built to support amd64, due to\n`-Wnarrowing` errors thrown by the `msgpack-tooks` build on other platforms.\n\nNOTE: Depending on the host system (for instance, podman on CentOS), it may be\nrequired to append a `,Z` to the end of both bind mounts to work with SELinux.\n\n    docker run -it --rm -p 5683:5683/udp \\\n               --mount type=bind,source=$PWD/config.json,target=/config.json \\\n               --mount type=bind,source=$PWD/logs/,target=/var/log/coapserver \\\n               farlepet/coapserver:\u003cversion\u003e \\\n               -c /config.json -l /var/log/coapserver\n\n_OR_\n\n    docker run -it --rm -p 5683:5683/udp \\\n               --mount type=bind,source=$PWD/config.json,target=/config.json \\\n               --mount type=bind,source=$PWD/logs/,target=/var/log/coapserver \\\n               farlepet/coapserver-extra:\u003cversion\u003e \\\n               -c /config.json -l /var/log/coapserver\n\n\nBuilding\n--------\n\n__Requirements__:\n - `g++`/`clang++`\n - `make`\n - `cmake`\n - libcoap 3: https://github.com/obgm/libcoap\n - nlohmann JSON: https://github.com/nlohmann/json\n   - Extra header (`nlohmann/json_fwd.hpp`) required - used to speed up compilation\n - boost \u003e= 1.65.0: https://www.boost.org/\n\n__Available library packages__:\n - Debian: `nlohmann-json3-dev, libcoap3-dev, libboost-all-dev`\n - Arch Linux: `libcoap (AUR), nlohmann-json, boost, msgpack-cxx`\n\n__Building__:\n\n    mkdir build \u0026\u0026 cd build\n    cmake ../ [options]\n    make\n\nThe following CMake options may be useful:\n - `-DCMAKE_CXX_COMPILER=\u003c...\u003e`\n   - Choose which c++ compiler to use\n   - Tested with `g++` and `clang++`\n\n\nManually building Docker image(s)\n------\n\nNOTE: Dockerfiles now expect to be run using `docker buildx build`, and will not\nwork with standard `docker build` (unless having previously run `docker buildx install`).\n\n    # Build base coapserver image\n    docker buildx build -t coapserver .\n    # Build extra coapserver image - optional (base image must be built first)\n    # Adds extra tools including cbor2json, msgpack2json, lz4, gzip, and xz\n    docker buildx build -f Dockerfile.extra -t coapserver-extra .\n\n\nRunning Test Cases\n------------------\n\nTest cases are written in [BATS](https://github.com/bats-core/bats-core) and\n[expect](https://core.tcl-lang.org/expect/index), both of these must be installed\nprior to running a test case.\n\nTo run the entire test suite:\n\n    bats tests/\n\nTo run a specific set of tests:\n\n    bats tests/\u003ctest\u003e.bat\n\nThis must be run from the root of the repository, and the `coap_server` binary\nmust be present at `build/coap_server`, as with the build process mentioned\nabove.\n\n\nData Flow\n---------\n\nPUT/POST:\n - Request -\u003e Formatter -\u003e Command -\u003e Log\n\nGET:\n - Current Resource Value -\u003e Requestor\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarlepet%2Fcoapserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarlepet%2Fcoapserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarlepet%2Fcoapserver/lists"}