
Deploy OpenStock
Open-source stock tracker: charts, news and watchlists, with MongoDB
OpenStock
Just deployed
MongoDB
Just deployed
/data/db
Deploy and Host OpenStock on Railway
OpenStock is a free, open-source (AGPL-3.0) stock market app by Open Dev Society. It shows a market overview, stock pages with TradingView charts, company profiles and news, searches listed companies across exchanges with ⌘K, and keeps a personal watchlist for each user. Market data comes from Finnhub with your own API key.
About Hosting OpenStock
This template runs two services. OpenStock (the Next.js app, official release image pinned by digest) is built from a public GitHub wrapper repo and served on a Railway domain with a health check. MongoDB 7 keeps users, sessions and watchlists on a Railway volume and is reached only over the private network with a generated password. The session-signing secret is generated too, so the only thing you enter is a free Finnhub API key. After deploy, open the URL and sign up: there is no default admin. Both services fit in 0.5 GB of RAM each, so the template also runs on the Free and Trial plans.
Common Use Cases
- A private stock dashboard and watchlist for yourself, without ads or a third-party account
- A shared market tracker for a small team, club or classroom, each member with their own watchlist
- A self-hosted base for experimenting with OpenStock's code, data sources and features
Dependencies for OpenStock Hosting
- A Finnhub API key (free tier at finnhub.io) for search, quotes, profiles and news
- MongoDB 7 (included in this template, on its own volume)
Deployment Dependencies
- OpenStock source and releases: https://github.com/Open-Dev-Society/OpenStock (release v2026.11.22)
- Upstream configuration reference: https://github.com/Open-Dev-Society/OpenStock/blob/v2026.11.22/.env.example
- Template wrapper repo (Dockerfile, start script, changelog): https://github.com/aalfath/openstock-railway-template
- Finnhub API keys: https://finnhub.io/register
Implementation Details
Services in this template:
- OpenStock: the web app on port 3000, public HTTPS domain, health check
/api/auth/ok. Its start script sizes Node's heap to the memory limit and exits non-zero on a crash, so Railway restarts it. - MongoDB:
mongo:7.0.48with a 0.25 GB WiredTiger cache, data on a volume at/data/db, no public TCP proxy.
Variables you can add later on the OpenStock service: NODEMAILER_EMAIL and NODEMAILER_PASSWORD (welcome and password-reset emails; without them, emails are skipped), INNGEST_SIGNING_KEY and INNGEST_EVENT_KEY (weekly digest jobs, with an Inngest app pointing at https://YOUR-DOMAIN/api/inngest), GEMINI_API_KEY (AI-written email text), GOOGLE_CLIENT_ID/GITHUB_CLIENT_ID and their secrets (social sign-in). Sign-up is open to anyone with the URL, so keep it private if the instance is only for you. Quotes refresh hourly (upstream's default data mode).
Updates: the app builds from the GitHub wrapper repo, so Railway shows an "update available" notice when a new OpenStock release is merged there. Read the repo's CHANGELOG first. Your data stays on the MongoDB volume.
Why Deploy OpenStock 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 OpenStock 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
OpenStock
aalfath/openstock-railway-templateFINNHUB_API_KEY
Your Finnhub API key (free at finnhub.io/register). Powers search, quotes, company profiles and news.
MongoDB
mongo:7.0.48