This repository is home to the hornet storage panel which is a typescript / react web application designed for managing a hornet storage nostr multimedia relay which can be found here: https://github.com/HORNET-Storage/HORNETS-Nostr-Relay
Before installing, ensure you have:
- A Nostr browser extension (Alby, nos2x, etc.) - REQUIRED
- Node.js 16+ and yarn installed
- The HORNETS relay service running (see here)
Without these, the panel will not function.
We have a live demo that can be found at http://hornetstorage.net for anyone that wants to see what the panel looks like.
- Manage your hornet-storage relay config directly from the panel
- Switch between our new whitelist and blacklist model for accepting nostr notes
- Decide from which of the supported nostr kinds to enable
- Choose which supported transport protocols to enable such as libp2p and websockets
- Enable / disable which media extensions are accepted by the relay such as png and mp4
- View statistics about stored notes and media
- Upload relay icons with integrated Blossom server support
The HORNETS Relay Panel requires a NIP-07 compatible Nostr browser extension to function.
You must install one of these browser extensions before using the panel:
- Alby - Bitcoin Lightning & Nostr browser extension
- nos2x - Simple Nostr browser extension
- Flamingo - Nostr browser extension
- Horse - Nostr browser extension
The panel uses NIP-07 (window.nostr capability) for:
- User authentication and login
- Event signing for relay configuration
- File uploads with cryptographic verification
π Learn more about NIP-07: https://nostr-nips.com/nip-07
Essential steps to get running:
- Install a NIP-07 browser extension (required - see above)
- Install dependencies:
npm install -g serve
andyarn install
- Start development:
yarn start
- For production:
yarn build
thenserve -s build
For full deployment with reverse proxy, see the detailed setup guide below.
All preview images are taken from the live demo
The HORNETS Relay Panel is built with a microservices architecture comprising:
The panel is now integrated directly into the relay server for simplified deployment:
- Relay + Panel Server: Port 9002 - Serves both the React app (static files) and panel API
- Relay WebSocket: Port 9001 - WebSocket service for Nostr relay functionality
- Wallet Service: Port 9003 - Backend service for wallet operations
- Media Moderation: Port 8000 - Content moderation and filtering service
Client Request (http://localhost or your-domain.com)
β
Nginx Proxy (Port 80/443) - Optional but recommended for production
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Route Distribution: β
β βββββββββββββββββββββββββββ βββββββββββββββββββββββββββ β
β β / β Relay + Panel β β /wallet/ β Wallet API β β
β β (Port 9002) β β (Port 9003) β β
β β βββ /api/* β Panel API β β β β
β β βββ /* β React App β β β β
β βββββββββββββββββββββββββββ βββββββββββββββββββββββββββ β
β β
β WebSocket Connection: β
β βββββββββββββββββββββββββββ β
β β ws:// β Relay WebSocket β β
β β (Port 9001) β β
β βββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
For development, you can run services directly:
- Relay + Panel:
http://localhost:9002
(no proxy needed) - Wallet Service:
http://localhost:9003
(direct API calls)
For production deployment, nginx handles:
- Wallet Service Proxying:
/wallet/*
βlocalhost:9003
- SSL Termination: Single certificate for entire application
- WebSocket Proxying: Proper upgrade headers for relay WebSocket
- Static Asset Caching: Optimal performance for React app
- Security Headers: CORS, CSP, and other protections
- Node.js version >=16.0.0
- Yarn package manager
- Git for version control
- serve for production builds:
npm install -g serve
- Nginx for reverse proxy (Linux server configuration)
- SSL certificate (Let's Encrypt recommended)
- Domain name
- NIP-07 compatible browser extension (see Important Prerequisites section above)
git clone https://github.com/HORNET-Storage/HORNETS-Relay-Panel.git
cd HORNETS-Relay-Panel
yarn install
For development, create .env.development
with your local service URLs:
REACT_APP_BASE_URL=http://localhost:9002
REACT_APP_WALLET_BASE_URL=http://localhost:9003
REACT_APP_ASSETS_BUCKET=http://localhost
REACT_APP_DEMO_MODE=false
REACT_APP_BASENAME=
# Nostr relay configuration for profile fetching
REACT_APP_OWN_RELAY_URL=ws://localhost:9001
# REACT_APP_NOSTR_RELAY_URLS=wss://your-relay1.com,wss://your-relay2.com,wss://your-relay3.com
# More info https://create-react-app.dev/docs/advanced-configuration
ESLINT_NO_DEV_ERRORS=true
TSC_COMPILE_ON_ERROR=true
For production deployment, you need explicit service URL configuration:
Create .env.production
for production builds:
# Demo mode (set to false for production)
REACT_APP_DEMO_MODE=false
# Service URLs
REACT_APP_WALLET_BASE_URL=http://localhost:9003 # Optional - leave empty to disable wallet features
REACT_APP_OWN_RELAY_URL=ws://localhost:9001 # Required for profile fetching
# Router configuration (empty for direct access)
REACT_APP_BASENAME=
PUBLIC_URL=
# Optional: Custom Nostr relay URLs (comma-separated list)
# REACT_APP_NOSTR_RELAY_URLS=wss://your-relay1.com,wss://your-relay2.com
# Development optimizations
ESLINT_NO_DEV_ERRORS=true
TSC_COMPILE_ON_ERROR=true
π― Key Requirements:
- β Relay URL Required - REACT_APP_OWN_RELAY_URL must be configured for profile fetching
- β Wallet URL Optional - REACT_APP_WALLET_BASE_URL can be empty to disable wallet features
- β Panel Routing Auto-Detection - Panel paths (REACT_APP_BASENAME/PUBLIC_URL) can be auto-detected
- β Build-Time Configuration - Service URLs are baked into the JavaScript bundle during build
- β Simple Deployment - No reverse proxy needed for basic functionality
./start-app.sh # Linux/macOS
start.bat # Windows
yarn start
The development server will start on http://localhost:3000
# Production build
yarn build
# Using provided script (handles Node.js compatibility)
./build.bat # Windows
yarn build # Linux/macOS
Copy the built files to your relay server's web directory and start the services:
# Copy build files to relay server web directory
cp -r build/* /path/to/relay/web/
# Start services (adjust ports as needed)
./relay-websocket-service & # Port 9001
./relay-server-with-panel & # Port 9002 (serves both API and panel)
./wallet-service & # Port 9003
- Panel:
http://localhost:9002/
(or your configured domain) - Wallet Service:
http://localhost:9003/
(direct access) - Relay WebSocket:
ws://localhost:9001/
(WebSocket connection)
β This setup works without any reverse proxy configuration!
Note: Reverse proxy setup with nginx is possible but currently requires additional configuration. The direct access method above is the recommended approach for most users.
π Major Improvement: The panel now uses dynamic URL detection instead of hardcoded environment variables. This means one build works everywhere - no more environment-specific builds or complex URL configuration!
Controls the React app's routing base path:
- `` (empty) - App accessible at
https://domain.com/
(recommended for direct access) /panel
- App accessible athttps://domain.com/panel/
(for reverse proxy setups)
Note: For the current working setup, leave this empty (REACT_APP_BASENAME=
) since the panel is served from the root path.
π― Configuration Requirements:
- Wallet Service:
REACT_APP_WALLET_BASE_URL=http://localhost:9003
(optional - leave empty to disable wallet features) - Relay WebSocket:
REACT_APP_OWN_RELAY_URL=ws://localhost:9001
(required for profile fetching) - Panel API: Auto-detected from current origin (no configuration needed)
Note: When wallet URL is not configured, send/receive buttons will show a helpful message about rebuilding with wallet configuration.
Manual Override (development only):
- REACT_APP_BASE_URL: Panel API endpoint (dev mode only)
- REACT_APP_WALLET_BASE_URL: Wallet service endpoint (dev mode only)
- REACT_APP_NOSTR_RELAY_URLS: Additional Nostr relays (optional)
Set REACT_APP_DEMO_MODE=true
to enable demo functionality with mock data.
Error: digital envelope routines::unsupported
Solution: Scripts include NODE_OPTIONS=--openssl-legacy-provider
Error: JavaScript heap out of memory
Solution: Increase memory allocation:
export NODE_OPTIONS="--openssl-legacy-provider --max-old-space-size=4096"
Error: Network errors or 404s Solution: Verify service URLs in environment variables and ensure backend services are running.
Error: Access to fetch at 'X' from origin 'Y' has been blocked by CORS policy
Solution: Ensure your backend services are configured to accept requests from your frontend origin:
For development with direct access:
# Frontend running on http://localhost:3000
# Backend services must allow this origin in their CORS configuration
REACT_APP_BASE_URL=http://localhost:9002
REACT_APP_WALLET_BASE_URL=http://localhost:9003
For production with reverse proxy (recommended):
# All services behind same domain - no CORS issues
REACT_APP_BASE_URL=https://your-domain.com/panel
REACT_APP_WALLET_BASE_URL=https://your-domain.com/wallet
Note: When using direct port access, each backend service must be configured to allow your frontend's origin in their CORS settings. Using a reverse proxy eliminates CORS issues entirely.
Error: 404 on refresh or direct URL access Solution: Configure nginx to handle React Router:
location /front/ {
try_files $uri $uri/ /front/index.html;
}
Error: WebSocket connection refused Solution: Ensure proper WebSocket configuration in nginx:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
Start services in this order:
- Relay Service (Port 9001) - Core WebSocket functionality
- Panel API (Port 9002) - Main backend
- Wallet Service (Port 9003) - Payment processing
- Media Moderation (Port 8000) - Content filtering (optional)
- Frontend (Port 3000) - User interface
- Nginx health:
curl http://localhost/health
- Individual services:
curl http://localhost:PORT/health
- Hot reloading enabled
- Source maps included
- Verbose error messages
- Direct API calls to localhost ports
- Optimized builds with minification
- Source maps excluded
- Error boundaries for user-friendly errors
- Proxied API calls through reverse proxy
- Use HTTPS in production
- Configure proper CORS policies
- Implement rate limiting
- Regular security headers via nginx
- Keep dependencies updated
- Never commit
.env.production
to version control - Use secure random values for secrets
- Regularly rotate API keys and tokens
Development mode
yarn install && yarn start
Production mode
yarn install && yarn build
.bat and .sh files are included for starting the panel in dev mode and for creating a production build if needed
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- π This panel relies heavily on the Ant Design component library with some modifications
- Based on the Lightence template
- Part of the HORNETS Storage ecosystem
This panel was created using the lightence template which can be found here
For issues and support:
- GitHub Issues: Report bugs and request features
- Community: Join our discussions
- Documentation: Check the wiki for detailed guides
Note: This panel is designed to work with the HORNETS Storage ecosystem:
- HORNETS Nostr Relay - Core relay service (required)
- Super Neutrino Wallet - Payment processing (required for paid features)
- NestShield - Media moderation service (optional)
Ensure you have at minimum the relay service running for basic functionality.