Cloudflare

Deploy the Glyph server as a free Cloudflare Worker with accounts, sync and your own domain.

You need a Cloudflare account and Node.js 22 or newer. No Rust and no checkout.

npm install --global glyph-server
glyph setup cloudflare

The setup uses your account: it creates a Worker and a D1 database (optionally an R2 bucket), applies the database migrations, asks for an admin password (hashed on your computer) and deploys. Your project is glyph-cloudflare/wrangler.json.

Change options

glyph cloudflare list
glyph cloudflare set RATE_LIMIT_PER_MIN 120
glyph cloudflare set REQUIRE_ACCOUNT true
glyph cloudflare domain glyph.example.com
glyph cloudflare secret LASTFM_API_KEY
glyph deploy
  • set / unset change values in wrangler.json; glyph deploy applies them.
  • secret stores a key in Cloudflare without echo; it applies at once.
  • domain serves the Worker on your own domain (its zone must be on your account) and sets PUBLIC_ORIGIN.

Passkeys are bound to PUBLIC_ORIGIN. Pick your final domain before people sign up; password sign-in keeps working after a change.

ValueMeaning
RATE_LIMIT_PER_MINanonymous requests per minute and IP (60)
YOUTUBE_DAILY_BUDGET_UNITSYouTube Data API units per day (9000)
REQUIRE_ACCOUNTonly signed-in apps may use the API
PUBLIC_ORIGINthe HTTPS origin of your server
SHARE_ORIGINorigin of short /p/ playlist links
YTDLP_SERVICE_URLyour companion, for YouTube

Secrets: YOUTUBE_API_KEY, JAMENDO_CLIENT_ID, SOUNDCLOUD_CLIENT_ID, SOUNDCLOUD_CLIENT_SECRET, SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET, LASTFM_API_KEY, YTDLP_SERVICE_TOKEN, GLYPH_SERVER_BEARER.

Live settings

These change without a deploy, with the admin password:

glyph remote login https://glyph.example.com
glyph remote limits --rate 120
glyph remote companion off
glyph remote mcp off
glyph remote accounts default-limit 5

YouTube

Workers cannot run yt-dlp. Run the companion in Docker on any machine, then:

glyph cloudflare set YTDLP_SERVICE_URL https://companion.example.com
glyph cloudflare secret YTDLP_SERVICE_TOKEN

Updates

glyph update cli
glyph update server --worker-config glyph-cloudflare/wrangler.json

edit this page on github · markdown

up down choose · enter open · esc closellms.txt