Self-Hosting GudDesk: A Complete Guide
Everything you need to know about running GudDesk on your own infrastructure — from Docker to bare metal.

One of GudDesk's core principles is that you should own your data. Self-hosting makes that a reality. This guide walks you through everything you need to run GudDesk on your own infrastructure.
Prerequisites
Before you start, you'll need:
- Docker and Docker Compose (recommended) or Node.js 20+
- PostgreSQL 15+ (or use the bundled Docker container)
- A domain name (for the chat widget and dashboard)
- An SMTP service (Resend, SendGrid, or any SMTP provider for transactional emails)
Quick Start with Docker
The fastest way to get GudDesk running is with Docker Compose:
# Clone the repository
git clone https://github.com/guddesk/guddesk.git
cd guddesk
# Copy the environment template
cp .env.example .env
# Edit .env with your configuration
# At minimum, set DATABASE_URL, AUTH_SECRET, and RESEND_API_KEY
# Start everything
docker compose up -dThat's it. GudDesk will be running at http://localhost:3000 with a PostgreSQL database.
Environment Variables
Here are the key environment variables you'll need to configure:
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string |
AUTH_SECRET | Yes | Random secret for session encryption |
RESEND_API_KEY | Yes | For transactional emails |
NEXT_PUBLIC_APP_URL | Yes | Your public-facing URL |
GOOGLE_CLIENT_ID | Yes | For Google OAuth sign-in |
GOOGLE_CLIENT_SECRET | Yes | For Google OAuth sign-in |
PUSHER_APP_ID | No | For real-time messaging |
ANTHROPIC_API_KEY | No | For AI agent features |
Running Without Docker
If you prefer running directly on your server:
# Install dependencies
pnpm install
# Run database migrations
pnpm db:push
# Build the application
pnpm build
# Start production server
pnpm startWe recommend using a process manager like PM2 to keep GudDesk running:
pm2 start pnpm --name guddesk -- startSetting Up the Chat Widget
Once your instance is running, embed the chat widget on your site:
<script>
window.GudDeskSettings = {
appId: "gd_pub_xxxxxxxxxxxxxxxx",
baseUrl: "https://your-guddesk-domain.com"
};
</script>
<script src="https://your-guddesk-domain.com/widget.js" async></script>You can find your App ID (prefixed gd_pub_) in the dashboard under Settings > Widget. This value is safe to include in client-side code — it only identifies your workspace.
Database Backups
Since you own the database, you're responsible for backups. We recommend:
# Daily automated backup
pg_dump $DATABASE_URL > backup-$(date +%Y%m%d).sqlSet this up as a cron job or use your cloud provider's managed backup service.
Updating
To update your self-hosted instance:
# Pull the latest changes
git pull origin main
# Install any new dependencies
pnpm install
# Run migrations
pnpm db:push
# Rebuild and restart
pnpm build
pm2 restart guddeskReverse Proxy Setup
For production, put GudDesk behind a reverse proxy like Nginx or Caddy:
server {
listen 443 ssl;
server_name support.yourdomain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}Need Help?
If you run into issues:
- Check the documentation for detailed configuration guides
- Open an issue on GitHub
- Join the community discussions
Self-hosting gives you complete control over your customer data and infrastructure. It's a bit more work upfront, but the peace of mind is worth it.
More Articles
Introducing GudDesk: The Open-Source Intercom Alternative
We built the customer messaging platform we always wanted — open source, self-hostable, and free for small teams.
June 15, 2025
Why We're Building an Open-Source Support Platform
The case for open-source customer support tooling — and why vendor lock-in shouldn't be the price of talking to your users.
June 10, 2025