Skip to content

Conversation

@RonanCodes
Copy link

Problem

When cookies are copied manually to a headless server (e.g., via scp from a machine where spogo auth import was run), spogo fails with "no cookies found".

This happens because cookieSource() only uses FileSource if CookiePath is explicitly set in the config. On a headless server without browser access, users need to manually create a config file with the exact TOML keys — which is non-obvious.

Solution

Check for cookies at the default path (ResolveCookiePath()) even when not explicitly configured. This enables a simpler headless setup:

  1. Run spogo auth import on a machine with browser
  2. Copy the cookies file to the headless server: scp ~/Library/Application\ Support/spogo/cookies/default.json server:~/.config/spogo/cookies/
  3. It just works ✨

Use Cases

  • AI assistants (OpenClaw, etc.) running on VPS/cloud servers
  • Raspberry Pi and home server setups
  • Any headless Linux environment

Changes

  • Modified cookieSource() in internal/app/context.go to check default cookie path before falling back to browser
  • All existing tests pass
  • Zero breaking changes

Testing

Tested on Ubuntu headless server:

  • Before: spogo status → "no cookies found"
  • After: spogo status → works with copied cookies

When cookies are copied manually to a headless server (e.g., via scp),
spogo would fail with 'no cookies found' because it only checks the
cookie file path if explicitly set in config.

This change makes cookieSource() check for cookies at the default path
even without config, enabling a simpler setup workflow:

1. Run 'spogo auth import' on a machine with browser
2. Copy cookies file to headless server
3. It just works (no config needed)

This is particularly useful for:
- AI assistants running on VPS/cloud servers
- Raspberry Pi and home server setups
- Any headless Linux environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant