Generate Deploy Token
A deploy token is a unique string that is used for authenticating and for storing the deploy information. It can be generated using the CLI tool,
Steps to generate a deploy token
To open the CLI, run the following command:
Then select the option “Generate a Deploy Token” and press enter. After that the wizard tries to connect to the Docker daemon and fetches a list of all containers running on the server. If the connection is successful, you will see a list of containers with their names and IDs. Select the containers you want to deploy by pressing space and press enter to continue.
After selecting the container(s), you will be asked if the deploy token should expire after a certain time. If you select yes, you will be asked to enter the lifetime of the token.
In the next step, you will be asked to select the action to perform when deploying the container(s). You can choose between the following options:
- Pull and recreate: Pulls the latest image and recreates the container.
- Recreate: Recreates the container without pulling the latest image.
- Restart: Restarts the container.
The last step is to decide whether the old image should be removed after pulling a new one, if the action is “Pull and recreate”.
You successfully generated a deploy token 🥳. The token will be printed to the console and you can copy it to your clipboard.
Technical Details
The deploy tokens are generated using PASETO (Platform-Agnostic Security Tokens) which is a specification for secure stateless tokens. The payload is signed using the secret key. While writing this documentation, the token contains the following information: