Skip to content

A Polestar-only instance without a Volvo application #99

Closed

Description

@vcanuel

An instance that reads only Polestars still needs a Volvo application to start: a self-hoster with a Polestar 3 reports that placeholder values work, but they had to find that out.

Today:

  • runsten-api requires RUNSTEN_VOLVO_CLIENT_ID, RUNSTEN_VOLVO_CLIENT_SECRET and RUNSTEN_VOLVO_REDIRECT_URI (loadConfig, cmd/runsten-api/main.go);
  • runsten-collector collect requires RUNSTEN_VOLVO_CLIENT_ID and RUNSTEN_VOLVO_CLIENT_SECRET;
  • compose.yaml refuses to start without RUNSTEN_VOLVO_CLIENT_ID and RUNSTEN_VOLVO_REDIRECT_URI (:?);
  • the installation guide starts with "Create your application on the Volvo developer portal first".

Wanted: the Volvo application is optional. Without it, the instance starts, the Connection page offers no Volvo ID connection (or says it is not configured), the collector reads the Polestars and skips nothing else, and the guide says a Polestar-only instance needs no Volvo application.

To settle:

  • RUNSTEN_VOLVO_REDIRECT_URI also gives the site's URL (siteURL) and makes the session cookie Secure when https. Without it, these need another source: a neutral RUNSTEN_PUBLIC_URL, with the redirect URI derived from it?

  • All three Volvo variables or none: a partial set stays a configuration error.

  • A Volvo ID connection already stored on an instance whose application is removed: not read, said on the Connection page.

  • API and collector start without the Volvo application

  • compose.yaml and .env.example

  • Connection page without Volvo

  • Installation guide and Polestar guide

Activity

  1. vcanuel commented on Oct 25, 2026

    @vcanuel
    ContributorAuthor

    Decided before starting:

    • No new variable: RUNSTEN_APP_URL (the web interface, already read) becomes the instance's address. Its scheme decides whether cookies are Secure; with a Volvo application, the redirect URI defaults to it + auth/volvo/callback. RUNSTEN_VOLVO_REDIRECT_URI stays, to set another; an instance with it alone works as today.
    • Required: RUNSTEN_APP_URL, unless RUNSTEN_VOLVO_REDIRECT_URI is set.
    • The Volvo application is all or nothing: client ID and secret together (the redirect URI derived or given); a partial set is a configuration error.
    • Without it, the collector neither reads the Volvo connections nor refreshes their tokens (Volvo would refuse a refresh by an unknown client, and the grants would be taken for lost); it logs it once. The API answers /auth/volvo/* and the application key's routes with "Volvo is not configured"; the connection settings tell it, and the web interface offers no Volvo.
    • One pull request.
  2. vcanuel commented on Oct 25, 2026

    @vcanuel
    ContributorAuthor

    runsten d2fd0b0, in #106: the Volvo application is optional. RUNSTEN_APP_URL is the address required (or the redirect URI alone, as before); the client ID and secret go together. Without them, the API refuses the Volvo ID flow and the key (volvo_not_configured, volvo: false), the collector calls nothing of Volvo, and the web interface offers the Polestar alone. Compose, .env.example and the docs follow. Checked on a Polestar-only stack.

  3. vcanuel commented on Oct 25, 2026

    @vcanuel
    ContributorAuthor

    runsten bc86c9b, in #106: a Volvo connected before, on an instance without the Volvo application, is told "Volvo not configured" (connection status not_configured) instead of "no Volvo key given". The pull request has before/after screenshots.

  4. vcanuel commented on Oct 25, 2026

    @vcanuel
    ContributorAuthor

    runsten dc267bd, in #106: RUNSTEN_APP_URL over plain http is accepted on a loopback host only, since its scheme decides whether the session cookie is Secure (review finding).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions