Configure PostgreSQL for Immich #61
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PostgreSQL Database Server Configuration
Overview
PostgreSQL is a powerful, open-source relational database system. This configuration provides a robust database backend for services like Immich, BookStack, and other applications requiring SQL database support.
Installation
From Community Applications
Docker Configuration
Container Settings:
Port Mappings:
Volume Mappings:
Environment Variables:
Advanced Settings:
Initial Setup
1. First Run Configuration
2. Create Application Databases
3. Performance Optimization
Create
/mnt/cache/appdata/postgres/postgresql.conf:4. Security Configuration
Edit
/mnt/cache/appdata/postgres/pg_hba.conf:Service Integration
Connection Strings for Applications
Immich:
BookStack:
Directus:
Backup Integration
Kopia Backup Configuration
Add to Kopia backup policy:
Automated Database Backups
Create backup script
/mnt/cache/appdata/postgres/backup.sh:Make executable:
chmod +x /mnt/cache/appdata/postgres/backup.shAdd to cron:
0 2 * * * /mnt/cache/appdata/postgres/backup.shMonitoring Setup
Uptime Kuma Integration
Monitor Name: PostgreSQL Database
Monitor Type: Port
Hostname: 192.168.0.15
Port: 5432
Heartbeat Interval: 60 seconds
Retries: 3
Health Check Script
Create
/mnt/cache/appdata/postgres/health_check.sh:Testing Procedures
1. Connection Test
2. Performance Test
3. Backup Test
Troubleshooting
Common Issues
Connection Refused:
Authentication Failed:
Performance Issues:
Storage Issues:
Maintenance Tasks
Daily
Weekly
Monthly
Quarterly
Security Considerations
Authentication
Network Security
Data Security
Dependencies
Notes
Configuration updated for Unraid 7.0.1 - NastyNAS Server