openfabriq
Deployment

Coolify

Run the engine on your own Coolify. One prompt sets it up through Coolify's API, or follow the steps by hand.

Coolify deploys the engine's docker-compose.yml straight from the repository: nothing to install on the server. It is the Docker setup, with Coolify running docker compose up.

Deploy

Paste a prompt in Claude Code, on your computer: it sets the engine up through Coolify's API. Two steps come first.

Turn the API on and make a token

In Coolify:

  1. Open Settings › Advanced and switch on API Access.
  2. Go back to the main menu: Settings hides it. Under Manage, open Keys & Tokens.
  3. In API tokens, create a token with the abilities read, write, deploy and read:sensitive (the last one is for the logs), and not root.

Put the credentials in your terminal

In the terminal window where you will start Claude Code:

export COOLIFY_URL=https://coolify.example.com   # your Coolify's address
export COOLIFY_TOKEN=…   # the API token created at step 1
export GITHUB_APP_ID=…  GITHUB_APP_PRIVATE_KEY=…   # your team's GitHub App, from `openfabriq connect github`
# or, instead of the app, a classic token of the factory's GitHub account:
# export GH_TOKEN=ghp_…
export ANTHROPIC_API_KEY=…  # or CLAUDE_CODE_OAUTH_TOKEN, from `claude setup-token`
claude

To create the app, see The GitHub App, and a token instead, A token instead of the app. The variables are described under Configuration.

The prompt tells Claude to use them by name and never to print them: they stay in this window and out of the conversation. Close the window afterwards, and delete the Coolify token once the deployment works.

Paste the prompt

Let Claude Code set it up on your Coolify. Paste one prompt into Claude Code on your computer: it creates the application through Coolify's API, adds its variables and deploys it. Your credentials stay in your terminal's environment: it never prints them.

Read the prompt
Install the openfabriq engine on my Coolify, through Coolify's API. openfabriq runs AI agents described in an openfabriq/ folder of GitHub repositories; the engine is one Docker Compose application, built from this repository: https://github.com/openfabriq/openfabriq

Go step by step. Coolify's address is in $COOLIFY_URL and its API token in $COOLIFY_TOKEN; the Claude and GitHub credentials are in $ANTHROPIC_API_KEY (or $CLAUDE_CODE_OAUTH_TOKEN) and $GITHUB_APP_ID and $GITHUB_APP_PRIVATE_KEY, my team's GitHub App (or $GH_TOKEN, a token, without an app). Use them only by name inside commands (curl, jq --arg): never print them, never write them to a file, never put their value in a command or in this conversation, and never run env or printenv. Never change or delete anything in Coolify that you did not create in this session. When something is missing or fails, tell me what and stop.

1. Check that those variables are set (print only "set" or "not set"). Then call `GET $COOLIFY_URL/api/v1/version` with the token as a bearer. A 401 or 403 means that API access is off in Coolify, or that the token lacks the abilities read, write, deploy and read:sensitive: tell me and stop.

2. Ask me, in one message: which GitHub repositories the engine runs (owner/name, comma-separated; each needs an openfabriq/ folder on its default branch); only without a GitHub App, what name and email the factory's commits carry (a bot name makes it clear; the app's commits carry its name); and what Coolify should call the application. Then list the servers (`GET /servers`), the projects (`GET /projects`) and the project's environments, and ask me which to use, unless there is only one.

3. Create the application from https://github.com/openfabriq/openfabriq, branch main, build pack dockercompose, Docker Compose location /docker-compose.yml, base directory /, without instant_deploy and without a domain. If the repository is public: `POST /applications/public`. If it is private, list `GET /github-apps` and `GET /security/keys`, ask me which to use, then `POST /applications/private-github-app` or `POST /applications/private-deploy-key`. If the deployment then fails with "Repository not found" with a deploy key, the GitHub organization may forbid deploy keys (its Settings, Deploy keys): tell me, and stop. The fields are in https://coolify.io/docs/api.

4. Add the environment variables to that application (`POST /applications/{uuid}/envs`, or `PATCH /applications/{uuid}/envs/bulk`): OPENFABRIQ_REPOSITORIES, and without a GitHub App GIT_USER_NAME and GIT_USER_EMAIL, from my answers, and the secrets GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY (or GH_TOKEN) and ANTHROPIC_API_KEY (or CLAUDE_CODE_OAUTH_TOKEN), whose value comes from the variable of the same name through `jq --arg`. Mark the secrets as hidden after creation if the API allows it. Then list the variables (`GET /applications/{uuid}/envs`) and tell me which names are there, never their values.

5. Deploy (`POST /deploy` with the application's uuid; the call is in the API documentation), follow `GET /deployments/{deployment_uuid}` until it ends, then read `GET /applications/{uuid}/logs`. Report each line that starts with ✗ (it comes from `openfabriq doctor`, with its fix) and any "was not applied". Never show a line that contains a credential.

6. Finish with what runs, what is left for me, and nothing else. Left for me: if a factory's factory.yaml lists secrets, the API cannot give them to the engine; I run `openfabriq secret set <NAME> --project <owner/repo>` in the application's terminal in Coolify. Also the studio's password and domain, and the relay for Slack and Linear: both are in the documentation's Docker page.

It checks the API, asks which repositories the engine runs and which server, project and environment to use, creates the application, adds its variables, deploys, and reports what openfabriq doctor says in the logs. It only touches what it creates.

Configuration

The variables are Docker's, listed in Docker's configuration. In Coolify you set them under Environment Variables; the prompt sets them through the API.

To open the studio on a domain, see Open the studio: on Coolify, give the engine service the domain with the port, https://factory.example.com:4311. With that domain, Claude Desktop, claude.ai and Claude Code read the engine at https://factory.example.com/mcp: see Connect Claude.

What the compose file does not pass on

A factory's secrets, the ones its factory.yaml lists under secrets, are not variables of the compose file, so a variable added in Coolify does not reach the engine. Keep them in the engine's volume instead, from the application's terminal in Coolify:

openfabriq secret set FIGMA_TOKEN --project acme/web-app

On this page