Deploy AiToEarn

AI content creation and multi-platform social publishing for creators

Deploy AiToEarn

Just deployed

/data

Just deployed

/data

/data/db

Just deployed

/data

/data

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

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/_shutdown and /api/metrics routes.
  • 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:

  1. Open the AiToEarn service's domain and sign in as admin with the AUTH_PASSWORD from that service's Variables tab.
  2. In the app, open Configuration Management and add a Relay API key and your AI provider keys.
  3. For a custom domain, set PUBLIC_URL on AiToEarn Server and AiToEarn AI to https://YOUR-DOMAIN and 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

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1