# Publish packs

You can publish your own packs to the Dryv pack registry, under a namespace such as `@you`. A pack is **public**, so anyone can find and install it, or **private**, so only people with access to the namespace can use it.

Publishing needs a Dryv account. Building and testing a pack does not. See [Test and publish](/pack-builders/test-and-publish) for the checks to run first.

## 1. Create a namespace

1. Sign in at [app.dryvcode.com](https://app.dryvcode.com).
2. Open **Settings → Pack namespaces**.
3. Choose **Create a namespace**. Use lowercase letters, numbers and hyphens, starting with a letter or number.

You can move a namespace to another account or to an organization from the same page. The other side accepts it under **Incoming**.

## 2. Package the pack

Make an archive of the pack folder with `dryv.pack.yaml` and `README.md` at its root.

```bash
tar -czf clinic-pack.tar.gz -C path/to/clinic-pack .
```

The archive must be a `.tar.gz` or `.tgz` file of 48 MiB or less.

## 3. Release it

1. Open **Packs → Release a pack** (`/packs/release`).
2. Choose the namespace under **Publish under** and enter the pack name.
3. Under **Who can use it**, choose **Private** or **Public**.
4. Upload the archive and add release notes.
5. Choose **Check the release**. The registry reads the manifest, checks it and lists every file it will publish.
6. Review the list, then choose **Publish private** or **Publish public**.

Nothing is published until you confirm.

## Use a published pack

Find packs at [packs.dryvcode.com](https://packs.dryvcode.com), or with `dryv pack search`. Add one to a project by its package name in `dryv.yaml`:

```yaml title="dryv.yaml"
sources:
  packs:
    clinic:
      package: "@you/clinic-pack"
```

Add `version:` to pin a version. See [Find and use packs](/docs/usage/packs) for how to activate it.

## Use private packs

Public packs need no sign-in. To use a private pack, sign in first so the CLI can send your session to the registry:

```bash
dryv login
dryv validate
```

The CLI uses the registry at `https://api.dryvcode.com`. Set `DRYV_PLATFORM_URL` only to use another Platform address. See [Sign in and sync](/docs/guides/sync#sign-in-from-the-cli).

## Troubleshooting

**"Create a namespace first."** You have no namespace yet. Create one in **Settings → Pack namespaces**.

**"The archive is larger than 48 MiB."** Remove build output and dependencies from the pack folder and package it again.

**A private pack is not found from the CLI.** Run `dryv whoami`. If you are not signed in, or signed in to another Platform address, sign in again with the right `DRYV_PLATFORM_URL`. Check that your account has access to the namespace.
