Quickstart

Start Pratique on your own machine, send your first npm and pip installs through it, and see what a developer sees when a release is still in quarantine.

This quickstart runs Pratique on your own machine, on http://127.0.0.1:8484. It is for a trial. To run it for a team, with HTTPS and single sign-on, see install.

  1. Start Pratique

    Choose an admin token first and keep it in a variable. You sign in to the web UI with it. It must be at least 16 characters.

    bashchoose an admin token
    export PRATIQUE_ADMIN_TOKEN="$(openssl rand -hex 24)"
    echo "$PRATIQUE_ADMIN_TOKEN"

    Then start it with Docker. The container listens on all of its own addresses, so it needs to be told the address that clients use, PRATIQUE_PUBLIC_URL. Without it, Pratique does not start.

    bashrun with Docker
    docker run -d --name pratique -p 127.0.0.1:8484:8484 -v pratique:/data \
      -e PRATIQUE_ADMIN_TOKEN \
      -e PRATIQUE_PUBLIC_URL=http://127.0.0.1:8484 \
      ghcr.io/justpolidor/pratique:latest

    Or build it from source with Go. It then listens on 127.0.0.1:8484 and keeps its data in ./data.

    bashbuild and run from source
    go build -o pratique ./cmd/pratique
    ./pratique

    If you start it without PRATIQUE_ADMIN_TOKEN and without single sign-on, Pratique makes a new admin token on each run and prints it in its log.

  2. Sign in

    Open http://127.0.0.1:8484. Paste the token into Admin token and select Sign in. You see Overview, which is empty until a client installs something.

  3. Create an access token

    Package managers use an access token, so that each download is recorded against a person or a bot. Open Access tokens, give the token a name such as laptop, and select Create token.

    The page shows the token once, starting with prq_. Copy it now. Under Use it, the page also shows the npm, pip, uv, Composer and Go settings with your token filled in.

    Connecting without a token

    When you build from source, Pratique listens only on this machine, so clients can connect without a token. Their downloads then show as anonymous. The Docker container listens on all of its addresses, so there every client needs a token. See anonymous access.

  4. Point npm at Pratique

    Create a project folder, and add a .npmrc file to it. Use your own token in place of YOUR_TOKEN.

    ini.npmrc
    registry=http://127.0.0.1:8484/npm/
    //127.0.0.1:8484/npm/:_authToken=YOUR_TOKEN

    Connect clients in the web UI shows the same settings for this server. For pnpm, Yarn and more options, see npm, pnpm and Yarn. To set up every tool on a machine at once, use one-command setup instead.

  5. Point pip at Pratique

    pip reads the token from the index URL, as the password. On plain HTTP, pip also needs the host in trusted-host. Put this in pip.conf, or in pip.ini on Windows.

    inipip.conf
    [global]
    index-url = http://token:YOUR_TOKEN@127.0.0.1:8484/pypi/simple/
    trusted-host = 127.0.0.1

    Or write the same settings with pip itself:

    bashpip config
    pip config set global.index-url http://token:YOUR_TOKEN@127.0.0.1:8484/pypi/simple/
    pip config set global.trusted-host 127.0.0.1

    For uv and Poetry, see pip, uv and Poetry.

  6. Install something

    Install a package with each client.

    bashfirst installs
    npm install lodash
    python3 -m venv .venv && .venv/bin/pip install requests

    Both installs work as usual. Pratique fetched each file from the public registry, checked it, verified its hash, and delivered it.

  7. See what happened

    Overview now counts the decisions. Open Activity and select the Cleared tab. Each file you received is a row, with the package, the version, the address it came from, and who pulled it. A token that you made after signing in with the admin token shows as admin (laptop).

  8. See a held release

    New releases wait in quarantine for 7 days by default. To find a held release, install a few packages that publish often, then look at Quarantine queue on Overview, or open a package under Packages. Above the versions table, a line such as "A new install gets 4.2.0. The newest release, 4.3.0, is held until …" tells you which version a new install receives.

    A plain npm install of that package gets the newest cleared version and does not fail. If you ask for the held version by number, npm stops with a 403 error that says why:

    textend of npm's error output
    403 Forbidden - GET http://127.0.0.1:8484/npm/some-package/-/some-package-4.3.0.tgz - pratique: held some-package@4.3.0: in quarantine until 2026-12-08 09:15 UTC. To see why, or request an exception, open http://127.0.0.1:8484/packages/npm/some-package?version=4.3.0#why

    The link opens the package page at Why 4.3.0 is held, which lists every check and its result. From there, a developer can request an exception.

Next steps