# Avoid creating new action runner token after each update

**URL:** <https://forum.gitea.com/t/avoid-creating-new-action-runner-token-after-each-update/7641>\
**Category:** Actions\
**Created:** [July 28, 2023, 10:32am UTC](https://forum.gitea.com/t/avoid-creating-new-action-runner-token-after-each-update/7641 "2023-07-28T10:32:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zoker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/zoker/32/5242_2.png) [@Zoker](https://forum.gitea.com/u/Zoker)\
**Post date:** [July 28, 2023, 10:32am UTC](https://forum.gitea.com/t/avoid-creating-new-action-runner-token-after-each-update/7641/1 "2023-07-28T10:32:26Z")

</div>

Hi there,

Everytime I update my gitea act runner, the runner can’t connect to the gitea instance anymore, because the token has already been used. How can I avoid to create a new token on every update of the act runner?

I use docker compose to run the runner:

```auto
version: '3.8'
services:
  gitea_runner:
    image: gitea/act_runner
    container_name: GiteaRunner
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - GITEA_RUNNER_NAME=Gitea Runner
      - GITEA_INSTANCE_URL=<my-url>
      - GITEA_RUNNER_REGISTRATION_TOKEN=<my-token>

```

Thanks!

---

<div class="post-metadata">

**Author:** ![Zoker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/zoker/32/5242_2.png) [@Zoker](https://forum.gitea.com/u/Zoker)\
**Post date:** [August 3, 2023, 12:12pm UTC](https://forum.gitea.com/t/avoid-creating-new-action-runner-token-after-each-update/7641/2 "2023-08-03T12:12:42Z")

</div>

If anyone has the same issue, this little line added to the compose file fixes the issue:

```auto
version: '3.8'
services:
  gitea_runner:
    image: gitea/act_runner
    container_name: GiteaRunner
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - gitea-runner-data:/data <--------- This line here
    environment:
      - GITEA_RUNNER_NAME=Gitea Runner
      - GITEA_INSTANCE_URL=<my-url>
      - GITEA_RUNNER_REGISTRATION_TOKEN=<my-token>

```

There is a `.runner` file within the /data/ folder of the runner, which keeps all the relevant information about the registration. It says in the header of the runner:

```auto
  "WARNING": "This file is automatically generated by act-runner. Do not edit it manually unless you know what you are doing. Removing this file will cause act runner to re-register as a new runner.",

```
