Skip to content

Installation

  • Node.js 24 or later
  • Basic comfort with the command line

The recommended way to run MikroChat in production. A single command installs the mikrochat CLI, which handles downloading, configuring, and running MikroChat.

  1. Install the CLI

    Terminal window
    curl -sSL https://releases.mikrochat.com/install.sh | bash

    This creates the mikrochat command in ~/.local/bin/.

  2. Download MikroChat

    Terminal window
    mikrochat install

    Downloads the latest release to ~/.mikrochat/.

  3. Initialize a project

    Create a directory for your deployment and initialize it:

    Terminal window
    mkdir my-chat && cd my-chat
    mikrochat init

    This creates mikrochat.config.json and copies the web app to ./app/.

  4. Configure

    Edit mikrochat.config.json with your settings. An example configuration to set up MikroChat with password-based sign-in and allowing new users to enter could look like this:

    {
    "auth": {
    "authMode": "dev",
    "jwtSecret": "CHANGE-ME-use-a-random-string-at-least-32-characters",
    "appUrl": "http://localhost:8000",
    "isInviteRequired": false
    },
    "chat": {
    "initialUser": {
    "userName": "admin",
    "email": "admin@yourdomain.com"
    }
    },
    "server": {
    "allowedDomains": ["*"]
    }
    }
  5. Start the API

    Terminal window
    mikrochat start

    The API starts on http://localhost:3000.

  6. Serve the frontend

    Point your web server at the ./app/ directory. For example, with Caddy:

    localhost:8000 {
    root * /path/to/my-chat/app
    file_server
    try_files {path} /index.html
    }

    Or for a quick test, use any static file server:

    Terminal window
    npx http-server -p 8000 ./app
  7. Sign in

    Open http://localhost:8000 in your browser and sign in with your configured initial user’s email.

CommandDescription
mikrochat installDownload and install MikroChat
mikrochat initCreate config file and copy web app to current directory
mikrochat startStart the MikroChat API server
mikrochat upgradeUpgrade to the latest version
mikrochat versionShow installed version
mikrochat uninstallRemove MikroChat from your system

See the CLI Reference for full details.