Activity.next is a self-hosted ActivityPub server built with Next.js and TypeScript. It enables you to run your own instance in the Fediverse — the decentralized social media network — and interact with Mastodon, Pleroma, Misskey, and other ActivityPub-compatible platforms.
- Fediverse-ready — Full ActivityPub federation with other servers
- Mastodon API compatible — Use your favorite Mastodon client apps
- OAuth 2.0 provider — Acts as a full OAuth 2.0 / OpenID Connect server
- Multiple databases — SQLite for development, PostgreSQL for production
- Flexible storage — Local filesystem, AWS S3, or any S3-compatible object storage
- Fitness tracking — Upload .fit, .gpx, and .tcx activity files with map generation
- Docker-ready — Official Docker image available at
ghcr.io/llun/activities.next
See the full Feature Roadmap for current and planned features.
┌──────────────────────────────────────────────────────────┐
│ Clients │
│ (Web Browser, Mastodon Apps, ActivityPub Servers) │
└──────────────┬───────────────────────────┬───────────────┘
│ │
▼ ▼
┌──────────────────────┐ ┌──────────────────────────────┐
│ Next.js Frontend │ │ API Routes │
│ (React + SSR) │ │ /api/v1/* (Mastodon API) │
│ │ │ /api/users/* (ActivityPub) │
│ │ │ /api/auth/* (better-auth) │
│ │ │ /api/oauth/* (OAuth 2.0) │
└──────────┬───────────┘ └──────────────┬───────────────┘
│ │
└──────────┬────────────────────┘
▼
┌────────────────────────┐
│ Services & Jobs │
│ (Business Logic) │
└────────────┬───────────┘
│
┌──────────────┼──────────────┐
▼ ▼ ▼
┌────────────┐ ┌────────────┐ ┌────────────┐
│ Database │ │ Storage │ │ Queue │
│ SQLite/PG │ │ Local/S3 │ │ QStash │
└────────────┘ └────────────┘ └────────────┘
For a more detailed architecture overview, see docs/architecture.md.
- Node.js 24 or higher
- Yarn package manager (v4.12.0 via Corepack)
- A domain name (required for federation)
-
Clone the repository:
git clone https://github.com/llun/activities.next.git cd activities.next -
Enable Corepack (for Yarn 4 support):
corepack enable -
Install dependencies:
yarn install
-
Configure your instance (see the Setup Guide):
cp .env.example .env.local # Edit .env.local with your configurationAt minimum, set
ACTIVITIES_HOST,ACTIVITIES_SECRET_PHASE, and a database configuration (e.g.,ACTIVITIES_DATABASE_CLIENT=better-sqlite3). -
Run database migrations:
yarn migrate
-
Start the development server:
yarn dev
-
Sign up at
http://localhost:3000/auth/signup(your email must be in the allow list).
For detailed setup instructions, see the Setup Guide.
docker run -p 3000:3000 \
-e ACTIVITIES_HOST=your.domain.tld \
-e ACTIVITIES_SECRET_PHASE=your-random-secret \
-v /path/to/data:/opt/activities.next \
ghcr.io/llun/activities.next:latestThe volume mount persists your SQLite database and uploaded media between container restarts.
For PostgreSQL or advanced Docker setups, see:
- Fork this repository
- Connect it to your Vercel account
- Add the required environment variables (see Setup Guide)
- Deploy
Note: Vercel deployments require an external PostgreSQL database and S3-compatible storage.
| Document | Description |
|---|---|
| Setup Guide | General configuration and first-time setup |
| Architecture | System architecture, data flow, and design decisions |
| SQLite Setup | SQLite database configuration and Docker deployment |
| PostgreSQL Setup | PostgreSQL database configuration and Docker deployment |
| Environment Variables | Complete reference for all configuration options |
| Feature Roadmap | Current and planned features |
| Maintenance Scripts | Admin scripts for media cleanup and user management |
| Contributing | Guidelines for contributors |
Contributions are welcome! Please read our Contributing Guide for details on the development workflow, coding standards, and pull request process.
This project is licensed under the MIT License — see LICENSE.md for details.