---
title: "Deploy OpenTerminal"
description: "Market dashboard with charts, news, crypto, and portfolio tracking"
category: "Analytics"
url: https://railway.com/deploy/openterminal
---

# Deploy OpenTerminal

Market dashboard with charts, news, crypto, and portfolio tracking

**[Deploy OpenTerminal on Railway](https://railway.com/template/openterminal)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/openterminal/manifest.json

- **Creator:** kmaki's Projects
- **Category:** Analytics

## Template content

### app

- **Image:** xiaosong233/openterminal-railway:latest
- **Health check:** /api/status
- **Public domain:** Yes

## Documentation

# Deploy and Host OpenTerminal on Railway

OpenTerminal is a self-hosted market dashboard that brings stock charts, quotes, news, cryptocurrency markets, economic calendars, and portfolio tracking into one keyboard-driven workspace. It combines free public data sources with an interactive web interface, persistent SQLite storage, and an optional AI assistant, making personal market research accessible without paid subscriptions.

## About Hosting OpenTerminal on Railway

This template runs the Next.js web UI and Express API together in one Docker-based Railway service. Railway provides HTTPS, deployment logs, and a persistent volume. The API stays on loopback inside the container, and the web server proxies browser API requests.

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/openterminal)

## Tech Stack

- Next.js 15, React 19, TypeScript, and Tailwind CSS 4.
- Node.js 22 and Express.
- SQLite with better-sqlite3 and WAL mode.
- Lightweight Charts, D3, Recharts, Zustand, and TanStack Query.
- Optional Anthropic-compatible AI assistant.

## Why Deploy OpenTerminal on Railway

Deploy a browser-accessible research workspace from a prebuilt Docker image, with managed HTTPS and persistent portfolio storage. No source build, separate database, or paid market-data key is required.

## Common Use Cases

- Monitor stocks, ETFs, and cryptocurrency markets.
- Compare charts, technical indicators, news, and economic calendars.
- Track personal portfolios and transactions.
- Build a shared market-research dashboard.

## Deployment Notes

- Docker source: `xiaosong233/openterminal-railway:latest`, built from [ErTasselli/OpenTerminal](https://github.com/ErTasselli/OpenTerminal) revision `aed097c680cd8ec1c391ae06966babe7d6d91fc6`. Railway uses the image directly; no repository source or Railpack build is configured.
- Keep the image's default command. No Railway start-command override is needed.
- Expose only the Next.js listener on port `3000`; the public domain must target that port. The Express API uses `127.0.0.1:4000` internally. Distinct `PORT` and `API_PORT` variables avoid process port conflicts.
- Mount one persistent volume at `/app/data`. SQLite portfolio data survives redeployment. Workspace layouts are stored in each browser's local storage. Use one replica with this SQLite configuration.
- Upstream has no username/password login or initial administrator account. `API_KEY` is a server-to-server shared secret that the web proxy supplies automatically; it does not restrict access to the public dashboard or its portfolio routes. Visitors to the public URL share the deployment's portfolio data.
- Core features work without external API credentials. To enable AI, add your own `ANTHROPIC_API_KEY`; optionally set `ANTHROPIC_BASE_URL` and `ANTHROPIC_MODEL`. A generated random string cannot replace an external provider credential.
- Public market-data services may delay, limit, or reject requests. The upstream project is intended for personal and educational research.

| Variable | Default | Purpose |
|----------|---------|---------|
| `PORT` | `3000` | Public Next.js listener and Railway routing. |
| `HOSTNAME` | `0.0.0.0` | Bind the web server to all container interfaces. |
| `API_HOST` | `127.0.0.1` | Keep Express private inside the container. |
| `API_PORT` | `4000` | Internal API listener. |
| `API_URL` | `http://127.0.0.1:4000` | Web server's upstream API address. |
| `API_KEY` | `${{secret()}}` | Generate an independent internal API secret per deployment. |
| `DATA_DIR` | `/app/data` | SQLite data directory on the mounted volume. |
| `WEB_ORIGIN` | `https://${{RAILWAY_PUBLIC_DOMAIN}}` | Browser origin allowed by the API. |
| `TRUST_PROXY` | `0` | Retain upstream proxy-trust defaults. |

Verification deployment: [OpenTerminal](https://app-production-fb51.up.railway.app/). The UI, `/api/status`, and `/api/portfolios` returned HTTP 200. Railway reported SUCCESS, both processes logged healthy startup, and the original SQLite portfolio record survived redeployment. Use `/api/status` as the health-check path.

## Dependencies for OpenTerminal on Railway

The single image contains both the web frontend and API. SQLite runs in the same service, so no Postgres, Redis, worker, or additional service is needed. Internet access is required for public market-data providers; AI is optional.

### Deployment Dependencies

| Service | Image | Port | Volume |
|---------|-------|------|--------|
| app | xiaosong233/openterminal-railway:latest | 3000 | /app/data |

## Similar templates

- [Typesense Multilingual](https://railway.com/deploy/deploy-typesense-multilingual-search) — Locale-aware multilingual search with Typesense
- [Formbricks | Open-Source Typeform & Qualtrics Alternative](https://railway.com/deploy/formbricks-surveys) — Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube
- [Typesense PHP](https://railway.com/deploy/typesense-php) — official PHP client against Railway

Open this page in a browser: https://railway.com/deploy/openterminal
