> For the complete documentation index, see [llms.txt](https://docs.onepub.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onepub.dev/guides/publishing-packages/the-hard-way.md).

# The hard way

Instead of using the `onepub pub private` command to make a package private you can  achieve the same objective by manually adding the `publish_to` key to your `pubspec.yaml`.

{% hint style="info" %}
There is no advantage to doing it the hard way. We provide these details so you fully understand what the `onepub pub private` command is doing.
{% endhint %}

Find your organisation's publish\_to URL on your OnePub profile page:

![](https://2164893338-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJazaE7yAHIXZjE9ucSqu%2Fuploads%2FshmeJFU6TjVGkF3sDUau%2Fimage.png?alt=media\&token=a48dd51a-e485-4fef-ab98-5a01e1398553)

Edit the pubspec.yaml of the package you wish to publish and add the `publish_to` keyword:

```yaml
name: mypackage
description: A simple command-line application.
version: 1.0.0
publish_to: https://onepub.dev/api/xxxxxxxx
```

To publish the package, login into OnePub (if you haven't already) then run the dart (or flutter) publish command.

```bash
onepub login
cd mypackage
dart pub publish
```
