Skip to main content

Service Setup

This guide explains how to set up the MSK Transcript Service for your self-hosted bot instance.
The service stores ticket transcripts online and makes them accessible via a public link.
Optionally, Premium users can serve transcripts under their own custom domain.


1. What is the Transcript Service?

When a ticket is closed, the bot generates a complete HTML transcript of all messages.
Without a configured API key, the transcript is sent as a file attachment via DM, as before.

With the MSK Transcript Service, the transcript is uploaded to www.msk-scripts.de instead
and a public link is returned. Users can open the transcript directly in their browser.

Premium users additionally get downloadable file attachments in the transcript and can
configure a custom domain so transcripts are served under their own URL.


2. Subscription Tiers

FeatureBasic (free)Premium (€3.99/month)Premium+ (€6.99/month)Business (€9.99/month)
Transcript as link
Max. transcript size10 MB50 MB100 MB200 MB
File attachments in transcript
Max. attachment size per ticket100 MB200 MB500 MB
Custom domain
Storage duration30 days180 days365 days10 years
Uploads per hour3060300300
Remove the MSK notice
Hosted bot management

Paid tiers are subscribed in your dashboard via Stripe, with a 14-day free trial and no card
for new customers (cancel anytime). Manage or cancel anytime via the Stripe customer portal.


3. Step 1 – Set up Stripe (subscriptions)

Purpose: Premium and Premium+ are billed via Stripe. This step is only needed
if you self-host the website. On the official msk-scripts.de it is already configured.

Instructions

  1. In the Stripe DashboardProducts, create two products, each with a recurring monthly price:

    • Ticketbot Premium → €3.99 / month
    • Ticketbot Premium+ → €6.99 / month
    • Ticketbot Business → €9.99 / month

    Copy each Price ID (price_…). Do not configure a trial on the price: 14-day trial is applied automatically in code for new customers.

  2. Developers → API keys → copy your Secret key (sk_…).

  3. Settings → Billing → Customer portal → enable it (allow cancellation + plan changes).

  4. Developers → Webhooks → add an endpoint https://www.msk-scripts.de/api/webhook/stripe with the events checkout.session.completed, customer.subscription.created/updated/deleted, invoice.payment_succeeded, invoice.payment_failed. Copy the signing secret (whsec_…).

Where to add these

These values go into .env.local on the web server (not the bot's .env):

STRIPE_SECRET_KEY=sk_live_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
STRIPE_PRICE_PREMIUM=price_xxx
STRIPE_PRICE_PREMIUM_PLUS=price_xxx

4. Step 2 – Create a Discord OAuth App

Purpose: The website reads your Discord server list so you can select
which server the API key should apply to.

Instructions

  1. Open discord.com/developers/applications
  2. Click "New Application"
  3. Give it a name, e.g. MSK Ticket Verify
  4. Click "OAuth2" in the left sidebar
  5. Under "Redirects", click "Add Redirect" and enter:
    https://www.msk-scripts.de/api/auth/discord-verify/callback
  6. Click "Save Changes"
  7. Copy the Client ID shown on the OAuth2 page
  8. Click "Reset Secret" and copy the Client Secret

Where to add these

DISCORD_VERIFY_CLIENT_ID=your_client_id_here
DISCORD_VERIFY_CLIENT_SECRET=your_client_secret_here

⚠️ This is a separate application from the Discord bot itself.
Do not use the bot token here, only Client ID and Secret.


5. Step 3 – Verify on the Website

This process must be completed once per server by a server administrator.

5.1 Open the website

Go to www.msk-scripts.de/ticketbot/verify in your browser.


5.2 Connect Discord

Click "Sign in with Discord".
You will be redirected to Discord, click "Authorize".

The app requests two permissions:

  • identify: to recognize your Discord account
  • guilds: to display the list of your servers

5.3 Select your server

You will see a list of all Discord servers where you have Administrator permissions.
Select the server you want the API key for and click "Generate API Key".

ℹ️ Each server requires its own separate API key.
If you manage multiple servers, repeat the process for each one.


5.4 Save your API Key

After generation, your personal API key is displayed.
Copy it immediately: it will not be shown again.

MSK_API_KEY=a1b2c3d4e5f6...

⚠️ Important: If you run the verify process again for the same server,
a new API key is generated and the old one becomes invalid immediately.
You will need to update the key in your bot's .env and restart the bot.

🔒 Never share this key. Anyone who has it can upload transcripts on your behalf.

✅ You can close this page once you have safely copied the key.


6. Step 4 – Add the API Key to the Bot

Open the .env file in your bot folder and add:

MSK_API_KEY="your_api_key_here"
MSK_API_URL="https://www.msk-scripts.de"

Then restart the bot.


7. Step 5 – Set up a Custom Domain (Premium)

This step is only available for Premium and Premium+ subscribers.
Basic users can skip this step.

A custom domain lets your users access transcripts under your own URL,
e.g. https://tickets.yourserver.com/... instead of https://www.msk-scripts.de/...

7.1 Open the Dashboard

After completing the verify process, click "Go to Dashboard",
or visit www.msk-scripts.de/ticketbot/dashboard directly.


7.2 Enter your domain

The Custom Domain tab, with a card for transcripts and one for the bot dashboard

In the "Custom Domain" section, enter your desired domain, e.g.:

tickets.yourserver.com

Click "Set". If the DNS is not yet pointing to the server, you will see the DNS instructions.


7.3 Set the DNS A-Record

Log in to your domain registrar (e.g. Cloudflare, Namecheap, IONOS) and create an A-Record:

TypeNameTarget (IP)
Atickets (or @ for root)The IP address shown in the dashboard

⏱ DNS propagation can take up to 24 hours.
Most providers process changes within a few minutes to an hour.


7.4 Validate DNS and activate

Once DNS has propagated, click "Check DNS" in the dashboard.
If the domain points correctly to the server, it will be activated automatically:

  • An Apache2 VirtualHost is created on the server
  • A free SSL certificate (Let's Encrypt) is obtained via Certbot
  • Your transcripts are immediately accessible under your domain

7.5 Remove a domain

To remove a custom domain, click the trash icon next to the active domain in the dashboard.
The VirtualHost will be removed from the server and transcripts revert to the default URL.


8. Step 6 – Hosted Bot Management (Premium, Premium+ & Business)

This step is only for paid subscribers who want us to run the bot for them. Basic users, and anyone happy running it themselves, can skip it.

You set hosting up yourself in the dashboard. No SSH access, no server knowledge, and no ticket to open first.

The Bot Hosting tab before activation

Setting it up

  1. Open msk-scripts.de/ticketbot/dashboard and go to the Bot Hosting tab.

  2. Enter three values from the Discord developer portal:

    ValueWhere to find it
    Bot tokenYour application → Bot → Token. Discord shows a token only once, so use Reset Token if you never revealed it.
    Client IDYour application → OAuth2 → Client ID
    Client secretYour application → OAuth2 → Client Secret

    Everything else, from the guild id and API key to ports and session secrets, is filled in for you.

  3. Press Activate bot hosting. We install the bot, start it, and check that it actually came up. Installing takes a couple of minutes; you can close the page while it runs.

  4. Register the redirect URL. The dashboard shows you a URL like https://tickets-a3f9c1b408d2.msk-scripts.de/auth/callback. Add it in the developer portal under OAuth2 → Redirects. Only you can do this, and the login to your bot's dashboard does not work without it.

If the bot does not come up, you get its own log back and can correct the value right there. The bot is not reinstalled for that, only restarted.

What's available

Bot Hosting once it runs: its address, bot control and live logs

FeatureDescription
Its own addressYour bot's dashboard is published at tickets-<id>.msk-scripts.de, or under a domain of your own set in the Custom Domain tab. The TLS certificate is included either way.
A login for your teamThat dashboard runs its own Discord login, so your staff sign in with their own account and see exactly what their permissions allow. This is the part the old setup could not do: it only ever let the server owner in.
Bot ControlStart, stop and restart the bot with a single click.
One-click UpdateDownloads the latest version via git pull and installs new dependencies. Restart required afterwards.
Live Log ConsoleReal-time stream of the bot's PM2 output directly in the browser.
Credentials formCorrect the token or client secret without a terminal. It matters precisely when the bot is down, because then its own dashboard is the thing you cannot reach.

Removing it again

Remove hosting in the same tab stops the bot, takes its address offline and archives the installation. The archive is deleted for good after 14 days.

Within those 14 days, activating hosting again asks whether you want the old installation back. Choosing that returns it with its tickets, its settings and the same address, so you do not have to touch the Discord developer portal a second time.


9. Console Output on Startup

When the bot starts you will see the following in the terminal:

███╗ ███╗███████╗██╗ ██╗
████╗ ████║██╔════╝██║ ██╔╝
██╔████╔██║███████╗█████╔╝
██║╚██╔╝██║╚════██║██╔═██╗
██║ ╚═╝ ██║███████║██║ ██╗
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
████████╗██╗ ██████╗██╗ ██╗███████╗████████╗ ██████╗ ██████╗ ████████╗
...
https://github.com/MSK-Scripts/discord_ticketbot

Checking for updates... up to date (v2.10.0)
Checking API Key... API key valid → Premium+

Connecting to Discord...

[INFO] Database initialized.
[INFO] Commands loaded...
[OK ] Slash commands registered successfully.
...
[OK ] Logged in as BotName#1234
[INFO] Serving 1 guild(s).
[INFO] Status set: WATCHING "Support Tickets"

✔ MSK Ticket Bot successfully started!
──────────────────────────────────────────
Bot BotName#1234
Guilds 1
Commands 19

Tip: To see colors when running as a systemd service, use:

journalctl -u ticketbot.service -f --output=cat

Possible API Key results

OutputMeaning
No API key configured → BasicNo MSK_API_KEY set in .env
Invalid API key → BasicThe key is incorrect or has been regenerated
MSK server unreachable → Basicwww.msk-scripts.de is temporarily unreachable
API key valid → Premium✅ Premium active
API key valid → Premium+✅ Premium+ active