coral: the Docker image with the Coral server. It includes the runtime, the provider configuration, the policies, the authentication server and the MCP server.coral-web: the Coral UI, where you and your team manage Coral.
Before you start
- An OIDC identity provider. Self-hosted Coral uses your own identity provider (IdP) to authenticate users. Any OIDC-compatible IdP works, such as Okta, Google Workspace or WorkOS. Configure an application for Coral at your IdP.
- A database. Coral supports SQLite and Postgres. SQLite is the default. Choose the one that fits your setup. Postgres needs the pgvector extension for semantic search.
- TLS termination. Coral requires TLS for user-facing connections, but Coral does not provide TLS itself. Use your preferred reverse proxy, such as nginx or Envoy. If you have none, use Caddy.
- Public endpoints. Coral uses three endpoints that your users’ systems must be able to reach.
<coral-host>is the placeholder for the root domain of your Coral deployment:<coral-host>: the URL of the Coral UI (coral-web).auth.<coral-host>: the auth endpoint.coral-weband the MCP server use it to authenticate users.mcp.<coral-host>: the MCP server endpoint.
Semantic search
Semantic search finds tools by what a query means, not only by its words. A model in the Coral process compares the meaning of a query with the text of each tool. No text goes out of your deployment. Semantic search is on by default. To turn it off, setsemantic_search_enabled = false in [search]. Restart Coral after you change the setting. See the configuration reference.
Postgres needs pgvector
With Postgres, semantic search needs the pgvector extension, version 0.7 or later. With SQLite, you do not need to do anything. Before you upgrade Coral on Postgres, install pgvector or turn the setting off. At startup, Coral creates thevector extension when pgvector is installed and Coral’s database role may create it: a superuser, or the master user on Amazon RDS. If the extension is not available, Coral does not start and reports an error such as:
- Install pgvector 0.7 or later on your Postgres server. Then, as a superuser, run
CREATE EXTENSION vector;in Coral’s database. Use a schema on the search path of Coral’s database role. - Set
semantic_search_enabled = falsein[search]. Coral then does not check for pgvector.
The model
Theghcr.io/withcoral/coral image holds the model, so Coral does not download it.
Without the image, Coral looks for model.onnx and tokenizer.json in these folders, in this order:
/opt/coral/models/bge-small-en-v1.5/. Coral looks here on Linux only.models/bge-small-en-v1.5/in Coral’s configuration folder.
[outbound] policy applies, so the host must reach GitHub. Then Coral tries to delete the other folders in models. Until the files are ready, search matches by words only.
If Coral cannot read a model file, it reports the file and does not download. If a downloaded file is not correct, Coral tries again at its next start.
A host without network access cannot download the files. On such a host, do one of these steps:
- Download
model.onnxandtokenizer.jsonfrom the model release. Put both files in one of the folders above. - Set
semantic_search_enabled = falsein[search].
Coral search model ready in <folder>.
Cost
- Memory. The Coral process uses up to about 360 MiB more memory while it embeds tools on one thread. Each thread after the first loads one more copy of the model and uses up to about 200 MiB more.
- CPU. By default, Coral embeds tools on one background thread at low priority. All workspaces share this thread. On a host with idle cores, set
embedder_coresin[search]to the number of threads. The default is1. More threads embed faster, but not in proportion. In a measurement of the model alone on an Apple M4 Pro, 4 threads embed about 3 times as many tools a second as 1 thread, and 8 threads about 4.9 times as many. Search requests still go before the tools that wait. - Time. A new provider matches by words only until Coral embeds its tools. A provider with about 20,000 tools takes about 12 minutes on one x86 vCPU. Ten such providers take about two hours. When you change a provider, Coral embeds only the tools whose text changed, and those tools match by words only until then. The other tools keep their vectors while Coral still stores the provider’s previous version. A background pass removes that version every
reconcile_interval_seconds(5 minutes by default), so when Coral is busy embedding other tools, it can embed unchanged tools again. Vectors from an earlier Coral version do not record their text, so the first change after an upgrade embeds all the tools of the provider again. - Database. In Postgres, the vectors of 20,000 tools use about 26 MB. Search is fast while the database server keeps them in memory.
- Disk. The model files use about 133 MB.
Older CPUs
On an x86-64 CPU, semantic search needs the x86-64-v3 features, such as AVX2. On an older CPU, Coral starts and does not download the model. Search matches by words only. To examine a Linux host with glibc 2.33 or later, run/lib64/ld-linux-x86-64.so.2 --help. The CPU has the features when the output shows x86-64-v3 (supported, searched).
Rosetta, which runs linux/amd64 containers on Apple Silicon Macs, does not have these features.
Upgrade Coral
Coral updates its own database when a new version starts. You don’t run a separate migration step. To upgrade:- Read the release notes for the versions between yours and the new one.
- Back up Coral’s state:
- SQLite. Stop Coral, then copy the volume mounted at
/var/lib/coral. It holds the database and the credentials key. - Postgres. Take a dump or a snapshot of the database. Keep the value of
CORAL_CREDENTIALS_KEYwith it.
- SQLite. Stop Coral, then copy the volume mounted at
- Start the new
coralandcoral-webimages. Upgrade both to the same version.
Upgrade from Coral 0.x
Coral 1.0 is a rewrite from the ground up. Your agents now write TypeScript programs that call your providers. In 0.x, they ran SQL queries over sources. You now manage Coral in the Coral UI, where 0.x usedcoral commands. Your agents now connect to the MCP server over HTTP, where 0.x used stdio.
So 1.0 is a breaking change. It starts from fresh state and doesn’t convert what 0.x stored. Your 0.x setup stays as it is until you’re ready to switch.
The Coral 1.0 runtime stops when it starts on a configuration folder or a database that an earlier version wrote. It reports an error such as:
config.toml there.
To start Coral 1.0:
- Stop the old Coral. Copy its configuration folder, or its volume, and keep the copy for as long as you need it.
- Give Coral 1.0 fresh state. Set
CORAL_CONFIG_DIRto an empty folder or, in containers, mount a new volume. With Postgres, point Coral at an empty database. - Write a new configuration from the configuration reference, or follow one of the guides below. Coral 1.0 rejects a 0.x configuration file.
- Start Coral, then add your providers and connect your accounts again.
- Point your agents’ MCP clients at the new MCP endpoint.