Overview
The MagenX404 server handles authentication requests and verifies wallet signatures and token holdings. This guide will help you set up and run your own server instance.Quick Start
1. Install Dependencies
2. Configure Environment Variables
Create a.env file in the project root:
3. Start the Server
http://localhost:3000
Environment Variables
Port number for the server (default: 3000)
Secret key for signing JWT tokens. Generate a secure random string for
production.
JWT token expiration time (default: “30d”)
Solana RPC endpoint URL. Use a dedicated provider for production.
Generate Secure JWT Secret
Testing the Server
Health Check
Test Nonce Generation
X-404-Nonce header.
Updating Client Code
To use your local server instead of the hosted one, update the URLs in the feature files:Server Structure
API Endpoints
All endpoints are available at/x404_auth/{feature}:
/x404_auth/blacklist- Blacklist feature/x404_auth/timelock- TimeLock feature/x404_auth/multitoken- MultiToken feature/x404_auth/activity- Activity feature/x404_auth/tier- Tier feature/x404_auth/nodebt- NoDebt feature/x404_auth/age- Age feature
Next Steps
Deployment Guide
Learn how to deploy your server to production