Hello,
By default, gogcli opens a browser locally and redirects the OAuth callback to 127.0.0.1:<port>. This works fine when running locally, but when OpenClaw is deployed on Zeabur, 127.0.0.1 refers to the container itself, where nothing is listening, resulting in a "Connection Refused" error.
gogcli has a built-in manual flow to solve this. Run the following command in the OpenClaw terminal on Zeabur:
gog auth add [email protected] --services user --manual
Steps:
- The CLI will print an authorization URL; please open it in your local browser.
- After completing the Google authorization, the browser will redirect to a URL like
127.0.0.1:<port>/oauth2/callback?code=...&state=... (the page where you saw the connection error).
- Ignore the error page and copy the complete URL from the address bar.
- Paste it back into the Zeabur terminal and press Enter to complete the authentication.
This is the officially recommended headless/remote server usage for gogcli. You can refer to the "Headless / remote server flows" section in the README:
https://github.com/steipete/gogcli#3-authorize-your-account
Additionally, please be aware that using third-party tools like gogcli to interact with Google accounts carries the risk of being flagged for suspicious activity, which could lead to account suspension. It is strongly recommended not to use your primary Google account; it is better to create a separate account specifically for gogcli to avoid risking your main account.
Give it a try and let me know if you have any questions.