Hello! I am trying to run Drone CI server and runner on the Synology NAS using Docker. I have a public IP associated with my NAS server. The Drone CI is not accessible from outside when I run the Drone CI server in Docker on host network. The Gitea is also running on the same instance in the same network and I can access it from my public IP + port 3000.
If I run runner then I have the following error:
time=“2023-04-27T21:38:48Z” level=error msg=“cannot ping the remote server” error=“Post "public-ip:3001/rpc/v2/ping": dial tcp public-ip:3001: connect: connection refused”.
I replaced my actual public IP address with a placeholder in the example.
Here is my docker command for Drone CI server:
docker run
–volume=/var/lib/drone:/data
–env=DRONE_GITEA_SERVER=public-ip:3000/
–env=DRONE_GITEA_CLIENT_ID=client_id
–env=DRONE_GITEA_CLIENT_SECRET=client_secret
–env=DRONE_RPC_SECRET=secret
–env=DRONE_SERVER_HOST=public-ip:3001
–env=DRONE_SERVER_PORT=3001
–env=DRONE_SERVER_PROTO=http
–env=DRONE_TLS_AUTOCERT=false
–restart=always
–detach=true
–name=drone
–network=host
drone/drone:2
And runner command:
docker run --detach
–volume=/var/run/docker.sock:/var/run/docker.sock
–env=DRONE_RPC_PROTO=http
–env=DRONE_RPC_HOST=public-ip:3001
–env=DRONE_RPC_SECRET=secret
–env=DRONE_RUNNER_CAPACITY=2
–env=DRONE_RUNNER_NAME=drone-runner-1
–restart=always
–name=runner
–network=host
drone/drone-runner-docker:1
Output from Drone CI server:
{“acme”:false,“host”:“public-ip:3001”,“level”:“info”,“msg”:“starting the http server”,“port”:“:80”,“proto”:“http”,“time”:“2023-04-27T21:33:48Z”,“url”:“public-ip:3001”}
{“interval”:“30m0s”,“level”:“info”,“msg”:“starting the cron scheduler”,“time”:“2023-04-27T21:33:48Z”}
{“interval”:“24h0m0s”,“level”:“info”,“msg”:“starting the zombie build reaper”,“time”:“2023-04-27T21:33:48Z”}
Tried to execute curl command from the host and there was “connection refused”. If I run the Dron CI server with host of server’s private IP address then curl works.
What should be changed or added to access Drone CI from outside? There are no firewall rules set that block 3001 port and no other services use this port.