Docker runner: "Cannot ping the Gitea instance server"

Hey all,

I’m trying to get runners up and running with my Docker-based Gitea instance, but I’m running into some problems that don’t seem to be documented anywhere - hoping for some help.

When I set a runner up, feeding it the token from the Runners page (I’ve tried instance and repo level) the runner logs indicate that it cannot connect to my instance.

level=error msg="Cannot ping the Gitea instance server" error="unavailable: parse \"\\\"https://gitea.<redacted>\\\"/api/actions/ping.v1.PingService/Ping\": invalid URI for request"

I’ve entered into the container shell with docker -it exec gitea sh and confirmed that it can connect to the base Gitea instance via ping and curl. This is both via the Docker IP address and via the reverse proxy route.

However, the actual URL that the runner is trying to connect to doesn’t seem to exist, both externally and when looking at the Swagger API. I read somewhere that this won’t be created until the runner is registered. But as I understand it the Docker-based runners are meant to attempt registration themselves, so I’m not sure where this would happen.

Is there something fundamental that I’m missing here?

Docker compose file below.

name: "gitea"
services:
  gitea:
    container_name: gitea
    ports:
      - "3000:3000"
      - "222:22"
    image: gitea/gitea:latest
    restart: unless-stopped
    env_file: .environment_vars
    healthcheck:
      test: ["CMD", "curl", "-f", "gitea.<redacted>"]
      interval: 10s
      retries: 3
      start_period: 30s
      timeout: 10s
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.gitea.rule=Host(`gitea.<redacted>`)"
      - "traefik.http.routers.gitea.tls=true"
      - "traefik.http.routers.gitea.tls.certresolver=letsencrypt"
      - "traefik.http.services.gitea.loadbalancer.server.port=3000"
    volumes:
      - "/fastpool/compositions/gitea/config/gitea:/data"
      - /etc/localtime:/etc/localtime:ro
    networks:
      - "guineanet"

  runner01:
    image: gitea/act_runner:latest
    container_name: runner01
    restart: unless-stopped
    privileged: true
    depends_on:
      gitea:
        condition: service_healthy
        restart: true
    volumes:
      - "/fastpool/compositions/gitea/config/runners:/data"
      - "/fastpool/compositions/gitea/config/runners/config.yaml:/config.yaml"
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - GITEA_RUNNER_LOG_LEVEL="trace"
      - GITEA_INSTANCE_URL="https://gitea.<redacted>"
      - GITEA_RUNNER_REGISTRATION_TOKEN="<redacted>"
      - GITEA_RUNNER_JOB_CONTAINER_NETWORK="guineanet"
    networks:
      - "guineanet"

networks:
  "guineanet":
    external: true