A server-powered dead man's switch that automatically sends emails when you fail to check in.
Unlike browser-only solutions, this actually works when you're incapacitated because the timer runs on a server with automatic email delivery.
See what it looks like! Visit the GitHub Pages demo for a visual preview (non-functional, just UI).
Want to see how it ACTUALLY works without setting up email?
git clone https://github.com/Ringmast4r/DEAD-MANS-TRIGGER.git
cd DEAD-MANS-TRIGGER
npm install
npm startVisit http://localhost:3000 - the server automatically runs in DEMO MODE when no SendGrid API key is found.
The system logs what WOULD be sent to the console without actually sending emails. Perfect for learning and testing!
For full email functionality, see Email Configuration below or read DEMO-MODE.md.
DO NOT deploy this code to production without implementing security measures first.
- No Authentication - Anyone can access all API endpoints
- Data Exposure -
/api/statusreturns all trigger data publicly - Open CORS - Any website can make requests to the API
- No Rate Limiting - Vulnerable to spam and abuse
- Unencrypted Database - Secret messages stored in plaintext
- No Input Validation - Accepts any data without sanitization
- Add authentication (API keys, login system, or IP whitelist)
- Sanitize
/api/statusto remove sensitive data from response - Implement rate limiting to prevent abuse
- Restrict CORS to your domain only
- Add input validation and sanitization
- Encrypt sensitive database fields
- Add HTTPS enforcement
- Set up monitoring and logging
- Review the SECURITY-EVALUATION.md (if available)
- ✅ Learning server-side timers and automation
- ✅ Understanding dead man's switch concepts
- ✅ Educational purposes and experimentation
- ✅ Local development and testing
- ❌ Production deployments (without security hardening)
- ❌ Storing truly sensitive information
- ❌ Life-critical situations
- ❌ Public-facing services (without authentication)
For production use cases, consider professional services like Google Inactive Account Manager or implement the security measures listed above.
ALL commits must be authored by ringmast4r only.
See COMMIT-RULES.md for commit guidelines. Never include AI attribution or co-authorship tags in commits to this repository.
Main Interface - Setup Screen
Armed & Counting Down
- ✅ Server-side countdown - Runs 24/7, even when your browser is closed
- ✅ Automatic email sending - No manual clicks required
- ✅ File attachments - Automatically emails files when triggered
- ✅ Persistent storage - SQLite database survives server restarts
- ✅ Simple web interface - Easy setup and check-in from any browser
- ✅ Privacy-focused - Success page hides sensitive data
- ✅ SendGrid powered - Reliable email delivery via Web API
- Node.js v14+ (Download)
- SendGrid account (free tier: 100 emails/day)
# 1. Clone or download this repo
git clone https://github.com/Ringmast4r/DEAD-MANS-TRIGGER.git
cd DEAD-MANS-TRIGGER
# 2. Install dependencies
npm install
# 3. Configure email
cp .env.example .env
# Edit .env with your SendGrid API key
# 4. Start server
npm start
# 5. Open web interface
# Visit http://localhost:3000The server uses SendGrid Web API for reliable email delivery.
- Go to SendGrid Signup
- Free tier: 100 emails/day forever (no credit card)
- Verify your email address
- Go to API Keys
- Click "Create API Key"
- Name: "Dead Mans Trigger"
- Permission: Full Access
- Copy the API key
Why? Without domain authentication, Gmail/Outlook may silently drop your emails.
- Go to Sender Authentication
- Click "Authenticate Your Domain"
- Enter your domain (e.g.,
yourdomain.com) - Add the DNS records to your domain provider (Cloudflare, GoDaddy, etc.)
- Click "Verify" in SendGrid
SENDGRID_API_KEY=SG.your-api-key-here
SENDER_EMAIL=alerts@yourdomain.com
SENDER_NAME=Dead Mans Trigger
REPLY_TO_EMAIL=your-personal-email@example.comImportant:
SENDER_EMAILmust use your authenticated domainREPLY_TO_EMAILis where recipients' replies go (can be any email)
- Open http://localhost:3000
- Click "SETUP TRIGGER"
- Set timer duration (e.g., 24 hours = check in daily)
- Add email recipients (comma-separated)
- Write your secret message
- Optional: Upload file, add URLs
- Click "ARM TRIGGER"
- Click "CHECK-IN / RESET" before timer expires
- Proves you're alive and resets countdown
- Can close browser - server keeps running!
- Server automatically sends emails to all recipients
- Includes your secret message
- Attaches any uploaded files
- Privacy-focused success page shows delivery stats (not sensitive data)
Test with a 1-minute trigger:
Duration: 0.0167 hours (1 minute)
Recipients: your-email@example.com
Message: "This is a test"
Wait 1 minute → Check your email inbox!
- Backend: Node.js + Express
- Database: SQLite
- Email: SendGrid Web API (@sendgrid/mail)
- Scheduler: node-cron (checks every 10 seconds)
- Frontend: Vanilla HTML/CSS/JavaScript
No frameworks, no build step - just simple reliable tech.
DEAD-MANS-TRIGGER/
├── server.js # Main server
├── index.html # Web interface
├── package.json # Dependencies
├── .env.example # Email config template
├── COMMIT-RULES.md # Git commit policy
├── .gitignore # Protects sensitive files
└── deadman.db # Database (auto-created)
For 24/7 operation, deploy to cloud:
Recommended Platforms:
- Render - Free tier, easy setup
- Railway - Simple deployment
- Heroku - Free tier available
- DigitalOcean - VPS option
Important: Most cloud hosts block SMTP ports. This is why we use SendGrid Web API (HTTPS port 443) instead of SMTP.
- Push code to GitHub
- Sign up at Render.com
- New Web Service → Connect your repo
- Add environment variable:
SENDGRID_API_KEY - Deploy!
- ✅ A functional dead man's switch for personal use
- ✅ Great for education and understanding automation
- ✅ Reliable for non-critical scenarios
- ❌ Enterprise-grade security
- ❌ Encrypted data storage
- ❌ For life-critical situations
For critical use cases: Use professional services like Google Inactive Account Manager or legal document services.
Data Protection:
- Email credentials stored in
.env(gitignored) - Database stored locally (unencrypted)
- Files stored as base64 (keep under 10MB)
- Anyone with server access can view data
Privacy Features:
- Success page shows recipient COUNT, not addresses
- Message LENGTH shown, not actual content
- File TYPE/SIZE shown, not file contents
Recommendations:
- Keep
.envfile private - Don't commit
.envto version control - Use strong passwords for server access
- Consider encryption for sensitive data
- Send important info to loved ones if you can't check in
- Educational project for learning timers and automation
- Backup system for critical information
- Reminder system with consequences
MIT License - Use however you want!
Pull requests welcome!
Before contributing, read COMMIT-RULES.md for commit guidelines.
Ideas for improvements:
- End-to-end encryption
- SMS notifications (Twilio)
- Web dashboard for multiple triggers
- Multi-user support
- Advanced scheduling
- DEMO-MODE.md - Complete guide to running in demo mode without email
- .env.example - SendGrid configuration guide
- COMMIT-RULES.md - Git commit policy
Emails not arriving?
- Check SendGrid API key is correct
- Verify domain authentication is complete
- Check SendGrid Activity Feed for delivery status
- Make sure
SENDER_EMAILuses authenticated domain
Server won't start?
- Run
npm installto install dependencies - Check
.envfile exists and hasSENDGRID_API_KEY - Make sure port 3000 is available
Database errors?
- Delete
deadman.dbfile - Restart server (will recreate database)
Built by ringmast4r
Version: 2.0 (Server-Powered Edition)

