Skip to content

hasmcp/hasmcp-pro-local-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HASMCP Setup Guide

Welcome to the HASMCP Pro project setup guide for testing with your license key on localhost. This repository contains the configuration and control scripts (via a Makefile) to run HasMCP as a Docker container.

Prerequisites

Before starting, ensure you have the following installed and configured on your host system:

  • Docker: Make sure the Docker daemon is running.
  • Make: The make utility to run commands in the Makefile.
  • License Key: A valid license.key file for HASMCP Pro.

Getting Started & Setup

Follow these steps to set up and run your HASMCP instance:

Step 1: Initialize Project Folders

Run the setup command to automatically create the necessary directory structure for certs, licenses, and storage:

make setup

This creates the following directories in the project root:

  • ./_certs/: For SSL/TLS certificates.
  • ./_license/: For storing your product license.
  • ./_storage/: For application data persistence.

Step 2: Install your License Key

Copy your license.key file into the newly created ./_license/ directory:

cp /path/to/your/license.key ./_license/

Important

The application will look specifically for ./_license/license.key to validate your HASMCP Pro installation.

Step 3: Configure Environment Variables

Copy the template environment file to create your local configuration:

cp .env.example .env

Open the newly created .env file and customize the configuration variables.

Recommended Secret Keys Generation

Make sure to generate secure random keys for your secret tokens. You can generate secure hexadecimal keys using the following terminal commands:

  • For 32-byte Hex Keys (e.g., HASMCP_APP_API_ACCESS_TOKEN, HASMCP_APP_ENCRYPTION_KEY):
    hexdump -vn32 -e'4/4 "%08X" 1 "\n"' /dev/urandom
  • For 16-byte Hex Keys (e.g., HASMCP_APP_HASH_SALT):
    hexdump -vn16 -e'4/4 "%08X" 1 "\n"' /dev/urandom

Running the Application

Once your .env is configured and your license.key is in place, you can start the application container using Docker.

Start the Container

To build, run, and start the HASMCP container with the loaded environment variables and mounted directories, run:

make restart

Pull the Latest Image and Run

To update to the latest image tag and run the updated container:

make update

Command Reference

The provided Makefile offers a full set of management commands:

Command Description
make setup Creates ./_certs, ./_license, and ./_storage directories.
make restart Restops, removes, and runs the Docker container with mounted volumes and ports 80/443.
make update Stops the running container, prunes old images, pulls the latest image, and restarts.
make up Starts the existing stopped container.
make down Gracefully stops the running container.
make logs Streams the container logs (docker logs -f hasmcp).
make stats Displays resource usage stats for the container (docker stats hasmcp).

About

HasMCP Pro local setup instructions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors