Quick Start
This guide gets you from zero to a working private package repository in about 5 minutes. You will start the server with Docker, create your owner account through the web setup wizard, publish a package, and use it in another project.
Prerequisites
Start club
-
Clone the repository and enter the Docker directory
Terminal window git clone https://github.com/BirjuVachhani/club.gitcd club/docker -
Create the environment file
Terminal window cp .env.example .envEdit
.envand set the required values:Terminal window # Generate a secure JWT secret (must be at least 32 characters)JWT_SECRET=$(openssl rand -hex 32)cat > .env << EOFSERVER_URL=http://localhost:8080JWT_SECRET=$JWT_SECRETEOF -
Start the server
Terminal window docker compose up -dWait a few seconds for the container to start, then verify:
Terminal window curl http://localhost:8080/api/v1/healthYou should see:
{"status":"ok"} -
Grab the one-time setup code from the logs
On first startup, club prints a one-time setup code to the server logs. Find it with:
Terminal window docker compose logs club | grep -i "setup code"Copy this code. You will use it in the next step.
Create the owner account
club ships without any users. The first account is created through a one-shot web setup wizard, which is disabled automatically once it completes.
-
Open the setup page
Navigate to http://localhost:8080/setup in your browser.
-
Verify the setup code
Enter your email address and the one-time setup code from the logs, then submit. Verification is IP-pinned — only the same browser/IP can complete the second step.
-
Create your owner account
Fill in your display name and password (and confirm the password), then submit. The first user is created with the
ownerrole.
Login with the CLI
-
Install the club CLI
Terminal window curl -fsSL https://club.birju.dev/install.sh | bashInstalls
clubto~/.local/bin. Windows and manual-download options are in the CLI installation guide. -
Login to your server
Terminal window club login localhost:8080club loginaccepts a bare host.localhost,127.0.0.1, and0.0.0.0default tohttp://; everything else defaults tohttps://. A full URL likehttp://localhost:8080is accepted too — both forms map to the same credential.By default this opens your browser and runs an OAuth 2.0 Authorization Code flow with PKCE. Approve the request in the browser and the CLI receives a scoped personal access token automatically.
-
Configure dart pub to use your server
Terminal window club setupThis runs
dart pub token add http://localhost:8080behind the scenes, registering your credentials with the Dart SDK’s native token store. (club loginalready does this automatically;club setupis useful for switching to--env-varmode in CI.)
Publish a test package
-
Create a simple Dart package
Terminal window mkdir -p /tmp/hello_club && cd /tmp/hello_clubCreate
pubspec.yaml:name: hello_clubversion: 1.0.0description: A test package for club.publish_to: http://localhost:8080environment:sdk: ^3.0.0Create
lib/hello_club.dart:/// A friendly greeting from club.String greet(String name) => 'Hello, $name! Welcome to club.'; -
Publish the package
Terminal window dart pub publish --force -
Verify on the web UI
Open http://localhost:8080 in your browser. You should see
hello_clublisted on the packages page. Click it to see the full package detail page with metadata, the README, and installation instructions.
Use it in another project
-
Create a new Dart project
Terminal window mkdir -p /tmp/my_app && cd /tmp/my_appdart create -t console . -
Add the private package as a dependency
Edit
pubspec.yamland add:dependencies:hello_club:hosted: http://localhost:8080version: ^1.0.0 -
Fetch the dependency
Terminal window dart pub get -
Use the package
Edit
bin/my_app.dart:import 'package:hello_club/hello_club.dart';void main() {print(greet('Developer'));}Run it:
Terminal window dart runOutput:
Hello, Developer! Welcome to club.
What’s next
You now have a working private Dart package repository. Here is what to do next:
- Installation guide — explore all installation options in detail
- First Package guide — learn the full publishing workflow with troubleshooting tips
- Docker deployment — set up a production deployment with persistent volumes and health checks
- TLS / HTTPS — required for production;
dart pubwill not send auth tokens over plain HTTP to non-localhost URLs - Reverse proxy — put club behind Caddy or nginx for TLS termination