OS Trading Engine
Getting Started
Quickstart (Cloud Hosting)

Quickstart (Cloud Hosting)

Deploy Nexgent to production in minutes using Railway's one-click deployment template. No complex configuration neededβ€”just a few clicks and you're ready to trade.

This guide covers cloud hosting deployment. For local development setup, see Quickstart (Local Dev).


Prerequisites

Before starting, ensure you have accounts for:

Both services offer free tiers, so you can get started at no cost.


Setup

1. Get Your Jupiter API Key

  1. Go to Jupiter API Portal (opens in a new tab) to create an account
  2. Once logged in, click Generate Key to create a new API key
  3. Copy and save your API key - you'll need it in the next step
Jupiter API Portal - API Keys page showing Generate Key button
Jupiter API Portal where you can create and manage your API keys

2. Deploy with Railway Template

  1. Click the Railway deployment template: β†’ Railway deployment template (opens in a new tab) ←

  2. Railway will prompt you to:

    • Sign in or create a Railway account (if not already signed in)
Railway template deployment page showing Deploy button
Railway template page - click Deploy to start the setup process
  1. Railway will automatically:
    • Create a new Railway project
    • Set up all required services (PostgreSQL, Redis, Frontend, Backend)
Railway dashboard showing all services being created (PostgreSQL, Redis, Frontend, Backend)
Railway automatically creates all required services for Nexgent

3. Configure Environment Variables

  1. In your Railway project dashboard, you'll see the deployment in progress
  2. Once the services are created, click on the nexgent-open-source-trading-engine/backend service
  3. Go to the Variables tab
  4. Add your Jupiter API key:
    • Variable Name: JUPITER_API_KEY
    • Value: Paste your Jupiter API key from Step 1
  5. Click Add to save
Railway Variables tab showing where to add JUPITER_API_KEY
Add your Jupiter API key in the backend service Variables tab

The template automatically configures PostgreSQL, Redis, and other required services. You only need to add the Jupiter API key.

4. Deploy

  1. Railway will automatically start deploying once you've added the JUPITER_API_KEY
  2. You can monitor the deployment progress in the Railway dashboard
  3. Wait for all services to show "Deployed" status (usually 2-5 minutes)
Railway dashboard showing deployment in progress for all services
Monitor deployment progress in the Railway dashboard

What's being deployed:

  • PostgreSQL - Database for storing trading data
  • Redis - Cache and job queue
  • nexgent-open-source-trading-engine/backend - Express API server
  • nexgent-open-source-trading-engine/frontend - Next.js dashboard

5. Access Your Dashboard

  1. Once deployment is complete, click on the nexgent-open-source-trading-engine/frontend service
  2. Go to the Settings tab
  3. Find your Public Domain (e.g., your-app.up.railway.app)
  4. Click the domain to open your Nexgent dashboard in a new tab
Railway Settings tab showing Public Domain for the frontend service
Find your public domain in the frontend service Settings tab

You're done! πŸŽ‰

Nexgent login page showing Register and Login options
Your Nexgent dashboard is ready - create an account to get started

What's Running

After deployment, Railway automatically sets up:

ServicePurposeManaged By
PostgreSQLDatabase for users, agents, positionsRailway
RedisCache and job queuesRailway
nexgent-open-source-trading-engine/backendExpress API + WebSocket serverRailway
nexgent-open-source-trading-engine/frontendNext.js dashboardRailway

All services are automatically configured and connected. No manual setup required!


Adding a Live Trading Wallet

To enable live trading, you need to add your Solana wallet private key:

  1. In Railway, click on the nexgent-open-source-trading-engine/backend service
  2. Go to the Variables tab
  3. Add your wallet private key:
    • Variable Name: WALLET_1
    • Value: Paste your Solana wallet private key
  4. Click Add to save
Railway Variables tab showing WALLET_1 environment variable
Add your wallet private key as WALLET_1 in the backend service Variables tab

Multiple Wallets

You can add additional wallets by creating more environment variables:

  • WALLET_2 for a second wallet
  • WALLET_3 for a third wallet
  • And so on...

Deploy Changes

After adding or modifying wallet variables, you must redeploy for the changes to take effect:

  1. Click Deploy in the Railway dashboard (or the service will auto-deploy)
  2. Wait for the deployment to complete
  3. Your wallet will be available for live trading once the deployment finishes

For simulation mode, wallets are not required. Only add wallet private keys when you're ready for live trading.


Custom Domain (Optional)

To use your own domain:

  1. In Railway, click on the nexgent-open-source-trading-engine/frontend service
  2. Go to Settings β†’ Networking
  3. Click Add Custom Domain
  4. Enter your domain (e.g., app.yourdomain.com)
  5. Follow Railway's DNS configuration instructions
  6. SSL is automatically provisioned

Repeat the same process for the backend service if you want a custom API domain.


NGINX Reverse Proxy + Basic Auth

We recommend putting your application behind an NGINX reverse proxy with Basic Authentication for additional security.

More on this soon.


Cost Estimation

Railway offers 30 days free to get started. After that, hosting costs $5 per month.

The free trial gives you plenty of time to test Nexgent. After 30 days, you'll be charged $5/month for hosting.


Deploy to Other Providers

This quickstart uses Railway for the simplest one-click deployment. The Nexgent open-source trading engine is provider-agnosticβ€”you can deploy it to any cloud or server that supports Node.js, PostgreSQL, and Redis.

Other deployment options

Provider / methodBest forSetup effortDocs
Docker ComposeDev, testing, or a single server (VPS, bare metal, or any cloud VM)~15 minDocker Compose
VPS (DigitalOcean, Linode, AWS EC2, etc.)Full control; you manage Node, Postgres, Redis, and reverse proxy1–2 hoursVPS Deployment

What you need on any provider

  • Node.js 18+
  • PostgreSQL 14+
  • Redis 7+
  • Environment variables for database, Redis, JWT, Jupiter API, and (for live trading) Solana RPC and wallets

For step-by-step guides, architecture details, and production checklists, see the Self-Hosting Overview.


Troubleshooting

Deployment Fails

  1. Check Railway logs: Click on the failing service β†’ Deployments β†’ View Logs
  2. Verify API key: Ensure JUPITER_API_KEY is set correctly in backend variables

Frontend Shows Error

  1. Check backend is running: Verify the backend service shows "Deployed"
  2. Check environment variables: Ensure all required variables are set
  3. View frontend logs: Click on frontend service β†’ Deployments β†’ View Logs

Can't Access Dashboard

  1. Check public domain: Ensure the frontend service has a public domain enabled
  2. Check deployment status: All services should show "Deployed"
  3. Try incognito mode: Clear browser cache and try again

Database Connection Errors

  1. Check PostgreSQL service: Ensure it's running in Railway
  2. Check backend logs: Look for connection errors
  3. Verify migrations: Backend automatically runs migrations on deploy

Updating Your Deployment

You can trigger manual deployments from the Railway dashboard:

  1. Go to your Railway project
  2. Click on the service you want to update
  3. Go to Deployments tab
  4. Click Redeploy to trigger a new deployment