Skip to content

Installation

Hails edited this page Jun 28, 2026 · 1 revision

Installation

Prerequisites

  • An AzuraCast instance with at least one public station
  • A Discord application with Social SDK access (covered in Discord App Setup)
  • Node.js 18 or later on your server
  • PM2 for process management (npm install -g pm2)

Server Setup

Upload all project files to your server, then:

cd /path/to/hails.widgetcast
npm install
cp .env.example .env
nano .env

Fill in your .env:

BOT_TOKEN=your_bot_token
APPLICATION_ID=your_application_id
USER_ID=your_discord_user_id
AZURACAST_BASE_URL=https://your-azuracast-domain.com
STATION_SHORTCODE=your_station_shortcode

See Configuration for the full list of optional settings.

Test it runs correctly:

node sync.js

Or preview every available field with live data without touching Discord:

DRY_RUN=1 node sync.js

You should see a track change logged within a few seconds. Once confirmed, hand it to PM2:

pm2 start ecosystem.config.cjs
pm2 save
pm2 startup

Run the command that pm2 startup outputs to ensure the process survives reboots.

Useful Commands

pm2 logs hails.widgetcast      # view live output
pm2 restart hails.widgetcast   # restart after uploading code changes
pm2 status                         # check process health

For the one-time Discord Developer Portal configuration, see Discord App Setup.

Clone this wiki locally