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
.└── DockerfileSample Dockerfile
FROM trudesk/trudesk:latest
# Default Trudesk portENV TD_PORT=8118EXPOSE 8118Required environment variables
MONGODB_URI– Mongo connection string, e.g.,mongodb://user:password@host:27017/trudesk?authSource=adminNODE_ENV=productionTD_PORT– internal port (default8118)
Optional environment variables
REDIS_HOST/REDIS_PORT/REDIS_PASSWORD– if using Redis.TD_URL– public URL, e.g.,https://example-app.klutch.shTRUDESK_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.shwhile Klutch.sh routes to port8118inside the container.
Health check (recommended)
curl -I http://localhost:8118Deployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
8118. - Add environment variables for
MONGODB_URI,NODE_ENV,TD_PORT, and any Redis or URL settings. Mark sensitive values as secrets. - Attach a persistent volume at
/usr/src/trudesk/datasized for your uploads and backups. - Deploy. After first boot, complete the setup wizard and create your admin account.
Verification
-
UI: open
https://example-app.klutch.shand 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.