Documentation
Everything you need to get RelayCut running on your server in under 5 minutes.
Skip this page. Point your agent (Cursor, Claude, Copilot, Gemini) directly at the AGENTS.md file inside your downloaded ZIP. It contains the full API spec, integration examples in JS, Python, and cURL, and common mistakes — everything your agent needs to wire up email in one shot.
1. Quickstart
After downloading your relaycut.zip from the dashboard, upload it to your VPS (e.g., DigitalOcean, Hetzner, AWS) and unzip it.
unzip relaycut.zip -d relaycut cd relaycut
2. Environment Variables
Copy the example environment file and fill in your SMTP credentials (from Brevo, Mailgun, Amazon SES, etc.) and generate a secure API key.
cp .env.example .env nano .env
Your .env file should look like this:
SMTP_HOST=smtp-relay.brevo.com SMTP_PORT=587 SMTP_USER=your_smtp_login SMTP_PASS=your_smtp_password # Generate a random string for this (e.g., openssl rand -base64 32) RELAY_API_KEY=re_1234567890
3. Docker Deployment
RelayCut comes with a pre-configured Dockerfile and Docker Compose file. You do not need to install Node.js or PM2 on your server. Simply run:
docker-compose up -d
The proxy will start on port 3000 by default. It is configured to automatically restart if the server reboots or if it crashes.
4. Updating Your App (With SDK)
If you use the Resend SDK, leave it exactly as it is, but override the base URL to point to your VPS IP address or domain.
import { Resend } from 'resend';
const resend = new Resend('re_1234567890'); // Must match RELAY_API_KEY in .env
// Override the base URL to point to your new RelayCut instance
resend.baseUrl = 'http://YOUR_VPS_IP:3000';
await resend.emails.send({
from: 'Acme <hello@yourdomain.com>',
to: ['customer@example.com'],
subject: 'Hello from RelayCut',
html: '<p>It works!</p>'
});
5. Using Without SDK (Standard HTTP)
RelayCut functions as a completely standalone JSON REST API. You do not need any SDK to use it. You can send emails using a standard fetch or cURL request.
fetch('http://YOUR_VPS_IP:3000/emails', {
method: 'POST',
headers: {
'Authorization': 'Bearer re_1234567890',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: "Acme <hello@yourdomain.com>",
to: ["customer@example.com"],
subject: "Hello from standard fetch!",
html: "<p>No SDK required.</p>"
})
});
That's it! You are now sending emails through your own SMTP provider via a clean, universal REST API.