CloudLine
Getting Started

Quick start

From a fresh CloudLine account to a fully monitored bot — five steps, under five minutes.

From zero to a green dashboard in five steps. If you already have a CloudLine account and just need the install snippet, skip to step 2.

NOTE

CloudLine doesn't host your bot. You bring your own running Discord bot — CloudLine watches it. If you haven't deployed a bot anywhere yet, see Hosting a Discord bot first.

1. Add your bot in the dashboard

Sign in at /dashboardAdd bot. Pick a name (you can rename later) and confirm. CloudLine creates two things:

  • A Bot ID — short string, visible in the URL: /dashboard/bots/<bot-id>. Not secret. Safe to commit to code.
  • A Heartbeat secret — looks like clb_live_…. Copy from Settings → Heartbeat secret.

CAUTION

Treat the secret like a password. Anyone with it can post heartbeats as your bot. Store it in your environment variables or your host's secrets manager — never in source control.

2. Install the SDK

Two languages have a real SDK; the rest get a raw-fetch snippet on the dashboard's Heartbeat tab. See Raw HTTP for everything else.

npm install @cloudline/bot-sdk

IMPORTANT

Python: the [metrics] extra pulls in psutil, which is what unlocks CPU, RAM, and uptime tiles on the dashboard. Without it those tiles show . Strongly recommended.

3. Wire attach() into your bot

Add this where you create your bot, before you log it in:

index.js
const { Client, GatewayIntentBits } = require('discord.js')
const { attach } = require('@cloudline/bot-sdk')

const client = new Client({ intents: [GatewayIntentBits.Guilds /* … */] })

attach(client, {
  botId:  process.env.CLOUDLINE_BOT_ID,
  secret: process.env.CLOUDLINE_SECRET,
})

// … your event handlers + command handlers …

client.login(process.env.DISCORD_TOKEN)   // must be the LAST line that runs

IMPORTANT

Sequence matters. attach() MUST run before client.login() / bot.run(). The SDK listens for the ready event; if you log in first, that event may fire before the listener is in place — your status stays grey and no errors appear in the log.

4. Restart

The first heartbeat lands when your Discord library emits ready (or immediately if the bot was already ready when attach() ran). The dashboard's status flips to online within ~10 seconds, and the Telemetry tiles populate within one heartbeat interval (default 30 s, configurable on Pro / Business — see Plan limits).

5. Verify

Walk through the panel:

  • Status ribbon green → heartbeats are arriving on time.
  • Telemetry → RAM / CPU shows numbers (not ) → the SDK is reading process stats.
  • Slash p50 / p95 stays until someone runs a slash command — expected, it's a "sampled when used" metric, not polled.
  • Component p50 / p95 same — populated on button / select-menu clicks.

CAUTION

Still seeing everywhere after a minute? Jump to No data showing — the most common cause is environment variables not loaded in the runtime (PM2, systemd, and Docker all have ways to strip .env files).

What's next