Developers
Server tokens
Create the token that connects your servers and pulls the image from the piap registry.
Create a token
- Go to your Account at https://piap.io/app and open "Server tokens".
- Give it a name that identifies the fleet (for example "office-rack" or "cloud-gpu"). That name shows next to each server in My computers.
- Choose the scopes: "Download official images" (
pull) and "Connect computers" (computers). Connect computers asks you to agree to share compute, if you have not yet. - Choose the expiry: 7, 30, 90, 180 or 365 days, or no expiry.
- Copy the token. It is shown only once: keep it in your secrets manager.
Tokens start with piap_st_. piap does not store the token, only a fingerprint to validate it and its last 4 characters, so you can recognize it in the list. You can have up to 20 active tokens.
Scopes
| Scope | Allows |
|---|---|
pull | Pulling the official image and the Helm chart from the piap registry (docker login, helm registry login, image pull secrets on Kubernetes). |
computers | Connecting headless computers to your account (PIAP_TOKEN in the container). |
Use the least scope: a pull-only token for nodes or systems that only pull images (for example an internal mirror or your CI), and one token with computers per server fleet.
Expiry, rotation and revocation
- Revoking a token is immediate: servers connected with it are removed from My computers, their sessions end and their in-flight requests go back to the network with no penalty.
- An expired token does not renew sessions: servers that joined with it stop sharing when their current session ends.
- To rotate, create a new token, update the secret on your servers, restart them and revoke the old one.
If a token leaks, revoke it right away from the Account and create another.
Sign in to the piap registry
Load the token into an environment variable without leaving it in your shell history, and sign in to the registry with it. The username is free (token by convention) and the password is the token.
read -rs PIAP_TOKEN && export PIAP_TOKENecho "$PIAP_TOKEN" | docker login registry.piap.io -u token --password-stdinAccess grants from the registry last 15 minutes; Docker, containerd, Podman, Helm and cosign renew them on their own with the stored credential.