Self-host refref
Open-source referral, affiliate, and loyalty platform
- Stars
- 239
- Port
- 3000 (webapp portal)
- Requires
- Node.js, Pnpm, PostgreSQL
What is refref?
An open-source platform for building and running referral, affiliate, and loyalty programs. It captures referral clicks via a landing script, attributes signups to referrers, applies reward rules for events like purchases, and delivers rewards through billing providers or webhooks. Includes referrer and partner portals, flexible reward types, custom domain links, sandbox testing, and automation webhooks. Runs on PostgreSQL with a Next.js/React frontend. Self-host via Docker Compose or local Node.js 20+ with pnpm. Currently in alpha under AGPL-3.0.
Should you self-host refref?
refref scores 44/100 on selfhost.directory (how scoring works) and ranks #11 of 12 in Marketing Automation. It has 239 GitHub stars.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is moderate: expect some configuration beyond a single command. It is AGPL-3.0-licensed and written mostly in Typescript.
Its closest alternative on selfhost.directory is Mautic (76/100, 10 857 stars). It scores higher overall, so compare the two before you pick. See refref vs Mautic side by side.
Features
- Automated Nudges
- Automatic Reward Approval
- Automatic Reward Dispersal
- Customizable Rewards
- Engagement Analytics
- Fraud Monitoring
- Loyalty Programs
- Manual Reward Approval
- Manual Reward Dispersal
- Partner Portal
- Personalized Pages
- Referral Attribution
- Referrer Portal
- Testing Environment
- Webhooks
refref README
FAQ
Can I test RefRef before I go live?
Yes. Each Live Project has a paired Sandbox Project with its own ID, and an API key reaches only one environment. Test in Sandbox, then switch the key and the Project ID.
What types of businesses can use RefRef?
B2B and B2C software, AI apps, subscriptions, and marketplaces. RefRef names each customer with your own ID, either a person or a company account.
How do I integrate RefRef with my product?
Add the landing script to your website, send signups from your backend, and connect your billing provider for purchases. The docs have guides for common auth systems, billing providers, and stores.
How does RefRef work?
A referrer shares a link. The RefRef landing script on your website records the click in a first-party cookie. When the new customer creates an account, your backend sends the signup to RefRef with that cookie, and RefRef connects the customer to the referrer. Later purchases use the same referral, and your rules decide the Rewards.
What is RefRef?
RefRef is an open source platform for referral, affiliate, and loyalty programs for software and commerce products. It gives referrers their links, connects new customers to the person who referred them, and records and delivers the Rewards that your rules give.
More in Customer Engagement
UsertourSelf-hosted open-source platform for in-app product tours, checklists, surveys, and AI-assisted flow building via MCP.
B1AdminSelf-hosted open-source church platform with member database, attendance, online giving, website builder, mobile PWA, and children's check-in on one shared database.
ClearFlaskOpen-source feedback management tool pitched as a Canny/UserVoice alternative for ideas, roadmaps and announcements, self-hosted via Docker Compose or Helm.
Countly Community EditionOpen-source, self-hosted product analytics and engagement suite covering events, crashes, push and remote config — a privacy-first alternative to Amplitude and Mixpanel.
FiderSelf-hosted, open-source feedback portal where users post feature requests, discuss and vote. Runs as a Docker image with PostgreSQL, configured via env vars.
FormbricksSelf-hosted, open-source survey and experience-management platform: link, website, in-app and email surveys with no-code builder, webhooks, API, and analytics dashboards.
laudspeakerSelf-hosted, open-source customer engagement platform for building visual onboarding journeys and sending event-triggered email, SMS, push and webhook messages.
LimeJourneySelf-hosted open-source platform for AI-driven user journeys, visual builder, dynamic segmentation, and BYOI integrations — a Customer.io alternative.

0 comments