
Deploy AiToEarn
AI content creation and multi-platform social publishing for creators
Redis
Just deployed
/data
AiToEarn Server
Just deployed
/data
Just deployed
/data/db
AiToEarn AI
Just deployed
/data
Just deployed
/data
Just deployed
AiToEarn Web
Just deployed
Deploy and Host AiToEarn on Railway
AiToEarn is an open-source (MIT) AI content platform for creators. It drafts posts, images and videos with AI models, keeps a media library, and publishes or schedules content to many social platforms (TikTok, YouTube, Instagram, X, LinkedIn, Xiaohongshu, Douyin and more) from one dashboard.
About Hosting AiToEarn
AiToEarn runs as several services: a Next.js web app, a NestJS backend API, a NestJS AI service, MongoDB as a replica set (the backend uses transactions), Redis for queues and cache, and S3-compatible storage for uploads and generated media. This template deploys all of them on Railway's private network, generates every password and secret, and puts an nginx gateway on the public domain. The gateway routes the web app, the API and public media, and asks for a login before the web app, because upstream's web app signs every visitor in as the admin. Configuration is saved on volumes and survives redeploys and updates.
Common Use Cases
- Write and schedule posts for several social accounts from one place
- Generate drafts, images and videos with your own AI provider keys
- Keep a shared media library for a creator or small marketing team
Dependencies for AiToEarn Hosting
- MongoDB 7.0 (single-member replica set, included)
- Redis 8.2 and RustFS S3 storage (included)
Deployment Dependencies
- AiToEarn on GitHub
- Template source and changelog
- Optional: a Relay API key from aitoearn.ai for social-platform sign-in, and API keys for the AI providers you use
Implementation Details
Services:
- AiToEarn: public nginx gateway. Login in front of the web app,
/api/to the backend and AI service,/oss/for public media. Blocks the unauthenticated/api/_shutdownand/api/metricsroutes. - AiToEarn Web: the Next.js dashboard.
- AiToEarn Server: backend API (v2.5.0 plus upstream fixes to 2026-11-06). Creates the admin user and the storage bucket on first start.
- AiToEarn AI: AI models, agent and draft generation.
- MongoDB, Redis, RustFS: database, queue/cache and object storage, each on its own volume.
After deploy:
- Open the AiToEarn service's domain and sign in as
adminwith theAUTH_PASSWORDfrom that service's Variables tab. - In the app, open Configuration Management and add a Relay API key and your AI provider keys.
- For a custom domain, set
PUBLIC_URLon AiToEarn Server and AiToEarn AI tohttps://YOUR-DOMAINand redeploy both.
Updates: every service except Redis builds from the template's GitHub repo with pinned image versions. When we pin a new AiToEarn release, Railway shows an update notice on your project; read the changelog, then apply it.
Why Deploy AiToEarn 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 AiToEarn 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
Redis
redis:8.2.3-alpineAiToEarn Server
aalfath/aitoearn-railway-templateAiToEarn AI
aalfath/aitoearn-railway-templateAiToEarn Web
aalfath/aitoearn-railway-template
