ED Rare Router
Version: Alpha 1.06
Last Updated: March 1, 2026
Author: R.W. Harper
LinkedIn: https://linkedin.com/in/rwhwrites
License: GNU General Public License v3.0
THIS IS A DEVELOPMENT/HOBBY PROJECT - USE AT YOUR OWN RISK
This software is provided "AS IS" without warranty of any kind, express or implied. No guarantees or warranties are given regarding deployment, availability, or fitness for any purpose. The authors and contributors are not liable for any damages arising from use of this software. See the LICENSE file for full terms.
ED Rare Router is designed to run as a local application on your own machine. This guide covers local deployment and setup.
For detailed local deployment instructions, see the Local Deployment Guide.
-
Install dependencies:
npm install
-
Generate initial data:
npm run export:rares
-
Start the application:
npm run dev
-
Access the application: Open
http://localhost:4321in your browser
-
Install ZeroMQ (see EDDN Worker Setup Guide)
-
Start web server (Terminal 1):
npm run dev
-
Start EDDN worker (Terminal 2):
npm run worker
For production use, see the Local Deployment Guide which covers:
- Process management (PM2, systemd)
- Running as a service
- Network access configuration
- Scheduled tasks
- Security considerations
Build the production version:
npm run build
npm run previewThe application uses these data files in the data directory (default data/; override with dataDir in .config.json):
rareSystemsCache.json- Pre-fetched rare origin system coordinatessystemCache.json- Cached EDSM system lookupsedsmMarketData.json- Bulk-fetched EDSM market dataeddnMarketCache.json- Real-time EDDN market data (if worker running)rares.json- Rare goods data export (for worker)curatedLegality.json- Manually curated legality overrides (dev only)
These files are generated automatically and can be committed to your repository.
Optional local settings are read from .config.json in the project root (not committed). Copy config.sample.json to .config.json and edit:
edsmUserAgent– User-Agent string for EDSM API and fetch script (e.g. include your contact email here so it is not stored in the repo).dataDir– Optional absolute path for cache and data files. Omit or set tonullto use the defaultdata/directory.apiKeys– Object for all API keys (e.g."edsm","eddn"). Env overrides:EDSM_API_KEY,EDDN_API_KEY, etc.
See the main README for details.
Default port is 4321. To change it, modify astro.config.mjs:
export default defineConfig({
server: {
port: 3000, // Change to your preferred port
host: true, // Listen on all interfaces (for network access)
},
});Create a .env file in the project root:
# EDSM API User-Agent (optional)
EDSM_USER_AGENT=ED-Rare-Router/1.0 (contact: your-email@example.com)
# Node environment
NODE_ENV=productionError: "Port 4321 is already in use"
# Find process using port
# Windows
netstat -ano | findstr :4321
# Linux/macOS
lsof -i :4321
# Kill the process or change port in config- "No adapter installed": The Node adapter is already configured in
astro.config.mjs - "POST requests not available": Ensure
output: 'server'is set in config
- API endpoints return 404: Verify the build completed successfully
- CORS errors: Check that your API routes are properly configured
- Local Deployment Guide - Complete local deployment guide
- EDDN Worker Setup Guide - EDDN worker configuration
- Bulk Market Data Fetch - Market data fetching
- Testing Market Data Fetch - Testing instructions