Trouble ticket system built with Claude Code See .env.example for configuration options.
Email transports supported:
- mailgun
- smtp (direct)
- Google mail API
Incoming message transports:
- mailgun API endpoint
- direct SMTP (listener)
To set up auto-versioning: One-time setup note: The git config command is already done, but if you clone the repo fresh on another machine, run: git config core.hooksPath .githooks && chmod +x .githooks/pre-commit
Git commit steps: git add . git commit -m "comment" git push origin main
- A domain with MX record pointing to your droplet (for inbound email)
- Port 25 open in your DO cloud firewall (Networking → Firewalls)
- Port 3000 open, or a reverse proxy (nginx/caddy) on port 443
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp dockergit clone https://github.com/youruser/yourrepo.git /opt/tix
cd /opt/tixcp .env.example .env
nano .envRequired values to set:
| Variable | Description |
|---|---|
APP_URL |
Public URL, e.g. https://tickets.yourcompany.com |
JWT_SECRET |
Long random string — generate with openssl rand -hex 32 |
TICKET_EMAIL |
Inbound address, e.g. tickets@yourcompany.com |
ADMIN_EMAIL |
First user with this email gets admin role |
MAIL_TRANSPORT |
smtp, mailgun, or gmail |
SMTP_PORT |
Set to 2525 (mapped from port 25 via iptables) |
Set mail transport credentials (SMTP_RELAY_*, MAILGUN_*, or GMAIL_*) as needed.
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --buildData (database, uploads, logs) persists in ./data/ on the host.
The container listens on port 2525. Redirect inbound port 25 to it:
sudo iptables -t nat -A PREROUTING -p tcp --dport 25 -j REDIRECT --to-port 2525
sudo apt install iptables-persistent -y
sudo netfilter-persistent saveVerify with:
sudo iptables -t nat -L PREROUTING -n -vcd /opt/tix
git pull
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --buildThe --build flag rebuilds the image with the latest code. Downtime is a few seconds during container restart.
npm install
npm run dev # auto-restarts on changes; app on http://localhost:3000