# Private Pub > Private Pub is a private pub package repository for Dart and Flutter at https://private-pub.dev. It hosts private packages, mirrors pub.dev and speaks the pub.dev API, so dart pub works with it once it has a token. - Sign in at https://private-pub.dev and create a token at https://private-pub.dev/account, then run `dart pub token add https://private-pub.dev` and paste it. The token is only shown once. - Add a private package with `dart pub add 'package_name:{"hosted":"https://private-pub.dev"}'`. In a Flutter app, run `flutter pub add` instead. - Publish a package by setting `publish_to: https://private-pub.dev` in its pubspec.yaml and running `dart pub publish`. It needs a description, a README.md and a LICENSE. - Set `PUB_HOSTED_URL=https://private-pub.dev` to get every package through this server, pub.dev packages included. - Private packages belong to a team. Everyone not on it gets a 404, as if the package didn't exist. Teams are managed on the website at https://private-pub.dev/teams, not through the API. - CI should use a service account, not a person's token. Create one at https://private-pub.dev/service-accounts, add it to the teams it needs as a reader or a writer, and save a token that starts with `sa_`. Add it with `dart pub token add https://private-pub.dev --env-var PRIVATE_PUB_TOKEN`. A team key still works for one team, and its token starts with `team_`. - The package pages on this site need a signed in browser. Agents should use dart pub, or the API with a token, instead. - Each team is on a plan. Free allows up to 10 packages and archives up to 100 MB. Premium costs $10 a month or $100 a year per team for unlimited packages and bigger archives. Owners upgrade a team on its page, not through the API. ## Docs - [Setup guide](https://private-pub.dev/docs/setup.md): Pointing dart pub, VS Code, Claude Code and other agents, GitHub Actions and Codemagic at this server. - [Teams](https://private-pub.dev/docs/teams.md): How teams share packages, their roles, invites, moving packages between teams, service accounts and team keys for CI. - [Package requirements](https://private-pub.dev/docs/package-requirements.md): What the server checks before it publishes a package, from the pubspec to rate limits. - [API guide](https://private-pub.dev/api.md): Finding, reading and managing packages over HTTP with a token. - [Overview](https://private-pub.dev/index.md): What this server is, what stays private and how it compares to other ways to share private packages. - [Changelog](https://private-pub.dev/changelog.md): What has shipped, newest first. - [Pricing](https://private-pub.dev/pricing.md): The Free and Premium plans for teams, what Premium costs and how paying for it with Stripe works. ## Optional - [Everything in one file](https://private-pub.dev/llms-full.txt): The overview, setup guide, teams guide, package requirements, API guide and changelog together. - [Custom package repositories](https://dart.dev/tools/pub/custom-package-repositories): How pub works with servers other than pub.dev. - [Hosted Pub Repository Specification](https://github.com/dart-lang/pub/blob/master/doc/repository-spec-v2.md): The API this server speaks.