This is an enhanced Nextcloud Docker image with additional features for better performance and functionality.
- Real-time notifications: Includes the notify_push binary for instant client notifications
- Proper container integration: Uses supervisord instead of systemd for container-friendly operation
- Automatic setup: Automatically installs and configures the notify_push app on first run
- Video processing: Includes ffmpeg for video transcoding and preview generation
- Metadata extraction: Includes exiftool for reading photo/video metadata
- Optimized performance: Enhanced PHP configuration for better memory handling
- Face recognition: Includes dlib and pdlib for advanced face recognition capabilities
- Machine learning: Pre-built with optimized machine learning libraries
- Background processing: Configured cron jobs for automated face recognition processing
- Supervisor process management: Proper multi-process container management
- Enhanced PHP configuration: Optimized memory limits and opcache settings
- Better logging: Structured logging for all services
- Health checks: Built-in health monitoring
sudo docker run -d \
--name nextcloud \
-p 8080:80 \
-p 7867:7867 \
-v nextcloud_data:/var/www/html \
your-registry/nextcloud:latestA comprehensive docker-compose.yaml file is included with the following services:
# Copy environment file and customize
cp .env.example .env
# Edit .env file with your passwords and configuration
# Start with basic services
sudo docker compose up -d# Start with Nginx for HTTPS and WebSocket handling
sudo docker compose --profile with-nginx up -d# Start with document editing support
sudo docker compose --profile with-collabora up -d# Start with all optional services
sudo docker compose --profile with-nginx --profile with-collabora up -dServices included:
- nextcloud: Enhanced Nextcloud with notify_push
- db: MariaDB database with optimized configuration
- redis: Redis for caching and session storage
- nginx: (Optional) Reverse proxy with SSL and WebSocket support
- collabora: (Optional) Document editing server
The notify_push service is automatically configured and runs on port 7867. To use it:
- Install the notify_push app (automatically done on first run)
- Configure your reverse proxy to handle WebSocket connections on
/push - Test the connection:
docker exec -u www-data nextcloud php occ notify_push:self-test
The included docker-compose.yaml provides a pre-configured Nginx reverse proxy:
# Start with Nginx reverse proxy
sudo docker compose --profile with-nginx up -dThe nginx.conf file includes:
- Proper WebSocket handling for notify_push
- Rate limiting for login attempts
- SSL/HTTPS support (configuration included)
- Optimized static file caching
- Large file upload support
If using your own Nginx setup:
location /push/ {
proxy_pass http://127.0.0.1:7867/;
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-Forwarded-For $proxy_add_x_forwarded_for;
}This image is optimized for these Nextcloud apps:
- notify_push: Real-time notifications (auto-installed)
- Memories: Fast photo and video gallery
- Recognize: Object recognition and face clustering
- Face Recognition: Advanced face recognition
All standard Nextcloud environment variables are supported, plus:
NEXTCLOUD_UPDATE=1: Enables automatic updates (default: enabled)PORT=7867: notify_push service port (default: 7867)
The image includes several performance optimizations:
- PHP memory limit: 1024M (configurable via PHP_MEMORY_LIMIT)
- OPcache memory: 512M (optimized for larger installations)
- APCu: Enabled for CLI operations
- Background jobs: Configured for face recognition and preview generation
git clone <repository-url>
cd nextcloud
cp .env.example .env
# Edit .env with your secure passwords# Basic setup
sudo docker compose up -d
# Or with Nginx reverse proxy
sudo docker compose --profile with-nginx up -d
# Or with all services
sudo docker compose --profile with-nginx --profile with-collabora up -d- HTTP: http://localhost:8080
- HTTPS (with nginx): https://localhost
- notify_push: WebSocket on port 7867
sudo docker exec -u www-data nextcloud php occ notify_push:self-testsudo docker build -t your-registry/nextcloud:latest .- docker-compose.yaml: Complete multi-service setup
- nginx.conf: Reverse proxy configuration with WebSocket support
- .env.example: Environment variables template
- README.md: This documentation
- Check if the service is running:
docker exec container_name supervisorctl status notify_push - Test the connection:
docker exec -u www-data container_name php occ notify_push:self-test - Check logs:
docker logs container_name
If you encounter memory issues with large photo libraries:
sudo docker run -e PHP_MEMORY_LIMIT=2048M your-registry/nextcloud:latestFor issues related to:
- Base Nextcloud functionality: See official Nextcloud documentation
- notify_push: See notify_push repository
- Memories app: See Memories documentation
- Recognize app: See Recognize repository