Google Workspace Replacement
Overview
This deployment provides a complete self-hosted Google Workspace replacement optimized for a small homelab (1-2 users) with smart home integration.
Services Included
π₯ Jitsi Meet - Video Conferencing (meet.home.dodwell.us)
- Components: Web UI, Jicofo, JVB, Prosody XMPP, Jigasi SIP Gateway
- Features:
- Video conferencing optimized for 1-2 users
- SIP integration with Asterisk PBX at
192.168.1.202:5060 - Doorbell integration via Home Assistant
- Mobile and desktop app support
βοΈ Nextcloud - File Storage & Office Suite (cloud.home.dodwell.us)
- Components: Nextcloud, PostgreSQL, Redis, OnlyOffice DocumentServer
- Features:
- File storage and synchronization
- Online document editing with OnlyOffice
- Calendar and contacts sync
- Mobile apps support
- Optimized for small homelab usage
π§ Email Suite - Complete Email Solution (mail.home.dodwell.us)
- Components: Docker Mailserver, SOGo Groupware, MySQL
- Features:
- Full SMTP/IMAP/POP3 email server
- Web-based email client (SOGo)
- Calendar and contacts via SOGo
- Spam filtering and virus scanning
- DKIM/SPF/DMARC support
π Smart Home Integration
- Reolink Doorbell Integration:
- Auto-creates Jitsi rooms on doorbell press
- Calls Cisco phone via Asterisk SIP
- Captures photos and video clips
- Sends notifications via Telegram
- Motion detection and alerts
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β K3s Cluster Network β
βββββββββββββββββββββββ¬ββββββββββββββββββ¬ββββββββββββββββββββββ€
β Jitsi Meet β Nextcloud β Email Suite β
β (Video Conf) β (Files/Office)β (Mail/Calendar) β
β β β β
β β’ Web UI β β’ Nextcloud β β’ Docker Mailserverβ
β β’ Prosody XMPP β β’ PostgreSQL β β’ SOGo Groupware β
β β’ Jicofo β β’ Redis β β’ MySQL β
β β’ JVB β β’ OnlyOffice β β
β β’ Jigasi (SIP) β β β
βββββββββββββββββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β External Integrations β
βββββββββββββββββββ¬ββββββββββββββββββ¬ββββββββββββββββββββββββββ€
β Asterisk PBX β Home Assistant β Storage & Network β
β (192.168.1.202) β (Automation) β β
β β β β
β β’ Cisco Phones β β’ Reolink β β’ TrueNAS NFS/iSCSI β
β β’ SIP Gateway β Doorbell β (192.168.1.6) β
β β’ Jigasi Bridge β β’ Telegram Bot β β’ MetalLB LoadBalancer β
β β’ Extensions β β’ Automations β β’ nginx Ingress β
β 1000-1002 β β β’ cert-manager (LE) β
βββββββββββββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββββββββββ
Prerequisites
Infrastructure Requirements
- K3s cluster with at least 1 master + 1 worker node
- TrueNAS at
192.168.1.6with NFS exports configured - Asterisk PBX at
192.168.1.202(already configured) - Home Assistant deployed and configured
- MetalLB for LoadBalancer services
- nginx Ingress Controller
- cert-manager for SSL certificates
DNS Configuration
Ensure these DNS records point to your K3s ingress:
meet.home.dodwell.uscloud.home.dodwell.usmail.home.dodwell.usonlyoffice.home.dodwell.us
Storage Preparation
Create NFS exports on TrueNAS (192.168.1.6):
# On TrueNAS, create these datasets (matching existing pattern):
/mnt/tank/nfs/nextcloud/data/
/mnt/tank/nfs/nextcloud/config/
/mnt/tank/nfs/nextcloud/postgres/
/mnt/tank/nfs/nextcloud/redis/
/mnt/tank/nfs/mailcow/data/
/mnt/tank/nfs/mailcow/mysql/
/mnt/tank/nfs/mailcow/redis/
/mnt/tank/nfs/mailcow/solr/
ArgoCD Deployment
Added Applications
The following ArgoCD applications have been added to k3s/envs/local/:
jitsi-meet.yaml- Video conferencing with SIP integrationnextcloud.yaml- File storage and office suitemailcow.yaml- Complete email solution
Deployment Options
Option 1: Sync All Applications
# Sync the entire local environment (includes new apps)
kubectl apply -k k3s/envs/local/
Option 2: Sync Individual Applications
# Sync each application individually
argocd app sync jitsi-meet
argocd app sync nextcloud
argocd app sync mailcow
Option 3: Auto-Sync (Recommended)
# Enable auto-sync for the new applications
argocd app set jitsi-meet --sync-policy automated --auto-prune --self-heal
argocd app set nextcloud --sync-policy automated --auto-prune --self-heal
argocd app set mailcow --sync-policy automated --auto-prune --self-heal
Manual Deployment Instructions
Step 1: Deploy Jitsi Meet
# Deploy base Jitsi Meet stack
kubectl apply -k k3s/apps/jitsi-meet/overlays/local/
# Verify deployment
kubectl get pods -n jitsi-meet
kubectl get ingress -n jitsi-meet
# Check Jigasi SIP connection to Asterisk
kubectl logs -n jitsi-meet deployment/jigasi
Step 2: Configure Asterisk for Jigasi
The Asterisk configuration has been updated to include the Jigasi user:
# Apply updated Asterisk configuration
kubectl apply -k k3s/apps/asterisk/overlays/local/
# Restart Asterisk to load new config
kubectl rollout restart deployment/asterisk -n telephony
Step 3: Deploy Nextcloud
# Deploy Nextcloud with OnlyOffice
kubectl apply -k k3s/apps/nextcloud/overlays/local/
# Wait for all pods to be ready
kubectl wait --for=condition=ready pod -l app=nextcloud -n nextcloud --timeout=300s
# Get admin password
kubectl get secret nextcloud-secret -n nextcloud -o jsonpath='{.data.nextcloud-admin-password}' | base64 -d
Step 4: Deploy Email Suite
# Deploy email server and SOGo
kubectl apply -k k3s/apps/mailcow/overlays/local/
# Check email server status
kubectl get pods -n mailcow
kubectl logs -n mailcow deployment/mailserver
# Verify SOGo web interface
kubectl get ingress -n mailcow
Step 5: Configure Home Assistant Doorbell Integration
- Deploy updated Home Assistant configuration:
kubectl apply -k k3s/apps/home-assistant/overlays/local/
Set up Telegram Bot:
- Create bot with @BotFather
- Get bot token and chat ID
- Update Home Assistant secrets
Configure Reolink Doorbell:
- Ensure doorbell is accessible at
192.168.1.205 - Update IP address in Home Assistant secrets if different
- Test camera stream and API access
- Ensure doorbell is accessible at
Test Integration:
# Trigger test automation
kubectl exec -n home-assistant deployment/home-assistant -- \
python -m homeassistant.scripts.check_config
Configuration
Jitsi Meet Configuration
- Domain:
meet.home.dodwell.us - SIP Gateway: Integrated with Asterisk at
192.168.1.202:5060 - User:
jigasiwith passwordjigasi123 - Resource Limits: Optimized for 1-2 concurrent users
- Features: Lobby enabled, recording disabled, optimized bandwidth
Nextcloud Configuration
- Admin User:
admin/nextcloud123 - Database: PostgreSQL with performance optimizations
- Cache: Redis for improved performance
- OnlyOffice: Document collaboration with JWT security
- Storage: NFS backend for scalability
- Apps: Essential apps pre-installed
Email Configuration
- Domain:
home.dodwell.us - Accounts:
admin@home.dodwell.us/admin123michael@home.dodwell.us/michael123user@home.dodwell.us/user123
- Features: IMAP/SMTP/POP3, webmail via SOGo
- Security: DKIM, SPF, spam filtering, virus scanning
Home Assistant Doorbell Automation
- Trigger: Reolink doorbell button press or motion
- Actions:
- Capture photo (2s delay) and video (10s duration)
- Create Jitsi room with timestamp name
- Call Cisco phone (extension 1000) via Asterisk
- Send Telegram notification with media and room link
- Cleanup old media files (7-day retention)
Usage
Video Conferencing
- Web Access: Visit
https://meet.home.dodwell.us - Doorbell Integration:
- Press doorbell β auto-creates room
- Cisco phone rings automatically
- Telegram notification with room link
- SIP Integration: Dial into rooms from any SIP client
File Storage & Office
- Web Access: Visit
https://cloud.home.dodwell.us - Login:
admin/nextcloud123 - Document Editing: Click any Office document to edit with OnlyOffice
- Mobile Apps: Install Nextcloud mobile apps
- Desktop Sync: Install Nextcloud desktop client
Email & Calendar
- Webmail: Visit
https://mail.home.dodwell.us - Email Clients:
- IMAP:
mail.home.dodwell.us:993(SSL) - SMTP:
mail.home.dodwell.us:587(STARTTLS)
- IMAP:
- Calendar/Contacts: Available in SOGo web interface
- Mobile Sync: Use SOGo ActiveSync (if enabled)
Telegram Bot Setup
1. Create Telegram Bot
- Open Telegram and search for
@BotFather - Start a chat with BotFather
- Send
/newbotcommand - Choose a name for your bot (e.g., “Homelab Doorbell Bot”)
- Choose a username (e.g., “homelab_doorbell_bot”)
- BotFather will give you an API token - save this as
telegram_bot_token
2. Get Your Chat ID
- Start a chat with your new bot
- Send any message to the bot
- Open this URL in your browser (replace TOKEN with your bot token):
https://api.telegram.org/botTOKEN/getUpdates - Look for the
chat.idin the response - save this astelegram_chat_id
3. Update Home Assistant Secrets
Create/update the secrets in Home Assistant:
# In secrets.yaml or as environment variables
telegram_bot_token: "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz"
telegram_chat_id: "123456789"
Monitoring
Prometheus Metrics
All services expose metrics for Prometheus monitoring:
# Check ServiceMonitor resources
kubectl get servicemonitor -A
# View metrics endpoints
kubectl get endpoints -A | grep metrics
Log Aggregation
# View service logs
kubectl logs -n jitsi-meet deployment/web
kubectl logs -n nextcloud deployment/nextcloud
kubectl logs -n mailcow deployment/mailserver
kubectl logs -n home-assistant deployment/home-assistant
Health Checks
# Check all service health
kubectl get pods -A | grep -E "(jitsi-meet|nextcloud|mailcow)"
# Test ingress endpoints
curl -I https://meet.home.dodwell.us
curl -I https://cloud.home.dodwell.us
curl -I https://mail.home.dodwell.us
Troubleshooting
Jitsi Meet Issues
Jigasi not connecting to Asterisk:
# Check Jigasi logs
kubectl logs -n jitsi-meet deployment/jigasi
# Verify Asterisk user
kubectl exec -n telephony deployment/asterisk -- \
asterisk -rx "pjsip show endpoints"
# Test SIP connectivity
kubectl exec -n jitsi-meet deployment/jigasi -- \
nc -zv 192.168.1.202 5060
Video/Audio issues:
- Check JVB UDP port 10000 is accessible
- Verify STUN servers are reachable
- Check browser console for WebRTC errors
Nextcloud Issues
OnlyOffice not working:
# Check OnlyOffice connectivity
kubectl exec -n nextcloud deployment/nextcloud -- \
curl -I http://onlyoffice:80
# Verify JWT configuration
kubectl logs -n nextcloud deployment/onlyoffice
Database connection issues:
# Check PostgreSQL
kubectl exec -n nextcloud deployment/nextcloud-postgres -- \
pg_isready -U nextcloud
# View database logs
kubectl logs -n nextcloud deployment/nextcloud-postgres
Email Issues
Cannot send/receive email:
# Check mailserver logs
kubectl logs -n mailcow deployment/mailserver
# Test SMTP
kubectl exec -n mailcow deployment/mailserver -- \
telnet localhost 25
# Check DNS records
dig MX home.dodwell.us
dig TXT home.dodwell.us
SOGo web interface not loading:
# Check SOGo logs
kubectl logs -n mailcow deployment/sogo
# Test database connection
kubectl exec -n mailcow deployment/sogo-mysql -- \
mysql -u sogo -psogo123 -e "SELECT * FROM sogo.sogo_view;"
Home Assistant Issues
Doorbell automation not triggering:
# Check Home Assistant logs
kubectl logs -n home-assistant deployment/home-assistant
# Test Reolink connectivity
kubectl exec -n home-assistant deployment/home-assistant -- \
curl -I http://192.168.1.205
# Verify automation state
kubectl exec -n home-assistant deployment/home-assistant -- \
python -c "
import requests
r = requests.get('http://localhost:8123/api/states/automation.doorbell_button_pressed')
print(r.json())
"
Telegram notifications not working:
- Verify bot token and chat ID in secrets
- Check bot permissions with @BotFather
- Test bot manually:
https://api.telegram.org/botTOKEN/sendMessage?chat_id=CHATID&text=test
Backup Strategy
Database Backups
# Nextcloud PostgreSQL
kubectl exec -n nextcloud deployment/nextcloud-postgres -- \
pg_dump -U nextcloud nextcloud > nextcloud-backup.sql
# SOGo MySQL
kubectl exec -n mailcow deployment/sogo-mysql -- \
mysqldump -u sogo -psogo123 sogo > sogo-backup.sql
Configuration Backups
# Export all configurations
kubectl get configmap -A -o yaml > configmaps-backup.yaml
kubectl get secret -A -o yaml > secrets-backup.yaml
Storage Backups
The NFS storage on TrueNAS should be backed up using TrueNAS built-in backup solutions (snapshots, replication, cloud sync).
Security Considerations
Network Security
- All services use TLS with Let’s Encrypt certificates
- Internal communication uses cluster DNS
- Sensitive services behind Authelia (optional)
- Rate limiting enabled on ingress
Authentication
- Strong passwords configured for all services
- JWT tokens for API authentication
- RBAC configured for Kubernetes resources
- Regular password rotation recommended
Updates
- Use latest stable container images
- Regular security updates via Renovate/Dependabot
- Test updates in staging environment first
- Monitor security advisories for all components
Performance Optimization
Resource Allocation
All services are configured with appropriate resource limits for a small homelab:
- Jitsi Meet: 2-4 GB RAM total
- Nextcloud: 2-3 GB RAM total
- Email Suite: 1-2 GB RAM total
- Storage: NFS provides shared storage across nodes
Scaling
For larger deployments:
- Increase replica counts in overlays
- Add additional JVB instances for more video streams
- Use external databases (PostgreSQL/MySQL cluster)
- Implement horizontal pod autoscaling
Support & Maintenance
Regular Maintenance Tasks
- Weekly: Check disk usage and logs
- Monthly: Update container images
- Quarterly: Review and rotate secrets
- Annually: Update SSL certificates (automatic with cert-manager)
Monitoring Alerts
Configure alerts for:
- Pod restarts and failures
- High resource usage
- Certificate expiration
- Storage capacity
- Service availability
This completes your self-hosted Google Workspace replacement with smart home integration! The system provides enterprise-grade functionality optimized for home use with seamless integration between video conferencing, file storage, email, and home automation.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.