Discord Forum to Jira Bridge Deployment Manual

This manual explains how to deploy, configure, validate, and operate the Discord Forum to Jira Bridge service in a reliable way. It is intended to be complete enough for first-time setup and practical enough for production maintenance.

1) Overview

The service listens for newly created Discord forum threads in one target forum channel and creates one Jira issue per thread. A local mapping file stores Discord thread ID to Jira issue key so the same thread is never submitted twice.

How the flow works

  1. Bot receives a thread creation event from Discord.
  2. Service checks that the thread belongs to the configured forum channel.
  3. Service fetches the starter message content.
  4. Service builds an Atlassian Document Format description and creates a Jira issue.
  5. Service writes thread ID and issue key mapping to disk.
This tool currently syncs new forum threads only. It does not sync follow-up replies, Jira comments, or status changes.

2) Prerequisites

  • Node.js 18.17 or newer.
  • A Discord server with a forum channel.
  • A Discord bot token and bot invited to the server.
  • A Jira Cloud site, user email, API token, and project key.
  • Network access from the host to Discord and Jira APIs.
Keep all secrets out of source control. Never commit your bot token or Jira API token.

3) Account Preparation

Discord setup

  1. Create the bot in the Discord Developer Portal.
  2. Invite it to your server with permissions to view channels and read message history.
  3. Enable Developer Mode in Discord client settings.
  4. Right-click your target forum channel and copy its channel ID.

Jira setup

  1. Create a Jira API token in Atlassian account security settings.
  2. Confirm the Jira user can create issues in the target project.
  3. Identify project key and preferred issue type name (default is Bug).

4) Environment Variables

Copy your example environment file and set all values. This service exits on startup if any required values are missing.

copy .env.example .env
Variable Required Description
DISCORD_BOT_TOKEN Yes Token for your Discord application bot user.
DISCORD_FORUM_CHANNEL_ID Yes The forum channel to monitor.
JIRA_BASE_URL Yes Your Jira site URL, for example https://company.atlassian.net.
JIRA_EMAIL Yes Atlassian account email used with API token.
JIRA_API_TOKEN Yes API token generated from Atlassian account settings.
JIRA_PROJECT_KEY Yes Target Jira project key such as ENG or SUP.
JIRA_ISSUE_TYPE No Issue type name, default is Bug.
JIRA_SUMMARY_PREFIX No Prefix added to issue summary, default [Discord].
PORT No HTTP port for health endpoint, default 3000.

5) Local Deployment

Step-by-step commands

npm install
npm run start

On startup, expect logs showing the health endpoint and the connected Discord bot identity. If the bot logs in successfully, the service is now watching your configured forum channel.

Health check

curl http://localhost:3000/health

The endpoint should return a JSON payload similar to {"status":"ok"}. If you changed PORT, call the same endpoint on the configured port.

First live test

  1. Create a new thread in the configured Discord forum.
  2. Observe service logs for a successful Jira issue creation message.
  3. Open Jira and verify summary, description, and labels were generated correctly.
  4. Inspect mapping file to confirm thread ID and Jira key are persisted.

6) Production Deployment

Recommended process supervisor (PM2)

npm install -g pm2
pm2 start src/index.js --name discord-jira-bridge
pm2 save
pm2 startup

PM2 keeps the process alive, restarts on failure, and lets you inspect logs quickly. For small and medium deployments, this is usually the fastest path to operational stability.

Persistence warning

The thread-to-issue mapping file is written to local disk. In ephemeral or containerized environments, mount a persistent volume for the data directory so mappings survive restarts.

If mapping data is lost, old threads can be re-processed and duplicate Jira issues may be created.

Hardening checklist

  • Use a dedicated service account for Jira with minimum required permissions.
  • Store secrets in host secret manager or environment injection system.
  • Restrict outbound network if your environment requires egress policy controls.
  • Set up log collection and alerting for failed Jira API calls.

7) Validation and Acceptance

Deployment acceptance criteria

  • Service starts without missing environment variable errors.
  • Health endpoint returns HTTP 200 with status ok.
  • New Discord forum thread creates one Jira issue in the target project.
  • Repeated processing does not duplicate issue for the same thread ID.
  • Failure conditions are visible in logs with actionable error details.

8) Troubleshooting Guide

Service exits immediately on startup

Cause: one or more required environment variables are not set. Resolution: verify all required variables and restart.

Discord bot connected, but no Jira issues are created

Cause: the event came from a different forum channel, or bot lacks permissions. Resolution: verify DISCORD_FORUM_CHANNEL_ID, bot server permissions, and test in the correct forum.

Jira API errors in logs

Cause: invalid token, invalid project key, unsupported issue type, or permission gap. Resolution: verify Jira credentials, project key, issue type name, and create-issue permission.

Duplicate issues

Cause: mapping file reset or unavailable persistent storage. Resolution: configure persistent volume for mapping data and back up mapping periodically.

9) Operations and Maintenance

Routine tasks

  • Review logs weekly for repeated Jira API errors.
  • Rotate Jira API token and Discord bot token according to policy.
  • Back up mapping data if business process depends on strict de-duplication.
  • Test after dependency upgrades, especially Discord and Jira client libraries.

Upgrade strategy

  1. Deploy in staging with a test Discord forum and test Jira project.
  2. Run at least one end-to-end thread creation test.
  3. Promote to production during a low-traffic window.
  4. Monitor logs for at least 30 minutes post-rollout.