Skip to content

Deploying a Trudesk App

Introduction

Trudesk is an open-source helpdesk and ticketing platform built on Node.js. This guide shows how to containerize Trudesk with a Dockerfile, connect it to MongoDB (and optionally Redis), persist uploads, and deploy to Klutch.sh over HTTP.

Prerequisites

  • GitHub repository containing your Dockerfile.
  • MongoDB database (managed or deployed separately).
  • Optional Redis instance for caching and job queues.
  • Klutch.sh project ready in klutch.sh/app.

Project structure

.
└── Dockerfile

Sample Dockerfile

FROM trudesk/trudesk:latest
# Default Trudesk port
ENV TD_PORT=8118
EXPOSE 8118

Required environment variables

  • MONGODB_URI – Mongo connection string, e.g., mongodb://user:password@host:27017/trudesk?authSource=admin
  • NODE_ENV=production
  • TD_PORT – internal port (default 8118)

Optional environment variables

  • REDIS_HOST / REDIS_PORT / REDIS_PASSWORD – if using Redis.
  • TD_URL – public URL, e.g., https://example-app.klutch.sh
  • TRUDESK_TELEMETRY=false – disable telemetry if desired.

Persistence

Persist uploads, attachments, and backups on a volume:

  • Mount path: /usr/src/trudesk/data
  • Size: based on expected attachments and backups

Networking

  • Protocol: HTTP
  • Internal port: 8118
  • Users reach https://example-app.klutch.sh while Klutch.sh routes to port 8118 inside the container.
Terminal window
curl -I http://localhost:8118

Deployment on Klutch.sh

  1. Push your Dockerfile to GitHub.
  2. In klutch.sh/app, create a new app and select GitHub as the source.
  3. Klutch.sh automatically detects the Dockerfile in the repository root.
  4. Select HTTP traffic and set the internal port to 8118.
  5. Add environment variables for MONGODB_URI, NODE_ENV, TD_PORT, and any Redis or URL settings. Mark sensitive values as secrets.
  6. Attach a persistent volume at /usr/src/trudesk/data sized for your uploads and backups.
  7. Deploy. After first boot, complete the setup wizard and create your admin account.

Verification

  • UI: open https://example-app.klutch.sh and confirm the Trudesk setup or login page loads.

  • Quick check:

    Terminal window
    curl -I https://example-app.klutch.sh

Next steps

  • Enable backups for your MongoDB and the data volume.
  • Configure email (SMTP) for ticket notifications.
  • Set up Redis to improve queueing and caching performance.