Skip to content

Self Hosted Huly

JoKeks2023 edited this page Sep 28, 2026 · 1 revision

Self-Hosted Huly

This fork exists mainly for huly-selfhost deployments. Upstream's document/description writes are hardcoded against Huly Cloud's datalake service, which a self-hosted instance doesn't run.

Required settings

HULY_EMAIL=you@example.com
HULY_PASSWORD=your-password
HULY_ACCOUNTS_URL=https://huly.example.com/_accounts
HULY_FRONT_URL=https://huly.example.com
Variable Value How to find it
HULY_ACCOUNTS_URL Public URL of the account service The ACCOUNTS_URL your huly-selfhost front is configured with. With the default huly-selfhost nginx setup this is https://<host>/_accounts.
HULY_FRONT_URL Public base URL of the front service The URL you open Huly in the browser with, e.g. https://<host> (without /workbench/…).

Without HULY_ACCOUNTS_URL the server tries to log in at Huly Cloud (https://account.huly.app), and your self-hosted credentials will fail there.

What each URL is used for

  • Accounts (HULY_ACCOUNTS_URL): login, getUserWorkspaces(), selectWorkspace(), getWorkspaceMembers(). Everything in Multi-Workspace goes through it.

  • Transactor WebSocket: not configured. selectWorkspace(…, 'external') returns the external endpoint your instance advertises. It must be reachable from where the MCP server runs, e.g. from inside the Docker container. If your instance advertises localhost or an internal hostname, connections from elsewhere will fail.

  • Front (HULY_FRONT_URL): the /files endpoint for blobs:

    • GET /files?file=<blobId>&workspace=<uuid>: reads document bodies and issue/organization descriptions (get_document, get_issue, get_organization)
    • POST /files (multipart field file): uploads markup blobs (update_document, descriptions) and attachments (attach_file)
    • DELETE /files?file=<blobId>: deletes attachments (delete_attachment)

    All three send the workspace token of the targeted workspace as Authorization: Bearer …. Tokens are never in the URL (see Security). Front resolves the workspace from the token.

Multiple workspaces on one instance

Nothing extra is needed. All workspaces of the account on that instance are discovered through HULY_ACCOUNTS_URL, and each gets its own connection and token. See Multi-Workspace.

Workspace slugs on a self-hosted instance are the part after /workbench/ in the browser URL, e.g. https://huly.example.com/workbench/acmeteam → acmeteam. list_workspaces shows them.

Checking the setup

  1. From a clone of the repository: HULY_ACCOUNTS_URL=https://huly.example.com/_accounts npm run setup. It logs in via email code and lists every workspace (see Setup wizard). This checks accounts and discovery.
  2. In the MCP client:
    • list_workspaces checks discovery through the server.
    • list_projects(workspace=…) checks the WebSocket endpoint.
    • get_document/get_issue on something with content checks HULY_FRONT_URL and the Bearer read.

Known caveats

  • HULY_FRONT_URL doubles as the self-hosted switch for uploads (see Configuration). Always set it on self-hosted instances. Without it, uploads go to Huly Cloud's datalake and fail.
  • Some blob references (e.g. collaborative descriptions stored as <id>-description-<n>) may not exist as stored files on the instance. Front then answers 404 and the tool simply shows no content.
  • Huly SDK packages @hcengineering/* 0.7.411+ ship without type definitions (upstream issue). This repo builds against the earlier 0.7.x versions in package-lock.json.

Clone this wiki locally