Build from source and run the dev server
Use this guide to build Cuttlely from its source code, run it, and change it with a dev server that reloads as you edit. It’s the way to work on Cuttlely itself, or to run it on a machine without Docker. For a ready-made install, use Docker. For a hosted install, use Render.
If another server accepts public traffic first, follow the reverse proxy guide.
When you finish the install, Cuttlely runs at http://localhost:43117, with the agent runtime beside it for harness specialists. While you change the code, the dev server runs the same app at http://localhost:8080. The app database is SQLite, and you have one local account to sign in with. A database you already run can replace SQLite. See Use Postgres.
The steps, in order:
- Before you start: Node 24, pnpm through Corepack, uv and Git.
- Get the code and build it: clone, install, build, and set up the agent runtime.
- Start Cuttlely and create your account.
- Run the dev server while you change code.
- Run the tests and check your change before a pull request.
On an 8-core machine, install, the build and the runtime setup took about a minute, and the server was listening a few seconds after the start command. A slow network makes the install longer, while pnpm downloads the packages.
Before you start
Section titled “Before you start”| Tool | Version | Check |
|---|---|---|
| Node.js | 24 (engines.node is ^24, and .nvmrc is v24.15.0) |
node -v |
| pnpm | 10.33.4, pinned by packageManager in package.json. Corepack runs it for you |
pnpm -v |
| uv | any recent version, from docs.astral.sh/uv | uv --version |
| Git | any. The server also needs git for Version history |
git --version |
Turn on Corepack once. It comes with Node and runs the pnpm version that Cuttlely pins, so you don’t install pnpm yourself:
corepack enableIf that fails with EACCES, Node was installed for every user on the machine. Run sudo corepack enable, or install Node with a version manager such as nvm or fnm. uv downloads the Python that the agent runtime needs, so you don’t install Python yourself.
Get the code and build it
Section titled “Get the code and build it”-
Get the code:
Terminal window git clone https://github.com/cuttlely/cuttlely.gitcd cuttlely -
Check pnpm from inside the
cuttlelyfolder:Terminal window pnpm -vThe first time, Corepack prints
! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-10.33.4.tgzand asksDo you want to continue? [Y/n]. Press Enter. It prints10.33.4. -
Install the dependencies:
Terminal window pnpm installIt ends with
Done in ... using pnpm v10.33.4. Two notices along the way are expected:Update available! 10.33.4 → ...with acorepack usecommand. Don’t run it. It changes the pinned version inpackage.json.Ignored build scripts: ...with apnpm approve-buildshint. Don’t run it either. The build and the server don’t need those scripts.
-
Build every package:
Terminal window pnpm buildIt ends with
Tasks: 10 successful, 10 total. On an 8-core machine a first build took about 40 seconds. -
Set up the agent runtime, the Python process that runs harness specialists:
Terminal window bash scripts/setup-hermes.shIt creates
hermes/.venvwith Python 3.14, downloaded by uv if it’s missing, and ends withHermes Python ready: .../hermes/.venv/bin/python (Python 3.14, mcp extra). It took about 6 seconds with Python already downloaded. To use Python 3.11 to 3.13 instead, pass the version:bash scripts/setup-hermes.sh 3.12.
Start Cuttlely
Section titled “Start Cuttlely”bash scripts/start-cuttlely.shOn a source install without WorkOS, the script turns on the local account and its password form for you (CUTTLELY_LOCAL_ADMIN=true). Leave the terminal open. The server runs in the foreground, and Ctrl+C stops the server and the agent runtime together.
The script starts the server, waits for the harness gateway, and then starts the agent runtime. A good start looks like this:
Cuttlely node: .../bin/node (v24.15.0)Hermes Python: .../hermes/.venv/bin/pythonCuttlely boot, step 1 of 2: starting the server on port 43117. A browser opened now shows a 'Cuttlely is starting' page.Waiting for the harness gateway on 127.0.0.1:43118.[INFO]: Starting Cuttlely...[INFO]: 📦 [server]: Data Source initialized successfully[INFO]: 🔄 [server]: Database migrations completed successfully...[INFO]: 🎉 [server]: All initialization steps completed successfully![INFO]: ⚡️ [server]: Cuttlely Server is listening at :43117[INFO]: ──────────────────────────────────────────────────────────────[INFO]: ✅ Cuttlely is ready — finish setup:[INFO]: http://localhost:43117/setup#code=madeupcode000001 ← open on this machine[INFO]: Setup code: madeupcode000001 (valid 60 min, works once)[INFO]: Remote/Docker? Open http://<your-host>:43117/setup and paste the code.[INFO]: ──────────────────────────────────────────────────────────────Harness gateway is answering on 127.0.0.1:43118.Cuttlely boot, step 2 of 2: starting the agent runtime (Hermes) in the background.Harness queue: inlineServer lines start with the time, then [INFO]:. The gateway line follows the ready block. On an 8-core machine the server was listening a few seconds after the start command, and the agent runtime was up a few seconds after that. To check it from another terminal:
curl -fsS http://127.0.0.1:43117/api/v1/pingFor a gateway or load balancer, use /api/v1/ping/live so UI and recovery traffic stays available during a runtime-only failure. Keep the strict ping above for monitoring agent readiness. Both endpoints keep the database check. Both wait for the boot compile on the first start; after a restart in place only the strict ping waits for it. Health checks.
It prints pong. The X-Cuttlely-Hermes response header is up once the agent runtime is running. See Agent runtime health. The wait for the harness gateway includes a 503 from its /health, and from GET /api/v1/ping, while profiles from an older compiler are compiled again. The script waits up to CUTTLELY_GATEWAY_STARTING_WAIT_SECONDS (default 180 seconds, capped at 300). Profiles at startup.
| Port | What listens | Change it with |
|---|---|---|
43117 |
The app and its API | PORT |
43118 |
The harness gateway, on 127.0.0.1 only |
CUTTLELY_HARNESS_GATEWAY_PORT |
8642 |
Agent runtime, on 127.0.0.1 only |
HERMES_API_PORT |
To run a second copy on the same machine, give it its own data as well as its own ports: set PORT, CUTTLELY_HARNESS_GATEWAY_PORT, and HERMES_API_PORT to free ports, and DATABASE_PATH, SECRETKEY_PATH, BLOB_STORAGE_PATH, and CUTTLELY_DATA_DIR to new folders. Two servers on the same data would both run its schedules.
Run it as a service
Section titled “Run it as a service”The start script already restarts the agent runtime in place while the Node process is up. To keep a source install running after the terminal closes, or to bring the Node process back if it exits, run bash scripts/start-cuttlely.sh from a systemd unit with Restart=on-failure or Restart=always and WorkingDirectory set to the repository root. Use GET /api/v1/ping/live for service restart decisions, and GET /api/v1/ping for agent readiness. Health checks.
Create your account
Section titled “Create your account”A new install has no users. With CUTTLELY_LOCAL_ADMIN=true, there are two ways to create the first account. Both make the same account, the owner (Super User).
In the browser
Section titled “In the browser”- Open the link in the ready block, or open http://localhost:43117. With no account, the app opens
/setup. - If the address has no code, paste the setup code from the block. The form appears after the code is accepted.
- Fill in your name, email, password, and password again. The password needs 8 to 128 characters, with a lowercase letter, an uppercase letter, a digit, and a special character.
- Select Create account.
You are signed in, and the app opens Chatflows.
The form works only while there are no users. Once the account exists, creating another one answers Not Found. From another machine, open /setup on that host and paste the setup code from the log.
In a terminal
Section titled “In a terminal”From the repository root, in a second terminal:
CUTTLELY_LOCAL_ADMIN=true pnpm user --email you@example.comType the password at the Password: prompt. It isn’t shown. The command ends with:
[INFO]: Super User created for you@example.com.Several harmless npm warn lines come first. The account exists when you see Super User created.
Then open http://localhost:43117. The app opens Sign In. Type the email and password and select Sign in.
More about the account, a lost password, and WorkOS for a team: Sign in.
The first page
Section titled “The first page”After sign-in the app opens Chatflows. The sidebar lists everything else, from Harness · Agent Team to Document Stores, then Datasets, Evaluators, Evaluations and Usage, plus the Admin menu: Users, Teams, Roles, Server Settings, Logs, Audit log, and Version History, in that order. Each entry shows only to someone who can open it. Server Settings and Version History are for the organization owner. Your name and Logout are under the gear at the top right.
Next steps: save a model key under Credentials, then build an agent team or an ETL pipeline.
Run the dev server
Section titled “Run the dev server”The dev server is for changing Cuttlely’s code. It runs the app from the source folders, and the page in your browser updates as you save. Stop scripts/start-cuttlely.sh first (Ctrl+C) if it’s running.
From the repository root:
CUTTLELY_LOCAL_ADMIN=true pnpm devThen open http://localhost:8080. Use localhost, not 127.0.0.1: the UI dev server listens on localhost only, which on some machines doesn’t answer on 127.0.0.1.
pnpm dev doesn’t go through the start script, so it doesn’t turn on the local account by itself. That’s why the command sets CUTTLELY_LOCAL_ADMIN=true. Without it, Sign In says Sign-in is not configured.
What starts
Section titled “What starts”| Address | What it is | Package folder |
|---|---|---|
http://localhost:8080 |
The app in your browser. Open this one | packages/ui |
http://localhost:3000 |
The server and its API. Restarts when you save a server file | packages/server |
127.0.0.1:43118 |
The harness gateway, started by the server | packages/server |
The page at 8080 sends every /api request on to the server at 3000. Both were up within a few seconds. pnpm dev does not start the agent runtime, so X-Cuttlely-Hermes on that ping is unknown until you run the runtime beside the UI.
Each package prints its name in front of its lines. The two you care about look like this:
@cuttlely/ui:dev: Local: http://localhost:8080/@cuttlely/server:dev: Cuttlely Server is listening at :3000The server’s lines also include npm warn Unknown env config. Those warnings are harmless. The server is up when you see Cuttlely Server is listening at :3000.
Sign in
Section titled “Sign in”The dev server uses the same database as scripts/start-cuttlely.sh (~/.cuttlely), so the account you created earlier works on 8080 too. On a new install with no account yet, 8080 opens /setup (Create the owner account), the same as in Create your account.
What updates when you save
Section titled “What updates when you save”| You change | What happens | What you do |
|---|---|---|
The UI, packages/ui/src |
The page updates in place within a second. No reload, and you stay signed in | Nothing |
The server, packages/server/src |
The server compiles and restarts on the new build, in about 20 seconds. A type error stops it until the next save | Nothing |
Nodes and credentials, packages/components |
Nothing | Run pnpm --filter @cuttlely/components build, then stop pnpm dev with Ctrl+C and start it again |
The package names in those commands are the names in each folder’s package.json: @cuttlely/server is the server and @cuttlely/components is the nodes package.
Harness specialists while you work on the UI
Section titled “Harness specialists while you work on the UI”pnpm dev doesn’t start the agent runtime, so harness specialists don’t answer there. To work on the UI with the whole product behind it, run the built server with the start script on port 3000, and only the UI dev server beside it:
PORT=3000 bash scripts/start-cuttlely.shand in a second terminal:
pnpm --filter @cuttlely/ui devOpen http://localhost:8080. UI changes update in place, and curl -sI http://localhost:8080/api/v1/ping shows X-Cuttlely-Hermes: up once the runtime is running. Server changes need pnpm build and a restart of the start script.
Change the dev server ports
Section titled “Change the dev server ports”- The server reads
PORTfrompackages/server/.env. The UI dev server reads the same file to find the server, so it follows when you changePORTthere. Without the file, both use3000. - The UI port is
VITE_PORTinpackages/ui/.env(copypackages/ui/.env.example). It defaults to8080.
Stop it
Section titled “Stop it”Press Ctrl+C in the pnpm dev terminal. Everything it started stops within a second.
Run the tests
Section titled “Run the tests”Tests sit next to the code they test: a test for Foo.ts is Foo.test.ts in the same folder. Run one file while you work:
pnpm --filter @cuttlely/server test -- src/controllers/pingpnpm --filter @cuttlely/components test -- src/headerValidation.test.tsThe first took about 5 seconds and the second about 10. Drop the file path to run a whole package, and pnpm test runs every package. On a small machine, run one package at a time. CONTRIBUTING.md has more.
Check your change before a pull request
Section titled “Check your change before a pull request”pnpm verifypnpm verify is the check every pull request passes. It lints, typechecks, builds, runs the unit tests, starts a real server for a smoke test, checks an upgrade from older data, and more. It ends with a table of step timings, slowest first, then pnpm verify passed (full), and .verify/verify-summary.md lists each step with its time. An image or video file over 5 MB fails the run unless it is in scripts/media-size.allowlist, which is only for files committed before that check. On an 8-core machine it takes about 5 minutes.
A change that only touches docs or markdown can use the short run, which takes about 2 to 3 minutes:
pnpm --filter @cuttlely/components buildpnpm verify --fastThe short run doesn’t build, so a fresh checkout needs that components build (or a pnpm build) first. Verify before a pull request has the rule for which run a change needs.
Where your data lives
Section titled “Where your data lives”| What | Where | Set with |
|---|---|---|
App database, database.sqlite |
~/.cuttlely |
DATABASE_PATH |
encryption.key and the sign-in secrets |
~/.cuttlely |
SECRETKEY_PATH |
| Uploaded files | ~/.cuttlely/storage |
BLOB_STORAGE_PATH |
| Harness records, agent runtime home, ETL files, version history | <checkout>/.cuttlely |
CUTTLELY_DATA_DIR |
| Version history, a Git repository | <checkout>/.cuttlely/versions |
CUTTLELY_DATA_DIR |
| ETL runs, local vector stores, and uploads | <checkout>/.cuttlely/etl |
CUTTLELY_ETL_DIR |
scripts/start-cuttlely.sh sets CUTTLELY_DATA_DIR to <checkout>/.cuttlely unless you set it. The app database and the key stay in ~/.cuttlely unless you set DATABASE_PATH and SECRETKEY_PATH. Docker and Render put all of it under /var/cuttlely.
Keep encryption.key with the database. Stored credentials can’t be read without it.
CUTTLELY_VERSIONS=off turns version history off. CUTTLELY_DRAFTS=off turns drafts off, so the canvas saves straight to Live. See Version history and History settings.
Keep your settings in a file
Section titled “Keep your settings in a file”Copy packages/server/.env.example to packages/server/.env and set values there. The server and pnpm user both read that file, and a value in it wins over the same variable in your shell. .env is gitignored.
The example file starts with an active PORT=3000. Delete that line, or the app listens on 3000 instead of 43117 and the script still waits for 43117. scripts/start-cuttlely.sh reads PORT, CUTTLELY_DATA_DIR, CUTTLELY_HARNESS_GATEWAY_PORT, and HERMES_API_PORT from the shell before the server reads the file. Keep those four out of the file and set them in the shell, so the script and the server agree. For the dev server, PORT=3000 in the file is what you want: the server and the UI dev server both read it.
Use Postgres
Section titled “Use Postgres”SQLite is the default. Use Postgres when you already run a Postgres server. Cuttlely does not read DATABASE_URL. Set these:
DATABASE_TYPE=postgresDATABASE_HOST=127.0.0.1DATABASE_PORT=5432DATABASE_NAME=CuttlelyDATABASE_USER=your-userDATABASE_PASSWORD=your-passwordDATABASE_PORT defaults to 5432 when it’s unset. Set DATABASE_SSL=true when the server requires TLS. Docker Compose does not start Postgres and stays on SQLite. See Docker. The Render Blueprint fills these variables for you. See Render.
The analyst database
Section titled “The analyst database”CUTTLELY_ANALYST=auto gives the harness analyst its own database:
- On SQLite, Cuttlely creates
analyst-<tag>.dbnext todatabase.sqlitefor each workspace, and the analyst tool opens only that workspace’s file.<tag>comes from the workspace id. - On Postgres, Cuttlely creates a schema and a login for each workspace (
analyst_<tag>andanalyst_reader_<tag>). The login can use that schema and can’t read the app’s tables. The app’s login must be allowed to create roles. If it isn’t, analyst mode stops and tells you to set a separate database. It doesn’t fall back to the app’s login. - A store made before each workspace had its own (
analyst.db, or schemaanalyst) stays with the first workspace whose analyst runs. See Workspaces.
CUTTLELY_POSTGRES_URL is a different setting, only for the Postgres (MCP) tool. Leave it unset unless that tool should query a database other than the one in DATABASE_*. The tool refuses a URL that points at the app database. A Postgres URL credential selected on the node wins over both the variable and CUTTLELY_ANALYST. The canvas steps and the errors are in Analyst mode.
Update to a newer version
Section titled “Update to a newer version”Stop the server with Ctrl+C, then get the newest code, install, build and start again:
git pullpnpm installpnpm buildbash scripts/start-cuttlely.shRun bash scripts/setup-hermes.sh again when hermes/ changed. Database migrations run on start, and your data stays where it was.
Troubleshooting
Section titled “Troubleshooting”| You see | What to do |
|---|---|
pnpm -v prints a version other than 10.33.4, or pnpm: command not found |
Run corepack enable, then pnpm -v again from inside the cuttlely folder. |
EACCES from corepack enable |
Run sudo corepack enable, or install Node with a version manager such as nvm or fnm. |
EACCES or EROFS under a corepack folder when pnpm runs |
Corepack can’t write its download folder. Set COREPACK_HOME to a folder you own, for example $HOME/.cache/node/corepack. |
Unsupported engine or node:sqlite errors |
Use Node 24. node -v should print v24.. |
http://127.0.0.1:8080 doesn’t load while pnpm dev runs |
Open http://localhost:8080. To use another address, set VITE_HOST in packages/ui/.env. |
Port 5173 is in use, trying another one... while pnpm dev starts |
Expected. The two preview servers both want 5173, and one takes the next free port. Ignore both. |
Many npm warn Unknown env config or Unknown cli config "--email" lines |
Harmless. Wait for Cuttlely Server is listening or Super User created. |
error TS lines and [nodemon] app crashed in the pnpm dev output after a server change |
The server build found a type error, so the server is stopped. Fix the error the error TS line names and save the file again. See What updates when you save. |
listen EADDRINUSE on 3000 or 8080 when pnpm dev starts |
Another server holds the port. Stop it, or change the ports. See Change the dev server ports. |
pnpm verify --fast fails on a fresh checkout with missing dist files |
Run pnpm --filter @cuttlely/components build (or pnpm build) first. |
pnpm verify fails only with Jest timeouts or killed workers |
The machine was busy. Close other heavy jobs and run it again before you debug. |
Cuttlely is not ready to start. Missing: and a list |
Run pnpm install && pnpm build from the repository root, then start again. |
Hermes Python not found or Hermes Python ... cannot import the vendored Hermes runtime |
Run bash scripts/setup-hermes.sh, or set HERMES_PYTHON to a Python that can import Hermes. |
Hermes needs Python 3.11 to 3.14 |
Pass a supported version: bash scripts/setup-hermes.sh 3.12. |
uv is required. |
Install uv, then run setup-hermes.sh again. |
listen EADDRINUSE on 43117 when the server starts |
Another server holds the port. Stop it, or set PORT, CUTTLELY_HARNESS_GATEWAY_PORT, and HERMES_API_PORT to free ports. |
Harness gateway on 127.0.0.1:43118 did not answer within 180s. Hermes will not start. |
The app is up without the agent runtime. Check the log above it for the server error, fix it, and start again. |
Sign In says Sign-in is not configured. |
CUTTLELY_LOCAL_ADMIN isn’t true. Stop the server and start it with CUTTLELY_LOCAL_ADMIN=true. |
Refusing to create a user while the local admin flag is off. |
Run pnpm user with CUTTLELY_LOCAL_ADMIN=true. |
| Stored credentials stop working | The server is using a different encryption.key. Point SECRETKEY_PATH at the folder that holds the original key. |


