> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign Plugins for Third-Party Signature Verification

> Enable signed `.difypkg` installation in Dify Community Edition without disabling signature verification entirely (generate keys, sign packages, distribute the public key)

> [!WARNING]
>
> Third-party signature verification is a **Dify Community Edition** feature. Dify Cloud manages signatures centrally and does not expose these controls.

Self-hosted Dify enforces signature verification by default. Third-party signature verification lets administrators safely install plugins that are not on the Marketplace without disabling verification entirely.

Two scenarios:

> [card] Admin signs an approved plugin
>
> The admin reviews a `.difypkg` from a trusted developer and signs it with their own key before installing.

> [card] Developer ships a signed plugin
>
> The developer signs the `.difypkg` and publishes the matching public key. Admins who trust the developer add that public key to the verification list.

The mechanics are the same in both cases: generate a key pair, sign with the private key, verify with the public key.

## Generate a Key Pair

```bash theme={null}
dify signature generate -f your_key_pair
```

Two files appear in the current directory:

| File | Use |
| :- | :- |
| `your_key_pair.private.pem` | Sign plugins (keep secret) |
| `your_key_pair.public.pem` | Verify signatures (share publicly) |

> [!WARNING]
>
> Guard the private key. Anyone who has it can sign plugins that pass verification on installations trusting your public key.

## Sign and Verify a Plugin

**1. Sign the package**

```bash theme={null}
dify signature sign your_plugin_project.difypkg -p your_key_pair.private.pem
```

Produces `your_plugin_project.signed.difypkg` in the same directory.

**2. Verify the signed package**

```bash theme={null}
dify signature verify your_plugin_project.signed.difypkg -p your_key_pair.public.pem
```

Confirms the signature matches before you distribute or install.

> [!NOTE]
>
> If you omit `-p`, `dify signature verify` checks against the Dify Marketplace public key. Any plugin not signed by Dify will fail verification in that mode.

## Enable Verification on the Daemon

Admins install signed plugins by giving the plugin daemon a list of trusted public keys.

**1. Place the public key**

Put the `.public.pem` file somewhere the daemon container can reach it. For Docker Compose installs:

```bash theme={null}
mkdir -p docker/volumes/plugin_daemon/public_keys
cp your_key_pair.public.pem docker/volumes/plugin_daemon/public_keys/
```

**2. Configure the daemon environment**

Set these variables on the `plugin_daemon` service:

| Variable | Value |
| :- | :- |
| `FORCE_VERIFYING_SIGNATURE` | `true` |
| `THIRD_PARTY_SIGNATURE_VERIFICATION_ENABLED` | `true` |
| `THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS` | Comma-separated paths to public keys inside the container |

A `docker-compose.override.yaml` snippet:

```yaml theme={null}
services:
  plugin_daemon:
    environment:
      FORCE_VERIFYING_SIGNATURE: true
      THIRD_PARTY_SIGNATURE_VERIFICATION_ENABLED: true
      THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS: /app/storage/public_keys/your_key_pair.public.pem
```

> [!NOTE]
>
> `docker/volumes/plugin_daemon` mounts to `/app/storage` inside the container, so the path in `THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS` must use the in-container path.

**3. Restart Dify**

```bash theme={null}
cd docker
docker compose down
docker compose up -d
```

Verified installs are now enforced: signed `.difypkg` files matching the configured public keys install cleanly; unsigned or mismatched ones are rejected.

## Related Resources

* [Package as Local File and Share](https://enterprise-docs.dify.ai/en/3.13.x/develop/plugins/publishing/marketplace-listing/release-by-file.md)
* [Publish to Individual GitHub Repository](https://enterprise-docs.dify.ai/en/3.13.x/develop/plugins/publishing/marketplace-listing/release-to-individual-github-repo.md)
* [Plugin Development Guidelines](https://enterprise-docs.dify.ai/en/3.13.x/develop/plugins/publishing/standards/contributor-covenant-code-of-conduct.md)
* [Publishing FAQ](https://enterprise-docs.dify.ai/en/3.13.x/develop/plugins/publishing/faq/faq.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.