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
- Database options — SQLite and PostgreSQL, with MySQL-compatible Knex configuration paths for advanced deployments
- Media and fitness storage — Store image/video media and fitness files on the local filesystem, AWS S3, or S3-compatible object storage
- Fitness tracking — Upload .fit, .gpx, and .tcx activity files with route maps, stats, heatmaps, and Strava imports
- Docker-ready — Official Docker image available at
ghcr.io/llun/activities.next
See the full Feature Roadmap for current and planned features.
┌──────────────────────────────────────────────────────────┐
│ Client Layer │
│ Web browser, Mastodon apps, ActivityPub servers │
└────────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────────┐
│ Next.js App Router (app/) │
│ Pages/SSR, Mastodon API, ActivityPub, auth, OAuth routes │
└────────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────────┐
│ Core Services (lib/) │
│ Auth, media, fitness, federation, delivery, imports │
└────────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────────┐
│ Infrastructure │
│ SQLite/PostgreSQL, local/S3 storage, QStash/sync jobs │
└──────────────────────────────────────────────────────────┘
For a more detailed architecture overview, see docs/architecture.md.
- Node.js 24 or higher
- Yarn package manager (v4.13.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 \
-e ACTIVITIES_MEDIA_STORAGE_TYPE=fs \
-e ACTIVITIES_MEDIA_STORAGE_PATH=/opt/activities.next/uploads \
-v /path/to/data:/opt/activities.next \
ghcr.io/llun/activities.next:latestThe Docker image defaults to SQLite at /opt/activities.next/data.sqlite. The volume mount persists that database and, when local media storage is configured as above, uploaded files 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 |
| Fitness File Storage | Fitness upload, processing, Strava, and heatmap details |
| 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.