The chapter describes processes for various tasks and aims at all user groups.


The NetHSM supports the PKCS#11 standard. The required driver is available from the repository. The repository containes the source code and libraries, for different operating systems.

The PKCS#11 guide describes how to use them in detail.


This driver is still an early Proof of Concept implementation that only implements the functions that are necessary for operating TLS servers.

Development and Testing#

A public NetHSM demo instance is available at

Alternatively, you can run the NetHSM as a Docker container locally. The NetHSM container requires nested virtualization for strong separation with other containers. Thus, to start a NetHSM container you need a Linux host with /dev/kvm available. Execute this command:

$ sudo docker run --rm -ti --device=/dev/net/tun:/dev/net/tun --cap-add=NET_ADMIN -p8443:8443 nitrokey/nethsm:testing

Integration into Custom Application#

To integrate the NetHSM into own custom applications, client libraries are available for almost all programming languages. Therefore, we recommend using OpenAPI Generator.

The list of all available languages can be retrieved as follows.

$ docker run --pull --rm -ti openapitools/openapi-generator-cli list -i stable

The NetHSM client can be generated for your programming language as follows.

$ docker run --rm -ti -v "${PWD}/out:/out" openapitools/openapi-generator-cli generate -i= -o out -g javascript

The generated client code, in this example JavaScript, will be created in the ./out/ directory. This folder also contains the necessary documentation how to use it.


The NetHSM’s API specification is available in OpenAPI format, and can be inspected and tested in the API browser.