MetorialDocs

Self-host Metorial with Docker Compose

Run the open-source Metorial Platform on your own machine or server with the Docker Compose file and run.sh script in the metorial-platform repository.

To self-host Metorial, clone the open-source Metorial Platform repository and run ./self-hosting/run.sh --host localhost --secret "$(openssl rand -hex 32)" from the repository root. The script builds the dashboard, starts the API and its backing services (PostgreSQL, Redis, MongoDB, Meilisearch, MinIO, OpenSearch, and etcd) with Docker Compose, and serves the dashboard on port 3300. You need Docker with Compose, at least 8 GB of RAM, about 20 GB of disk, and Node.js, npm, and Bun for the frontend build.

What you'll learn

  • What the self-hosted stack contains
  • How to start, check, and stop it
  • What to change before you expose it to anyone

Before you start

Important

The repository's self-hosting setup is aimed at running and evaluating the open-source platform. For production deployments with strict compliance needs, Metorial offers on-prem hosting with dedicated support and SLAs.

What runs

ServiceImage or sourceHost ports
API (core, MCP, marketplace, OAuth, private, portals, integrations, ID)ghcr.io/metorial/metorial-api:dev4310 to 4316, 4321
PostgreSQLpostgres:latest35432
Redisredis:latest36379
MongoDBmongo:latest32707
Meilisearchgetmeili/meilisearch:v1.1437700
MinIOminio/minio:latest9000, 9001 (console)
OpenSearch and OpenSearch Dashboardsopensearchproject/opensearch:2.18.09200, 9600, 5601
etcdbitnamilegacy/etcd:latest32379, 32380
Dashboard and MCP InspectorBuilt from source by run.sh3300, 6050

Start Metorial

Clone the repository

git clone https://github.com/metorial/metorial-platform.git
cd metorial-platform

Run the setup script

./self-hosting/run.sh --host localhost --secret "$(openssl rand -hex 32)"

The script installs frontend dependencies, generates the Prisma client, builds the dashboard and the MCP Inspector, writes self-hosting/.env, pulls the images, runs docker compose up -d, and starts two small web servers for the frontends.

Open the dashboard

Open http://localhost:3300 and create an account. The MCP Inspector runs on http://localhost:6050, and the core API on http://localhost:4310.

Connect a first integration

Configure an MCP server or integration in the dashboard, then try its tools in the Explorer. See Integrations and the SDK quickstart.

Script options

OptionWhat it does
--host, -hHostname for the deployment, for example localhost or mydomain.com (required)
--secret, -sSecret for encryption and auth tokens (required)
--env, -eproduction (default) or development
--email-host, --email-port, --email-user, --email-pass, --email-fromSMTP settings for outgoing email
--skip-build, --skip-backend, --skip-serveSkip the frontend build, the Docker services, or the web servers
--status, --logs, --stopShow status, follow logs, or stop everything

You can also set METORIAL_HOST and METORIAL_SECRET as environment variables instead of passing flags.

Manage the stack

./self-hosting/run.sh --status
./self-hosting/run.sh --logs
./self-hosting/run.sh --stop

To work with the containers directly, use the compose file:

docker compose -f ./self-hosting/docker-compose.yml ps
docker compose -f ./self-hosting/docker-compose.yml logs api
docker compose -f ./self-hosting/docker-compose.yml restart api

Data lives in named Docker volumes: postgres_data, mongodb_data, redis_data, meilisearch_data, minio_data, and opensearch_data. Back them up regularly. docker compose down -v deletes them.

Before you expose it

The compose file is set up for a local machine. Before anyone else uses it:

  1. Replace the default credentials in docker-compose.yml: PostgreSQL postgres/postgres, MongoDB mongo/mongo, MinIO minio/minio123, and OpenSearch admin/admin.
  2. Turn on OpenSearch security. The compose file sets DISABLE_SECURITY_PLUGIN=true.
  3. Use a strong, unique --secret. It is used for encryption and auth tokens.
  4. Put a reverse proxy with TLS in front of the dashboard and API ports, and stop publishing database ports to the host.
  5. Set resource limits, schedule backups, and consider managed databases.
  6. Pin image tags instead of latest and dev, and update them for security patches.

Troubleshooting

Services do not start

Check the logs of the API with docker compose -f ./self-hosting/docker-compose.yml logs api.

The API cannot reach the database

PostgreSQL may not have finished starting. Restart the API service once PostgreSQL is up.

A port is already in use

Change the host port in self-hosting/docker-compose.yml, and update the matching URL environment variables of the API service.

Containers crash or run slowly

Give Docker more memory. The stack needs at least 8 GB of RAM.

FAQ

Is Metorial really open source?

Yes. The platform code is on GitHub at metorial/metorial-platform under the Functional Source License (FSL-1.1-ALv2), which converts to Apache 2.0 two years after each release. The integration catalog in metorial/metorial is Apache 2.0, and so is the Outpost proxy.

Is the self-hosted version the same as the hosted platform?

It is built from the same platform repository, but the hosted platform includes managed infrastructure and operations. Ask Metorial which features your deployment needs before choosing between self-hosting, on-prem hosting, and the hosted platform.

Do we have to self-host to keep data in our network?

No. An Outpost keeps MCP traffic inspection and redaction in your network while you use the hosted platform, and the None retention level stops Metorial from storing message data.

What does self-hosting cost?

The code is free to run. You pay for your own infrastructure. For hosted and on-prem plans, see pricing.

To see which other MCP gateways can be self-hosted and under what license, see Self-hosted and open-source MCP gateways in the MCP gateway comparison.