HappierDocs

Plans and limits

Configure retention and plan visibility on a self-hosted Happier server.

Your self-hosted server keeps its own data and sets its own limits. Happier Cloud plans do not change how your server stores sessions. The default retention policy keeps sessions and other retained records indefinitely.

Plan controls

The plans rollout adds the following settings. Use them on a server release that includes Plans & Supporter.

SettingWhat it controls
HAPPIER_PLANS__CONFIGThe server's plan definitions, limits and offers. Leave it unset if you do not configure named plans.
HAPPIER_SESSION_PINS__MAXThe base tier's pin limit per account. Leave it unset to use the session organization ceiling of 1,000 pins. This ceiling also applies to configured plans. Lowering a limit preserves existing pins.
HAPPIER_FEATURE_PLANS__ENABLEDSet to 0 to hide plan and limit details in the app. With no configured plan or limit, the app has no plan details to show.
HAPPIER_FEATURE_SUPPORTER__ENABLEDSet to 0 to hide Supporter and Credits. Supporter is available by default and works with any server.

Team member and per-account file storage limits are planned for 0.3. Those controls use HAPPIER_TEAMS__MAX_MEMBERS and HAPPIER_ARTIFACT_ACCOUNT_LIMIT_BYTES.

To hide both Plans and Supporter, add these settings and restart the server:

HAPPIER_FEATURE_PLANS__ENABLED=0
HAPPIER_FEATURE_SUPPORTER__ENABLED=0

This changes what the app shows. Retention and its notices continue to follow the server policy.

Polar billing

Self-hosted servers can leave all Polar settings unset. Set these on the server that owns billing.

SettingWhat it controls
POLAR_ACCESS_TOKENEnables billing and authenticates server reads of Polar purchases.
POLAR_WEBHOOK_SECRETVerifies Standard Webhooks signatures at POST /v1/billing/polar. The webhook route requires both this secret and the access token.
POLAR_SERVERSet to sandbox to use the Polar test environment. Omit it for production.

Set the top-level portalUrl in HAPPIER_PLANS__CONFIG to your organization's public Polar customer portal. The Manage button opens that page and Polar verifies the customer's email before granting access to subscriptions and receipts.

On a server with Polar billing configured, checkout uses the account on that server, including in the sandbox. On a server without Polar billing, the app uses a supporter code for the Supporter Pack.

In development builds with the public Supporter checkout, a self-hosted server using supporter codes falls back to Happier's monthly and one-time checkout links when you leave the Supporter offer unset. The plan response also supplies Happier's customer portal unless you configure a portal URL.

Development builds with Supporter tenure show completed months below the Pass when the current subscription's start date is available. Once the server records that a monthly subscription ended, the Pass shows the year you first supported. On a self-hosted server, Check again after checkout updates the subscription details from Happier Cloud using your supporter code.

Polar Checkout Links copy reference_id into checkout, order, and subscription metadata. Use only the opaque Happier reference. Keep full checkout URLs containing a Supporter code out of application logs, analytics, and support messages. Send the code to Happier in the body of POST /v1/supporter/lookup. Polar Checkout Links

Retention

Session inactivity retention uses HAPPIER_SERVER_RETENTION__SESSIONS__MODE and HAPPIER_SERVER_RETENTION__SESSIONS__INACTIVITY_DAYS. Subagent transcripts have a separate policy. See Server retention policies for the full settings and how to preview a sweep.

On this page