llun / activities.next

A Next.JS ActivityPub server.
https://llun.social
MIT License
54 stars 4 forks source link
activitypub firebase nextjs nodejs

Activity.next, ActivityPub server with Next.JS

Activity.Next is single actor ActivityPub server (but plan to support multiple actors under the same account later.) Currently it's in very alpha stage and has only few features supported.

Plan features and progress

Setup

Follow this document to setup your local server

Host it on Vercel

Fork the project and setup Vercel to the Github repo and add below environment variables

ACTIVITIES_HOST=domain.tld
ACTIVITIES_DATABASE='{"type":"sql","client":"better-sqlite3","useNullAsDefault":true,"connection":{"filename":"./dev.sqlite3"}}'
ACTIVITIES_SECRET_PHASE='random-hash-for-cookie'
ACTIVITIES_ALLOW_EMAILS='[]'
ACTIVITIES_ALLOW_MEDIA_DOMAINS='[]'
ACTIVITIES_AUTH='{"github":{"id":"GITHUB_APP_CLIENT_ID","secret":"GITHUB_APP_SECRET"}}'
ACTIVITIES_EMAIL='{"type":"smtp","host":"email-smtp.eu-central-1.amazonaws.com","port":465,"secure":true,"debug":true,"serviceFromAddress":"Service <email@domain.tld>","auth":{"user":"username","pass":"password"}}'

Change the database client to your database type e.g. pg and update the connection with your database configuration.

Host with Docker

When running the docker image, provides these variables

NEXTAUTH_URL=https://your.domain.tld
NEXTAUTH_SECRET=session secret
ACTIVITIES_HOST=your.domain.tld
ACTIVITIES_SECRET_PHASE='random-hash-for-cookie'
ACTIVITIES_DATABASE_TYPE=sql
ACTIVITIES_DATABASE_CLIENT=sqlite3
ACTIVITIES_DATABASE_SQLITE_FILENAME=data.sqlite

If you don't provide the database config, the database will persist in container in the path /opt/activities.next/data.sqlite. You can mount this file out when starting the container too.