Collect and track your online presence statistics in a local database that runs entirely on your machine.
RPSync is your personal, privacy-first command center for social media analytics. Stop relying on fragmented, invasive, and expensive third-party tools. Run this application locally to collect, visualize, and own your data forever.
Key Benefits:
- 100% Local & Private: Your data never leaves your machine unless you say so.
- Unified Analytics: View statistics from Instagram, TikTok, Bluesky, Mastodon, and more in one beautiful dashboard.
- Data Ownership: Seamlessly export your data to NocoDB and CSV for external analysis.
- No Subscriptions: Free and open-source.
This app is intended to run in Docker and has both x64 and arm builds. It is intended to run on Debian-like systems and has been tested on Windows using WSL2 Ubuntu and Raspberry Pi running on Raspbian.
- Instagram: Syncs public creator/business pages (requires Facebook Page connection).
- TikTok: Advanced scraping via TikTok Creator Studio.
- Telegram: Tracks your public channels
- Other Platforms: Bluesky, Mastodon, Murrtube.net, BadPups.com, Google Analytics
- NocoDB Integration: Automatically syncs your posts and sources to NocoDB for Airtable-like management.
- CSV Exports: Easy variable data export for offline analysis.
- Instagram Sync: Requires a Facebook App and a Facebook Page connected to the Instagram account. Setup Guide
- TikTok Sync: Uses TikTok Creator Studio page. Ensure you have access to it.
- Telegram Sync: Requires App creation and Bot setup. Setup Guide
- Start Guide
- Environment Configuration
- Docker Setup
- HTTPS and Certificates
- Running the Application
- Usage
- Instagram Sync Setup
- Telegram Sync Setup
- Motivation
- Contributing
- For Windows, install WSL first.
- Docker
- Docker Compose
Verify your installation:
docker --version
docker compose versionmkdir rpsync
cd rpsyncIMPORTANT If you plan to sync Instagram data, complete the Instagram Sync Setup section first.
Create a .env file in the project root using the template below:
POSTGRES_DB=rpsync-db
POSTGRES_USER=local-user-ctd
POSTGRES_PASSWORD=password123
POSTGRES_PORT=5435
POSTGRES_HOST=db
APP_PORT=22347
HTTP_PORT=8081
HTTPS_PORT=8443
INSTAGRAM_API_VERSION=24.0
LOCAL_IP=XXX.XXX.XXX.XXX
TOKEN_ENCRYPTION_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OAUTH_ENCRYPTION_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
FACEBOOK_APP_ID=xxxxxxxxxxxxxxxx
FACEBOOK_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-
POSTGRES_* Database configuration. Change
POSTGRES_PASSWORDto a secure value. Other values can remain unchanged. -
POSTGRES_PORT External port used by PostgreSQL in Docker.
-
APP_PORT Internal HTTP port used by the application container.
-
HTTP_PORT / HTTPS_PORT Ports exposed by Caddy. Ensure these do not conflict with other services on your machine.
-
INSTAGRAM_API_VERSION Facebook Graph API version. Version
24.0is tested; other versions may cause issues. -
LOCAL_IP The local IP address used to access the application.
-
TOKEN_ENCRYPTION_KEY Used to encrypt tokens stored in the database.
-
OAUTH_ENCRYPTION_KEY Used to encrypt OAuth URLs during Facebook login.
Generate both encryption keys with:
openssl rand -base64 32
-
FACEBOOK_APP_ID / FACEBOOK_APP_SECRET Required for Instagram synchronization. See Instagram Sync Setup.
Create a docker-compose.yml file in the project root. No changes are required.
version: "3.9"
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:5432"
app:
image: fluffyriot/rpsync:latest
restart: unless-stopped
env_file: .env
depends_on:
- db
ports:
- "${APP_PORT}:${APP_PORT}"
volumes:
- ./outputs:/app/outputs
caddy:
image: caddy:latest
restart: unless-stopped
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./certs:/certs
ports:
- "${HTTPS_PORT}:${HTTPS_PORT}"
- "${HTTP_PORT}:80"
depends_on:
- app
volumes:
db_data:Create Caddyfile.template:
# Redirect HTTP to HTTPS
:${HTTP_PORT} {
redir https://{host}:${HTTPS_PORT}{uri} permanent
}
# HTTPS site with self-signed certificate
:${HTTPS_PORT} {
tls /certs/server.crt /certs/server.key
reverse_proxy app:${APP_PORT}
}export $(grep -v '^#' .env | xargs)
envsubst < Caddyfile.template > CaddyfileIP=${LOCAL_IP:-127.0.0.1}
mkdir -p certs
sudo openssl req -x509 -nodes -days 365 \
-newkey rsa:2048 \
-keyout certs/server.key \
-out certs/server.crt \
-subj "/CN=${IP}" \
-addext "subjectAltName=IP:${IP}"
echo "Self-signed certificate generated for ${IP}"-
Pull the required Docker images:
docker compose pull
-
Start the stack:
docker compose up -d
-
Open your browser and navigate to:
https://LOCAL_IP:HTTPS_PORTReplace
LOCAL_IPandHTTPS_PORTwith the values from your.envfile.
All features are available through the web UI.
Instagram data synchronization requires additional setup via Meta (Facebook) Developer tools.
Important Your Instagram account must:
- Be a Business or Creator account
- Be connected to a Facebook Page
Reference:
-
Go to Meta for Developers and create an account: https://developers.facebook.com/apps/
-
Create a new app.
-
Select:
- Manage Messaging and content on Instagram
- Manage everything on your Page
-
-
In the App Dashboard, navigate to Settings → Basic.
-
Copy the App ID and App Secret into your
.envfile. -
Open Facebook Login for Business.
-
Under Client OAuth Settings, add the following to Valid OAuth Redirect URIs:
https://LOCAL_IP:HTTPS_PORT/auth/facebook/callback
-
-
Go to Use Cases, edit the Instagram use case.
-
Under API setup with Facebook Login, add permissions in the Manage content section.
-
In Permissions and Features, enable:
- Manage insights
- Manage comments
-
Open Graph Explorer: https://developers.facebook.com/tools/explorer/
-
Click Generate Token, select your Page and Instagram account.
-
Copy and save the numeric Instagram Page ID displayed.
-
Head to https://my.telegram.org/apps and create an app.
-
Copy the API ID and API Hash and save it for later to use in "Add source" process during the setup.
-
In the Telegram App, navigate to Botfather and create a new bot.
-
Copy the Bot Token and save it for later to use in "Add source" process during the setup.
This application was created to provide creators with a simple, privacy‑respecting way to analyze their social media presence.
The current release is alpha and focuses on manual workflows. Support for additional platforms and automation is planned.
Contributions are welcome.
- Submit feature requests or bugs via GitHub Issues
- Open pull requests for improvements or new features