Sign inSign up

corysanin/inner-dj

By corysanin

•Updated 17 days ago

YouTube jukebox server

Image
Web servers
0

5.4K

corysanin/inner-dj repository overview

⁠@inner-dj/server

inner-dj logo

NPM

This is the web server component for inner-dj⁠.

⁠Requirements

  • yt-dlp

⁠Deployment

The inner-dj server is available via npm⁠ and Docker (Docker Hub⁠ and Codeberg⁠).

⁠Docker
docker run -v "${PWD}/config:/usr/src/app/config/:ro" codeberg.org/sanin/inner-dj
⁠npm
npx @inner-dj/server
⁠pnpm
pnpm dlx --allow-build=better-sqlite3 --allow-build=bufferutil --allow-build=utf-8-validate @inner-dj/server

⁠Configuration

By default, inner-dj server will attempt to load a configuration file at config/config.yaml (relative to the current working directory). To use a custom config path, set environment variable CONFIG.

⁠Config Root
YAML keyEnvironment VarTypeDescriptionDefault
portPORTnumberPort to run the web server on8080
trustProxyTRUSTPROXYboolean|number|stringWhether or not the server is behind a proxy and to trust proxy headers. See express behind proxies⁠false
secureSECUREbooleanWhether or not to set the Set-Cookie header to Secure, requiring https traffic for cookiestrue
publicPUBLICbooleanFalse requires a TOTP code to request songs. Navigate to /?override=1 to log in as admin.false
sessionSecretSESSIONSECRETstringThe session secret. Do not share.REQUIRED
userOtpUSEROTPstringTOTP token for user access. Unused if server is public. If blank, one is generated at start up. Check logs.RANDOM
adminOtpADMINOTPstringTOTP token for admin access. If blank, one is generated at start up. Check logs.RANDOM
cookieTTLCOOKIETTLnumberCookie max age in ms2592000000 (30d)
jwtSecretJWTSECRETstringSecret for communications between client and server. Only share with client.REQUIRED
limiter-LimiterOptions⁠Rate limiter settings for authentication endpointsee setDefaultLimits()⁠
cookiesCOOKIESstringOptional path to Netscape-formatted file to read cookies from. See how do I pass cookies to yt-dlp?⁠null
dbDBConfig⁠
discordDiscordReceiverConfig⁠
twilioTwilioReceiverConfig⁠
⁠DBConfig
YAML keyEnvironment VarTypeDescriptionDefault
pathDBPATHstringPath to SQLite DB for session datasessions.db next to config file
⁠DiscordReceiverConfig
YAML keyEnvironment VarTypeDescriptionDefault
enabledDISCORDENABLEDbooleanWhether or not to use Discord for receiving song requests.false
tokenDISCORDTOKENstringDiscord bot token. Required if Discord integration is enabled.REQUIRED
routeDISCORDROUTEstringIf set, creates a redirect to the Discord application's authentication URLnull
activityActivityOptionsSee interface ActivityOptions⁠null
⁠TwilioReceiverConfig
YAML keyEnvironment VarTypeDescriptionDefault
enabledTWILIOENABLEDbooleanWhether or not to use Twilio for receiving song requests via SMS.false
authTokenTWILIOAUTHTOKENstringTwilio auth token. Required if Twilio integration is enabled.REQUIRED
routeTWILIOROUTEstringWebhook endpoint route/webhook/twilio
urlTWILIOURLstringFull URL to webhook endpoint. By default, inner-dj will guess this based on the request headers.
responseTWILIORESPONSEstringSMS response to send in reply to received requests. Empty string results in no reply.EMPTY STRING
errorResponseTWILIOERRORRESPONSEstringSMS response to send if something went wrong . Empty string results in no reply.EMPTY STRING
phoneTWILIOPHONEstringHuman-readable phone number to display in the user instructions.REQUIRED

⁠Usage

Important pages:

  • /landing: The page for users to request songs
  • /admin: Kiosk-like page with instructions for guests
  • /admin/controls: Admin control panel for skipping the current song

Load the /admin page on a device or screen that guests can see. The page has instructions that guests can follow. Skip tracks with /admin/controls when necessary.

Make sure the device displaying /admin has its system time set correctly. Otherwise the QR codes it generates will not work.

Tag summary

Content type

Image

Digest

sha256:045424be0…

Size

203 MB

Last updated

17 days ago

docker pull corysanin/inner-dj