---
title: "Self-hosted marketplace"
description: "Run your own plugin marketplace: a static index.json next to the packages, built and maintained with openidea-plugin."
---
A marketplace is **static**: an `index.json` and the packages next to it, served from any web server or read from a folder. There is no server software to run. The index lists publishers and their public keys, the plugins with their package digests, and revocations.
## Build an index
Put your signed packages in a folder and let `index` write `index.json` for them:
```sh
openidea-plugin pack plugins/acme-tools --key acme.key --publisher acme --out market/acme.tools-1.0.0.oiplugin
openidea-plugin index market/ --publisher acme --name "ACME" --key acme.key
```
With `--publisher`, `--name` and `--key`, `index`:
- registers (or updates) the publisher `acme` with that key's public key;
- lists every `.oiplugin` in the folder as that publisher's plugins, checking each package's signature, manifest and component;
- keeps that publisher's earlier versions that older IDEs still need, and drops plugins no longer in the folder;
- keeps the other publishers, their plugins and the revocations already in the index.
Without a key, `index` lists every package in the folder, each checked against the publishers the index already has. A package from a publisher the index doesn't know is refused.
| Option | Meaning |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `--out FILE` | Write the index somewhere other than `
/index.json` |
| `--download-base URL` | Write absolute download URLs (`/`), so each version stays where it was first published |
| `--previous-key F` | The publisher's earlier key, which endorses the new `--key` (see [key rotation](/en/plugins/publishing/policy#key-rotation)) |
`index` refuses to rewrite an index in a newer format than the tool writes; update `openidea-plugin` first.
## Merge another index
```sh
openidea-plugin merge market/index.json https://github.com/l0ng-ai/openidea/releases/latest/download/plugins-index.json --keep acme
```
`merge` replaces every publisher in your index except `--keep` with the publishers, plugins and revocations of the other index (a path or URL), and makes their download links absolute. This is how OpenIDEA's own release index takes in the community registry. Use it to offer the official and community plugins next to your own. `--out FILE` writes the result elsewhere.
## Point the IDE at it
In **Settings › Plugins**, open the gear menu and choose **Plugin Repository…**. Enter the **Marketplace index URL** (`https://…/index.json` or a folder path); leave it empty to go back to the default repository. The **Marketplace** tab then lists your index.
The IDE reads one index. If you want users to keep seeing the official plugins, merge the official index into yours.
Release builds of OpenIDEA pin the official publisher's key. Plugins named `openidea.*` must be signed with it, or
with a key it endorsed, whatever keys your index lists for `openidea`.
## Index format
```json
{
"format": 1,
"publishers": [
{
"id": "acme",
"name": "ACME",
"keys": [{ "key": "" }, { "key": "", "revoked": false }]
}
],
"plugins": [
{
"id": "acme.tools",
"name": "ACME Tools",
"version": "1.0.0",
"description": "…",
"authors": ["ACME"],
"publisher": "acme",
"download": "acme.tools-1.0.0.oiplugin",
"digest": "",
"capabilities": ["project.read"],
"engine": "^1.0, ^1.4",
"categories": ["tools"],
"icon": { "light": "