- Fixed %ERRORLEVEL% bug in Start Haven.bat (parse-time expansion inside if block) - Bat file now detects HTTP vs HTTPS and opens correct URL in browser - Added SSL/HTTPS troubleshooting to README and GUIDE - Bumped version to 1.4.5
8.5 KiB
⬡ Haven — User Guide
Welcome to Haven, your private chat server. This guide covers everything you need to get Haven running and invite your friends.
📋 What You Need
- Windows 10 or 11 (macOS / Linux can run it manually)
- Node.js version 18 or newer → Download here
- About 50 MB of disk space
🚀 Getting Started
Step 1 — First Launch
Double-click Start Haven.bat
That's it. The batch file will:
- Check that Node.js is installed
- Install dependencies (first time only)
- Generate SSL certificates (first time only)
- Start the server
- Open your browser to the login page
Step 2 — Create Your Admin Account
- On the login page, click Register
- Create an account with the admin username (default:
admin— check your data directory's.envfile) - This account can create and delete channels
Step 3 — Create a Channel
- In the sidebar, use the Create Channel box (admin only)
- Give it a name like "General" or "Gaming"
- Haven generates a unique channel code (8 characters)
- Share this code with your friends — it's the only way in
Step 4 — Invite Friends
Send your friends:
- Your server address:
https://YOUR_IP:3000 - The channel code
They'll register their own account, then enter the code to join your channel.
🌐 Setting Up Remote Access (Friends Over the Internet)
If your friends are not on your local WiFi, you need to set up port forwarding so they can reach your PC from the internet.
Find Your Public IP
Visit whatismyip.com — the number shown (like 203.0.113.50) is what your friends will use.
Port Forwarding on Your Router
Every router is different, but the general steps are:
-
Log into your router — usually
http://192.168.1.1orhttp://10.0.0.1in your browser -
Find Port Forwarding (sometimes called NAT, Virtual Servers, or Applications)
-
Create a new rule:
Field Value Port 3000Protocol TCP Internal IP Your PC's local IP (e.g. 10.0.0.60) -
Save and apply
How to find your local IP: Open Command Prompt and type
ipconfig. Look for the "IPv4 Address" under your Ethernet or WiFi adapter.
Windows Firewall
The server needs permission to accept incoming connections:
- Open Start Menu → search "Windows Defender Firewall"
- Click "Advanced settings" on the left
- Click "Inbound Rules" → "New Rule..."
- Select Port → TCP → enter
3000 - Allow the connection → apply to all profiles
- Name it something like "Haven Chat"
Or run this in PowerShell (as Administrator):
New-NetFirewallRule -DisplayName "Haven_Chat" -Direction Inbound -LocalPort 3000 -Protocol TCP -Action Allow
Tell Your Friends
Send them this URL:
https://YOUR_PUBLIC_IP:3000
⚠️ Certificate Warning: Your friends' browsers will show a security warning because Haven uses a self-signed certificate. This is normal and expected. Tell them to click "Advanced" → "Proceed to site". The connection is still encrypted.
🔧 Router-Specific Tips
Xfinity / Comcast (XB7 Gateway)
- Open the Xfinity app on your phone
- Go to WiFi → scroll down → Advanced settings → Port forwarding
- Select your PC from the device list
- Add port
3000(TCP/UDP) and apply - Important: Go to Home → disable xFi Advanced Security — it silently blocks all inbound connections
- Verify the reserved IP in port forwarding matches your PC's actual IP (
ipconfigto check)
Common Issues
| Problem | Solution |
|---|---|
| "SSL_ERROR_RX_RECORD_TOO_LONG" | Browser is using https:// but server is running HTTP. Change URL to http://localhost:3000, or install OpenSSL and restart (see Troubleshooting below) |
| Friends get "took too long to respond" | Port forwarding not set up, or firewall blocking |
| Friends get "connection refused" | Server isn't running — launch Start Haven.bat |
Can't connect with https:// |
Make sure you're using port 3000, not 443 |
| Voice chat doesn't work | Must use https:// — voice requires a secure connection |
| "Certificate error" in browser | Normal — click Advanced → Proceed |
🎨 Themes
Haven comes with 6 themes. Switch between them using the theme buttons at the bottom of the left sidebar:
| Button | Theme | Style |
|---|---|---|
| ⬡ | Haven | Deep blue/purple (default) |
| 🎮 | Discord | Dark gray with blue accents |
| Ⅿ | Matrix | Black and green, scanline overlay |
| ◈ | Tron | Black with neon cyan glow |
| ⌁ | HALO | Military green with Mjolnir vibes |
| ⚜ | LoTR | Parchment gold and deep brown |
| 🌆 | Cyberpunk | Neon pink and electric yellow |
| ❄ | Nord | Arctic blue and frost |
| 🧛 | Dracula | Deep purple and blood red |
| ⚔ | Bloodborne | Gothic crimson and ash |
| ⬚ | Ice | Pale blue and white |
| 🌊 | Abyss | Deep ocean darkness |
Your theme choice is saved per browser.
🎤 Voice Chat
- Join a text channel first
- Click 🎤 Join Voice in the channel header
- Allow microphone access when your browser asks
- Click 🔇 Mute to toggle your mic
- Click 📞 Leave to disconnect from voice
Voice chat is peer-to-peer — audio goes directly between you and other users, not through the server.
Voice requires HTTPS. If you're running locally, use
https://localhost:3000. For remote connections, usehttps://YOUR_IP:3000.
⚙️ Configuration
All settings are in the .env file in your data directory:
| OS | Data Directory |
|---|---|
| Windows | %APPDATA%\Haven\ |
| Linux / macOS | ~/.haven/ |
| Setting | What it does |
|---|---|
PORT |
Server port (default: 3000) |
ADMIN_USERNAME |
Which username gets admin powers |
JWT_SECRET |
Auto-generated security key — don't share this |
HAVEN_DATA_DIR |
Override where data is stored |
.envis created automatically on first launch. If you change it, restart the server.
💡 Tips
- Bookmark the URL — so you don't have to type the IP every time
- Keep the bat window open — closing it stops the server
- Your data is stored separately — all messages, config, and uploads are in your data directory (
%APPDATA%\Havenon Windows,~/.havenon Linux/macOS), not in the Haven code folder - Back up your data directory — copy it somewhere safe to preserve your chat history
- Channel codes are secrets — treat them like passwords. Anyone with the code can join.
🆘 Troubleshooting
"SSL_ERROR_RX_RECORD_TOO_LONG" or "ERR_SSL_PROTOCOL_ERROR" in browser
→ Your browser is trying to connect via https:// but the server is actually running in HTTP mode. This happens when SSL certificates weren't generated (usually because OpenSSL isn't installed).
Quick fix: Change the URL in your browser from https://localhost:3000 to http://localhost:3000.
Permanent fix: Install OpenSSL so Haven can generate certificates:
- Download from slproweb.com/products/Win32OpenSSL.html (the "Light" version is fine)
- During install, choose "Copy OpenSSL DLLs to the Windows system directory"
- Restart your PC (so OpenSSL is added to PATH)
- Delete the
certsfolder in your data directory (%APPDATA%\Haven\certs) - Re-launch
Start Haven.bat— it will regenerate certificates and start in HTTPS mode
How to tell if you're running HTTP or HTTPS:
Check the server's startup banner in the terminal. If it says http://localhost:3000 — you're on HTTP. If it says https://localhost:3000 — you're on HTTPS. The protocol in the URL you use must match.
"Node.js is not installed" → Download and install from nodejs.org. Restart your PC after installing.
Server starts but browser shows blank page → Try clearing your browser cache, or open in an incognito/private window.
Friends can connect locally but not remotely → Port forwarding isn't configured correctly. Double-check the port, protocol, and internal IP.
"Error: EADDRINUSE"
→ Another program is using port 3000. Close it, or change the port in .env.
Voice chat echoes → Use headphones to prevent your speakers from feeding into your microphone.
⬡ Haven — Your server. Your rules.