# How do I create and manage access tokens?

> Create read-only or read/write tokens for your Phluit container registry, choose when they expire, copy them once, and delete a token to revoke its access.

Source: https://docs.phluit.com/products/container-registry/registry-access-tokens/

Every push and pull needs a token. Each token works for **one registry only** and is either:

-   **Read only (pull):** for servers, clusters and anything that only downloads images.
-   **Read and write (push and pull):** for your CI or your own computer.

A token has a **user name**, which starts with `robot$`, and a **token** (the password).

## Create a token

1.  Open your registry's page and the **Access tokens** tab.
2.  **Name:** a label that tells you where it's used, such as CI pipeline.
3.  **Access:** **Read only (pull)** or **Read and write (push and pull)**.
4.  **Expires:** in 30 days, in 90 days, in 1 year, or never.
5.  Click **Create token**.
6.  **Copy the user name and the token now.** The token is shown only once. Then click **I saved it**.

If you lose a token, create a new one and delete the old one.

## The Primary token

A new registry comes with a **Primary token** that can push and pull and never expires. Click **Show token (once)** to see it. That button works once, and only within 7 days of creating the registry.

## Revoke a token

On the **Access tokens** tab, click **Delete** next to the token and confirm. It stops working at once: anything using it can no longer push or pull. Your other tokens keep working.

## Good to know

-   The tab shows each token's name, user name, access, and when it expires.
-   Your plan sets how many tokens a registry can have; the tab shows how many you use. To create another one when you're at the limit, delete one first, or move to a bigger plan.
-   Use read-only tokens wherever you can. If a read-only token leaks, nobody can change your images with it.
-   When a registry is suspended or cancelled, all its tokens are switched off. See [How do I change my registry plan or cancel it?](/products/container-registry/registry-change-plan-or-cancel/)
-   Keep tokens out of your code. Store them as secrets in your CI, or in a file only you can read.
