Veltrix DevelopmentVeltrix Development

Setup

Setup

  1. Install dependencies:

    npm install
    
  2. Set up MongoDB. Either:

  3. Create your Discord application (used for both login and the status bot):

    • Go to https://discord.com/developers/applications and create an application
    • For dashboard login (OAuth2):
      • Go to OAuth2 > General, copy the Client ID and Client Secret
      • Under OAuth2 > General > Redirects, add: http://localhost:3000/auth/discord/callback (change the host/port if you deploy elsewhere — it must match exactly)
    • For the status bot (optional):
      • Go to Bot, click "Add Bot", copy the Token
      • Invite it to your server with Send Messages / Embed Links / Read Message History permissions
      • Copy the target channel's ID (enable Developer Mode in Discord to right-click a channel > Copy Channel ID)
  4. Find your Discord user ID: enable Developer Mode in Discord (Settings > Advanced), then right-click your own name > Copy User ID.

  5. Copy the example config and fill it in:

    cp config.example.yml config.yml
    
    
     licenseKey: "xxxx-xxxx-xxxx-xxxx"
    
    web:
      port: 3000
      sessionSecret: "some_random_string"
    
    monitoring:
      checkIntervalSeconds: 60
    
    mongodb:
      uri: "mongodb://127.0.0.1:27017/statusbot"
    
    discordBot:
      token: ""          # leave blank to disable the bot
      channelId: ""
      updateIntervalSeconds: 60
    
    discordOAuth:
      clientId: "your_client_id"
      clientSecret: "your_client_secret"
      redirectUri: "http://localhost:3000/auth/discord/callback"
    
    ownerIds:
      - "your_discord_user_id"
    

    You can list more than one ID under ownerIds if you want multiple people to have dashboard access.

  6. Start it:

    npm start
    
  7. Open http://localhost:3000/login and click Sign in with Discord.

  8. Once in, go to Settings (top nav) to set your site name, upload a logo, write custom footer text, toggle hiding target URLs/IPs on the public page, and create categories to group your services.

  9. Go to Maintenance to schedule a maintenance window: give it a title, optionally pick which services it affects (leave all unchecked for a site-wide window), and set a start time (and optionally an end time — leave blank for "ongoing until you end it manually").

Notes

  • Services, check history, and app state all live in MongoDB. Point mongodb.uri in config.yml at any MongoDB instance — local, Docker, or a hosted cluster like Atlas.
  • Uploaded logos are saved to public/uploads/ — make sure this folder persists across deploys/restarts too (same as config.yml).
  • If discordOAuth isn't filled in yet, the login page tells you so instead of showing a broken button.
  • If someone who isn't in ownerIds logs in with Discord, they're sent back to the login page with a "not authorized" message — they never get a session.
  • The public status page auto-refreshes every 30 seconds; the dashboard polls every 15 seconds. Both are adjustable in the view/JS files.
  • Deploy anywhere that runs Node.js (a VPS, Docker, Railway, Render, etc.) — just make sure config.yml persists across restarts/deploys and points at a MongoDB instance that's reachable from wherever you deploy, and update discordOAuth.redirectUri (and the redirect registered in the Discord Developer Portal) to your real domain.

Last updated July 24, 2026