Deploy Threads Analytics
A self-hosted Threads analytics dashboard.
ridemountainpig/threads-analytics
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host Threads Analytics on Railway
Threads Analytics is a self-hosted analytics dashboard for Meta Threads that helps creators and businesses monitor post performance. Connect your Threads access token to explore engagement metrics, visual analytics, trending posts, posting recommendations, and multi-account insights through a secure, password-protected web interface.
About Hosting Threads Analytics
Hosting Threads Analytics on Railway provides a fully managed environment for running your analytics dashboard without maintaining servers or infrastructure. Railway automatically deploys the application from the provided Docker image or repository, provisions networking with HTTPS, and simplifies environment variable management.
Threads Analytics requires a PostgreSQL database to store account information, encrypted access tokens, and analytics data. Railway makes it easy to add a PostgreSQL service and securely reference its connection string. The application is exposed through an HTTP proxy with a generated Railway domain, allowing secure access from anywhere. As your usage grows, Railway can scale the application while keeping deployment and configuration simple.
Common Use Cases
- Monitor Threads account performance with detailed engagement analytics and historical trends.
- Manage analytics for multiple Threads accounts from a single dashboard.
- Discover optimal posting times, identify high-performing content, and improve content strategy.
Dependencies for Threads Analytics Hosting
| Dependency | Required | Purpose |
|---|---|---|
| PostgreSQL | Yes | Stores application data, encrypted account credentials, and analytics |
| Threads Access Token | Yes | Retrieves analytics data from the Threads API |
Deployment Dependencies
| Resource | Link |
|---|---|
| Official GitHub Repository | https://github.com/ridemountainpig/threads-analytics |
| GitHub Container Image | https://github.com/ridemountainpig/threads-analytics/pkgs/container/threads-analytics |
Implementation Details
Docker
Threads Analytics is available as a published GitHub Container Registry image. You can deploy the published image directly, or Railway can automatically build the application from the repository if using the included Dockerfile.
Public Networking
| Setting | Value |
|---|---|
| Proxy Type | HTTP Proxy |
| Target Port | 8080 |
Environment Variables
| Variable | Required | Description |
|---|---|---|
APP_PASSWORD | Yes | Password used to sign in to the dashboard. |
TOKEN_ENCRYPTION_KEY | Yes | Secret key used to encrypt stored Threads access tokens. Generate with openssl rand -hex 32. |
DATABASE_URL | Yes | PostgreSQL connection string. Automatically supplied from the Railway PostgreSQL service. |
Raw Variables example:
APP_PASSWORD=your_secure_password
TOKEN_ENCRYPTION_KEY=generated_hex_key
DATABASE_URL=${{Postgres.DATABASE_URL}}
Generate the encryption key with:
openssl rand -hex 32
Persistent Storage
A Railway Volume is not required. Application data is stored in PostgreSQL.
Database
Threads Analytics requires a PostgreSQL database.
- Add a PostgreSQL service to your Railway project.
- Railway automatically generates the
DATABASE_URLreference variable. - Reference the generated
DATABASE_URLin your application variables. - The application will use this connection string to store analytics data and encrypted Threads credentials.
Build & Start
If deploying from the repository, Railway automatically builds the application using the included Dockerfile.
No custom build or start commands are required.
Accessing the Application
After deployment:
- Open your Railway service.
- Navigate to Settings → Networking.
- Generate a Railway domain.
- Visit the generated URL.
- Sign in using the password configured in
APP_PASSWORD. - Connect your Threads access token to begin syncing analytics.
Why Deploy Threads Analytics on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Threads Analytics on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
ridemountainpig/threads-analytics
ghcr.io/ridemountainpig/threads-analyticsAPP_PASSWORD
App Password
