Deploy nexgent-trading-engine
Nexgent AI's open-source trading platform for Solana
@nexgent/backend
Just deployed
Redis
Just deployed
/data
@nexgent/frontend
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host nexgent-trading-engine on Railway
Nexgent AI is an open-source Solana trading automation engine. It lets you deploy AI-powered trading agents with custom strategies, real-time position tracking, stop-loss mechanisms (fixed, exponential, zones), DCA support, and a live dashboard — all backed by Jupiter Aggregator for on-chain swaps and Pyth Network for price feeds.
About Hosting nexgent-trading-engine
Deploying Nexgent requires running an Express.js backend server alongside PostgreSQL and Redis. PostgreSQL (via Prisma ORM) stores agents, positions, trades, and user data. Redis powers BullMQ job queues, price caching, and distributed locks. On first boot the backend auto-runs database migrations and seeds an admin account from environment variables. A WebSocket server provides real-time position and price updates to the Next.js frontend dashboard, which can be deployed separately. The backend exposes a health check at /api/v1/health and supports graceful shutdown for zero-downtime deploys.
Common Use Cases
- Automated Solana trading — Deploy AI agents that execute token swaps on Jupiter Aggregator with configurable stop-loss and DCA strategies
- Portfolio monitoring dashboard — Track positions, balances, and P&L in real time via the WebSocket-powered Next.js frontend
- Strategy simulation — Test trading strategies in simulation mode without connecting a wallet or API key before going live
Dependencies for nexgent-trading-engine Hosting
- PostgreSQL 14+ — Primary database for agents, positions, trades, and user accounts
- Redis 6.0+ — Caching layer, BullMQ job queue, and distributed locking
Deployment Dependencies
- Prisma ORM — Database migrations and type-safe queries
- Jupiter Aggregator API — On-chain Solana token swaps (required for live trading, optional for simulation)
- Pyth Network — Real-time SOL price feeds via SSE
- DexScreener — Token price data for non-SOL pairs
- pnpm — Package manager (monorepo workspace protocol)
Implementation Details
Build & start commands:
# Install dependencies and build the backend
pnpm install && pnpm --filter backend build
# Run database migrations
pnpm --filter backend db:migrate:deploy
# Start the server
pnpm --filter backend start
Required environment variables:
DATABASE_URL=postgresql://user:password@host:port/database?schema=public
JWT_SECRET=minimum-32-characters-secret-key
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=YourSecurePassword1!
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
Optional environment variables for live trading:
JUPITER_API_KEY=your-jupiter-api-key
WALLET_1=base58-private-key
SOLANA_RPC_URL=https://your-rpc-endpoint.com
CORS_ORIGIN=https://your-frontend-domain.com
Why Deploy nexgent-trading-engine 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 nexgent-trading-engine 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
@nexgent/backend
nexgent-ai-org/nexgent-open-source-trading-engineADMIN_EMAIL
ADMIN_PASSWORD
!!! IMPORTANT !!! Your password must be at least 8 characters long and include an uppercase letter, lowercase letter, number, and special character. The platform will not deploy if this requirement is not met.
JUPITER_API_KEY
Redis
redis:8.2.1@nexgent/frontend
nexgent-ai-org/nexgent-open-source-trading-engine