Complete Guide: Hosting Laravel Reverb Behind Nginx on a DigitalOcean Droplet
Backend

Complete Guide: Hosting Laravel Reverb Behind Nginx on a DigitalOcean Droplet

Aashish Timalsina
Aashish Timalsina

December 9, 2025

2 min read1,490 views

Production-ready setup for Laravel Reverb with systemd, Nginx reverse proxy, HTTPS, and WebSocket routing.

# Complete Guide: Hosting Laravel Reverb Behind Nginx on a DigitalOcean Droplet This tutorial documents a reliable real-time stack for Laravel Reverb behind Nginx. ## Reverb Environment Variables Configure internal server values for Laravel to reach Reverb and public Vite variables for browser WebSocket connections over HTTPS. ## Systemd Service Create a dedicated reverb.service so the WebSocket server runs continuously and restarts automatically. ## Nginx Reverse Proxy Add proxy headers and Upgrade/Connection settings for /reverb, while keeping standard Laravel and PHP-FPM routing intact. ## SSL and Verification Enable TLS with Certbot, then verify connection state in browser console or by testing websocket handshake endpoints. ## Outcome The stack supports secure, persistent, production-grade real-time broadcasting.
Aashish Timalsina

Aashish Timalsina

Full-stack developer focused on Laravel, Django, Docker, and practical server deployment workflows.

View Profile2,340 followers

Related Articles