Logo

Download
Installation

Installing JsThemis #

JsThemis is available on npm and can be installed with the usual npm install. Additionally, Themis Core library has to be installed in your system as well.

Themis Core is available as a system package for Linux and macOS. Usually you want to install the stable package to benefit from automatic dependency management and security updates. However, you can also build and install the latest JsThemis from the source code.

Installing stable version on Linux #

The easiest way to install Themis on Linux is to use package repositories for your system. We build packages for a multitude of Linux distributions.

  1. Add Cossack Labs package repositories to your system.

  2. Install Themis Core development package.

    For Debian, Ubuntu:

    sudo apt install libthemis-dev
    

    For CentOS, RHEL:

    sudo yum install libthemis-devel
    
  3. Install JsThemis via npm for your project:

    npm install jsthemis
    

Once JsThemis is installed, you can try out code examples.

Installing stable version on macOS #

The easiest way to install Themis on macOS is to use Homebrew.

  1. Add Cossack Labs tap to your system:

    brew tap cossacklabs/tap
    
  2. Install Themis Core package:

    brew install libthemis
    
  3. Install JsThemis via npm for your project:

    npm install jsthemis
    

Once JsThemis is installed, you can try out code examples.

Building latest version from source #

If the stable package version does not suit your needs, you can manually build and install the latest version of Themis from source code.

  1. Build and install Themis Core library into your system.

  2. Build JsThemis package from the source code:

    make jsthemis
    

    The resulting package will be placed into build/jsthemis.tgz in Themis source tree.

  3. Install JsThemis via npm for your project:

    npm install /path/to/jsthemis.tgz