Deploy OpenStock

Open-source stock tracker: charts, news and watchlists, with MongoDB

Deploy OpenStock

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

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.48 with 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

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0