
Deploy openstock
OpenStock is an open-source stock monitor platform built with Next.js
openstock
Just deployed
MongoDB
Just deployed
/data/db
Deploy and Host OpenStock on Railway
About Hosting
OpenStock is an open-source stock market web app built with Next.js 15, Better Auth, and MongoDB. It provides watchlists, stock search, news, and chart widgets, plus optional automated email flows through Inngest.
On Railway, the recommended architecture is two services:
- OpenStock app service (Next.js runtime)
- MongoDB service (managed Mongo database)
Why Deploy
- Own your data — host your auth, watchlists, and user preferences privately.
- Full-stack in one project — app + database managed together in Railway.
- Open-source flexibility — customize workflows and integrations.
- Fast setup — Railway handles build and runtime for Next.js quickly.
Common Use Cases
- Personal or team stock tracking dashboard with custom watchlists.
- Internal finance/market-monitoring portal for startups and communities.
- Educational/demo deployment for Next.js + Better Auth + MongoDB architecture.
- Base project for building custom alerting or AI-assisted market summaries.
Dependencies for Deployment
Deployment Dependencies
| Dependency | Details |
|---|---|
| Docker Image | docker.io/xiaosong233/openstock:railway-latest (replace with your own tag) |
| Build Mode | Local Docker build + Docker Hub push |
| Container Port | 3000 |
| Database | Railway MongoDB service |
| Required App Env Vars | NODE_ENV, MONGODB_URI, BETTER_AUTH_SECRET, BETTER_AUTH_URL, NEXT_PUBLIC_FINNHUB_API_KEY, FINNHUB_BASE_URL, GEMINI_API_KEY, INNGEST_SIGNING_KEY, NODEMAILER_EMAIL, NODEMAILER_PASSWORD |
| Optional App Env Vars | AI_PROVIDER, MINIMAX_API_KEY, KIT_API_KEY, KIT_API_SECRET, KIT_WELCOME_FORM_ID |
| Persistent Volume | Managed by Railway MongoDB service |
| Start Command Override | Not required (use project default npm start) |
Template Content
openstock
xiaosong233/openstock:railway-latestMongoDB
mongo:8.0