Role Operating System Database
Primary Node CentOS/RHEL 7, or Debian 9, x86_64, with systemd PostgreSQL 9.3 / 9.4 / 9.5 / 9.6 / 10
Replica Node CentOS/RHEL 7, or Debian 9, x86_64, with systemd Not required

Step 1: Download

$cd ~
$tar zxf ./janusec-latest.tar.gz

Step 2: Install

Switch to root and run , janusec application gateway will be installed to /usr/local/janusec/

#cd janusec-0.9.9

Select 1. Primary Node, then it will:

  • copy files to /usr/local/janusec/
  • copy service file to system service directory
  • Enable Janusec Application Gateway as a system service, but not start it for the first time.

Step 3: Config

PostgreSQL is not included in release package, you should prepare database name and account.
Now we assume you have PostgreSQL installed already, and database name and account is ready, then edit /usr/local/janusec/config.json :

Primary Node (The First Node)

    “node_role”: “primary”,
    “primary_node”: {
        “database”: {
            “host”: “”,
            “port”: “5432”,
            “user”: “your_postgresql_user”,
            “password”: “your_postgresql_password”,
            “dbname”: “janusec
    “replica_node”: {
        “node_key”: “”,
        “sync_addr”: “”

  • “node_role”: “primary” ( fixed primary )
Replica Node (Optional)

Usually only one Primary Node is required for small scale web applications.
Replica Nodes is for large scale web applications, and need GSLB (Global Server Load Balance) of yourselves.
You must copy the node_key in web administration portal if you need replica nodes, and paste into the config.json of replica nodes.

    “node_role”: “replica”,
    “primary_node”: {
        “admin_http_listen”: “”,
        “admin_https_listen”: “”,
        “database”: {
            “host”: “”,
            “port”: “”,
            “user”: “”,
            “password”: “”,
            “dbname”: “”
    “replica_node”: {
        “node_key”: “produced_by_web_admin_in_primary_node”,
        “sync_addr”: “http://primary_ip/janusec-admin/api

  • “node_role”: “replica” (fixed replica)
  • “node_key”: “produced_by_web_admin_in_primary_node” (produced by web admin)
  • “sync_addr”: “http://primary_ip/janusec-admin/api” (replace with the primary IP address)

Step 4: Start

#systemctl start janusec

Step 5: Test Installation

Open web browser such as Chrome, navigate with address:


This is the first administration address for Janusec Application Gateway.
Login with default username admin and password J@nusec123 .
You should change the password for security reasons.

©JANUSEC(金汤智库) All Rights Reserved.      Contact:    QQ Group: 776900157