LogoLogo
Studio
4.6
4.6
  • Harper Docs
  • Getting Started
    • What is Harper
    • Install Harper
    • Harper Concepts
    • Create Your First Application
  • Developers
    • Applications
      • Caching
      • Defining Schemas
      • Defining Roles
      • Data Loader
      • Debugging Applications
      • Define Fastify Routes
      • Web Applications
      • Example Projects
    • Components
      • Managing
      • Reference
      • Built-In Components
    • REST
    • Operations API
      • Quick Start Examples
      • Databases and Tables
      • NoSQL Operations
      • Bulk Operations
      • Users and Roles
      • Clustering
        • Clustering with NATS
      • Components
      • Registration
      • Jobs
      • Logs
      • System Operations
      • Configuration
      • Certificate Management
      • Token Authentication
      • SQL Operations
      • Advanced JSON SQL Examples
    • Real-Time
    • Replication/Clustering
      • Sharding
      • Legacy NATS Clustering
        • Requirements and Definitions
        • Creating A Cluster User
        • Naming A Node
        • Enabling Clustering
        • Establishing Routes
        • Subscription Overview
        • Managing Subscriptions
        • Things Worth Knowing
        • Certificate Management
    • Security
      • JWT Authentication
      • Basic Authentication
      • mTLS Authentication
      • Configuration
      • Users & Roles
      • Certificate Management
    • SQL Guide
      • SQL Features Matrix
      • SQL Date Functions
      • SQL Reserved Word
      • SQL Functions
      • SQL JSON Search
      • SQL Geospatial Functions
    • Miscellaneous
      • Google Data Studio
      • SDKs
      • Query Optimization
  • Administration
    • Best Practices and Recommendations
    • Logging
      • Standard Logging
      • Audit Logging
      • Transaction Logging
    • Clone Node
    • Compact
    • Jobs
    • Harper Studio
      • Create an Account
      • Log In & Password Reset
      • Organizations
      • Instances
      • Query Instance Data
      • Manage Databases / Browse Data
      • Manage Clustering
      • Manage Instance Users
      • Manage Instance Roles
      • Manage Applications
      • Instance Metrics
      • Instance Configuration
      • Enable Mixed Content
  • Deployments
    • Configuration File
    • Harper CLI
    • Install Harper
      • On Linux
    • Upgrade a Harper Instance
    • Harper Cloud
      • IOPS Impact on Performance
      • Instance Size Hardware Specs
      • Alarms
      • Verizon 5G Wavelength
  • Technical Details
    • Reference
      • Analytics
      • Architecture
      • Content Types
      • Data Types
      • Dynamic Schema
      • GraphQL
      • Harper Headers
      • Harper Limits
      • Globals
      • Resource Class
      • Transactions
      • Storage Algorithm
      • Blob
    • Release Notes
      • Harper Tucker (Version 4)
        • 4.6.0
        • 4.5.10
        • 4.5.9
        • 4.5.8
        • 4.5.7
        • 4.5.6
        • 4.5.5
        • 4.5.4
        • 4.5.3
        • 4.5.2
        • 4.5.1
        • 4.5.0
        • 4.4.24
        • 4.4.23
        • 4.4.22
        • 4.4.21
        • 4.4.20
        • 4.4.19
        • 4.4.18
        • 4.4.17
        • 4.4.16
        • 4.4.15
        • 4.4.14
        • 4.4.13
        • 4.4.12
        • 4.4.11
        • 4.4.10
        • 4.4.9
        • 4.4.8
        • 4.4.7
        • 4.4.6
        • 4.4.5
        • 4.4.4
        • 4.4.3
        • 4.4.2
        • 4.4.1
        • 4.4.0
        • 4.3.38
        • 4.3.37
        • 4.3.36
        • 4.3.35
        • 4.3.34
        • 4.3.33
        • 4.3.32
        • 4.3.31
        • 4.3.30
        • 4.3.29
        • 4.3.28
        • 4.3.27
        • 4.3.26
        • 4.3.25
        • 4.3.24
        • 4.3.23
        • 4.3.22
        • 4.3.21
        • 4.3.20
        • 4.3.19
        • 4.3.18
        • 4.3.17
        • 4.3.16
        • 4.3.15
        • 4.3.14
        • 4.3.13
        • 4.3.12
        • 4.3.11
        • 4.3.10
        • 4.3.9
        • 4.3.8
        • 4.3.7
        • 4.3.6
        • 4.3.5
        • 4.3.4
        • 4.3.3
        • 4.3.2
        • 4.3.1
        • 4.3.0
        • 4.2.8
        • 4.2.7
        • 4.2.6
        • 4.2.5
        • 4.2.4
        • 4.2.3
        • 4.2.2
        • 4.2.1
        • 4.2.0
        • 4.1.2
        • 4.1.1
        • 4.1.0
        • 4.0.7
        • 4.0.6
        • 4.0.5
        • 4.0.4
        • 4.0.3
        • 4.0.2
        • 4.0.1
        • 4.0.0
        • Tucker
      • HarperDB Monkey (Version 3)
        • 3.3.0
        • 3.2.1
        • 3.2.0
        • 3.1.5
        • 3.1.4
        • 3.1.3
        • 3.1.2
        • 3.1.1
        • 3.1.0
        • 3.0.0
      • HarperDB Penny (Version 2)
        • 2.3.1
        • 2.3.0
        • 2.2.3
        • 2.2.2
        • 2.2.0
        • 2.1.1
      • HarperDB Alby (Version 1)
        • 1.3.1
        • 1.3.0
        • 1.2.0
        • 1.1.0
  • More Help
    • Support
    • Slack
    • Contact Us
Powered by GitBook
On this page
  • Installing via NPM
  • Installing via Docker
  • How to Use this Image
  • Example Deployments
  • Logs and Troubleshooting
  • Raw binary installation
  1. Getting Started

Install Harper

PreviousWhat is HarperNextHarper Concepts

Last updated 2 days ago

There are three ways to install a Harper instance: using a package manager like npm, deploying it as a Docker container, and offline installation. Below is a step-by-step tutorial for each method.

Installing via NPM

Before you begin, ensure you have LTS version or newer. Node.js comes with npm, which will be used to install Harper.

Open your terminal or command prompt and install Harper globally by executing the command below. Installing globally allows the harperdb command to be accessible from anywhere on your machine, making it easier to manage multiple projects.

npm install -g harperdb

Once the installation finishes, simply start your Harper instance by running the command below in your terminal.

harperdb

This launches Harper as a standalone, where you can define your schemas, endpoints, and application logic within a single integrated environment. The first time you set this up, you will need to set up your Harper destination, username, password, config, and hostname.

At this point, your local Harper instance is up and running, giving you the ability to develop and test your database applications using your favorite local development tools, including debuggers and version control systems.

Installing via Docker

Using Docker to run Harper is an efficient way to manage a containerized instance that encapsulates all of Harper’s functionality. First, ensure that Docker is installed and running on your system. If it isn’t, download it from the and complete the installation process.

Next, open your terminal and pull the latest Harper image by running the following command:

docker pull harperdb/harperdb

This command downloads the official Harper image from Docker Hub, ensuring you have the most recent version of the containerized instance. Once the image is downloaded, you can start a new Harper container with the following command:

docker run -d -p 9925:9925 harperdb/harperdb

In this command, the -d flag runs the container in detached mode, allowing it to operate in the background, and the -p 9925:9925 flag maps port 9925 on your local machine to port 9925 within the container, which is Harper’s default port. This port mapping lets you interact with the Harper instance directly from your local environment.

How to Use this Image

  • ROOTPATH=/home/harperdb/hdb

  • OPERATIONSAPI_NETWORK_PORT=9925

  • HDB_ADMIN_USERNAME=HDB_ADMIN

  • HDB_ADMIN_PASSWORD=password

  • LOGGING_STDSTREAMS=true

These defaults allow you to quickly start an instance, though you can customize your configuration to better suit your needs.

Containers created from this image store all data and Harper configuration at /home/harperdb/hdb. To ensure that your data persists beyond the lifecycle of a container, you should mount this directory to a directory on the container host using a Docker volume. This ensures that your database remains available and your settings are not lost when the container is stopped or removed.

Test your Harper instance is up and running by querying curl http://localhost:9925/health

Example Deployments

To run a Harper container in the background with persistent storage and exposed ports, you can use a command like this:

docker run -d \
  -v <host_directory>:/home/harperdb/hdb \
  -e HDB_ADMIN_USERNAME=HDB_ADMIN \
  -e HDB_ADMIN_PASSWORD=password \
  -e THREADS=4 \
  -p 9925:9925 \
  -p 9926:9926 \
  harperdb/harperdb

Here, the <host_directory> should be replaced with an actual directory path on your system where you want to store the persistent data. This command also exposes both the Harper Operations API (port 9925) and an additional HTTP port (9926). For a more advanced setup, enabling HTTPS and clustering, you can run:

docker run -d \
  -v <host_directory>:/home/harperdb/hdb \
  -e HDB_ADMIN_USERNAME=HDB_ADMIN \
  -e HDB_ADMIN_PASSWORD=password \
  -e THREADS=4 \
  -e OPERATIONSAPI_NETWORK_PORT=null \
  -e OPERATIONSAPI_NETWORK_SECUREPORT=9925 \
  -e HTTP_SECUREPORT=9926 \
  -e CLUSTERING_ENABLED=true \
  -e CLUSTERING_USER=cluster_user \
  -e CLUSTERING_PASSWORD=password \
  -e CLUSTERING_NODENAME=hdb1 \
  -p 9925:9925 \
  -p 9926:9926 \
  -p 9932:9932 \
  harperdb/harperdb

In this setup, additional environment variables disable the unsecure Operations API port and enable secure ports for HTTPS, along with clustering parameters such as the clustering user, password, and node name. The port 9932 is also exposed for Harper clustering communication.

Finally, if you simply wish to check the Harper version using the container, execute:

docker run --rm harperdb/harperdb /bin/bash -c "harperdb version"

This command runs the container momentarily to print the version information, then removes the container automatically when finished.

Logs and Troubleshooting

To verify that the container is running properly, you can check your running containers with:

docker ps

If you want to inspect the logs to ensure that Harper has started correctly, use this command (be sure to replace <container_id> with the actual ID from the previous command):

docker logs <container_id>

Once verified, you can access your Harper instance by opening your web browser and navigating to http://localhost:9925 (or the appropriate port based on your configuration).

Raw binary installation

npm install -g harperdb-X.X.X.tgz harperdb install

can be passed as Docker run environment variables. If no environment variables are provided, Harper will operate with default configuration settings, such as:

There's a different way to install Harper. You can choose your version and download the npm package and install it directly (you’ll still need Node.js and NPM). Click to download and install the package. Once you’ve downloaded the .tgz file, run the following command from the directory where you’ve placed it:

Node.js
official Docker website
Harper configuration settings⁠
this link