Get daily push notifications when you have photo memories in Immich - just like Google Photos!
- Daily Memory Notifications - Get notified when you have photos from this day in previous years
- One Per Year - Separate notification for each year, spaced throughout the day
- Cozy Messages - 10 randomized warm message templates (customizable)
- Smart Limits - Max 3 notifications per day (randomly selects years if you have more)
- Multi-User Support - Send personalized notifications to each family member
- Rich Notifications - Includes thumbnail preview from each year
- Click to Open - Tap notification to open Immich app directly
- Self-Hosted - Works with your self-hosted Immich and ntfy instances
- Docker Ready - Easy deployment with Docker Compose
- Privacy First - Your photos never leave your network
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Immich │ ───> │ Script │ ───> │ ntfy │
│ Server │ │ (Python) │ │ Server │
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
┌─────────────┐
│ Mobile App │
│ Notification│
└─────────────┘
- Script fetches memories from Immich API
- Filters for today's "On This Day" memories
- Groups by year and selects up to 3 years (random if more)
- Sends first notification immediately, then spaces the rest throughout the day
- You receive cozy notifications with thumbnails from each year!
- Immich server (self-hosted)
- ntfy server (self-hosted or use ntfy.sh)
- Docker & Docker Compose (recommended) OR Python 3.8+
- ntfy mobile app (Android / iOS)
Built this mostly vibe coding! Been running smoothly on my setup. PRs and feedback welcome!
git clone https://github.com/ismaildakrory/immich-memories-notify.git
cd immich-memories-notifyCopy the example environment file:
cp .env.example .envEdit .env with your API keys:
# Get your API key from Immich: Account Settings → API Keys
IMMICH_API_KEY_ISMAIL=your-api-key-hereEdit config.yaml with your server URLs:
immich:
url: "http://192.168.1.100:2283" # Your Immich internal URL
external_url: "https://photos.example.com" # Your Immich external URL
ntfy:
url: "http://192.168.1.100:8090" # Your ntfy internal URL
external_url: "https://ntfy.example.com" # Your ntfy external URL
users:
- name: "YourName"
immich_api_key: "${IMMICH_API_KEY_ISMAIL}"
ntfy_topic: "immich-memories-yourname" # Unique topic for your notifications
enabled: trueOpen the ntfy app on your phone and subscribe to your topic (e.g., immich-memories-yourname) on your ntfy server.
# Test it first
docker compose run --rm notify --test
# Start the daily scheduler (runs at 9:00 AM)
docker compose up -d scheduler# Run once (check for today's memories)
docker compose run --rm notify
# Test mode (uses any available date with memories)
docker compose run --rm notify --test
# Preview without sending (dry run)
docker compose run --rm notify --dry-run
# Force send even if already sent today
docker compose run --rm notify --force
# Check specific date
docker compose run --rm notify --date 2024-12-25
# Start scheduler (daily at 9 AM)
docker compose up -d scheduler
# View scheduler logs
docker compose logs -f scheduler
# Stop scheduler
docker compose down# Install dependencies
pip install requests pyyaml
# Set environment variable
export IMMICH_API_KEY_ISMAIL="your-api-key"
# Run
python notify.py --testIf you prefer using system cron instead of the Docker scheduler:
# Edit crontab
crontab -e
# Add this line (runs daily at 9:00 AM)
0 9 * * * cd /path/to/immich-memories-notify && docker compose run --rm notify# Server settings
immich:
url: "${IMMICH_URL:-http://localhost:2283}"
external_url: "${IMMICH_EXTERNAL_URL:-https://photos.example.com}"
ntfy:
url: "${NTFY_URL:-http://localhost:8090}"
external_url: "${NTFY_EXTERNAL_URL:-https://ntfy.example.com}"
# Optional settings
settings:
retry:
max_attempts: 3 # Retry failed requests
delay_seconds: 5 # Delay between retries
state_file: "state.json" # Tracks sent notifications
log_level: "INFO" # DEBUG, INFO, WARNING, ERROR
max_notifications_per_day: 3 # Limit notifications (random selection if more years)
interval_minutes: 60 # Time between notifications
# Users
users:
- name: "User1"
immich_api_key: "${IMMICH_API_KEY_USER1}"
ntfy_topic: "immich-memories-user1"
enabled: true| Variable | Description |
|---|---|
IMMICH_API_KEY_* |
Immich API keys for each user |
IMMICH_URL |
Override Immich internal URL |
NTFY_URL |
Override ntfy internal URL |
NOTIFY_SCHEDULE |
Cron schedule (default: 0 9 * * *) |
Adding family members is simple - just 2 files to edit:
Step 1: Get API key from Immich (Account Settings → API Keys)
Step 2: Add to .env:
IMMICH_API_KEY_USER2=their-api-key-hereStep 3: Add to config.yaml:
users:
- name: "Mom"
immich_api_key: "${IMMICH_API_KEY_USER2}"
ntfy_topic: "immich-memories-mom"
enabled: trueStep 4: Restart and subscribe:
docker compose restart schedulerEach user subscribes to their own ntfy topic in the app
If you don't have ntfy yet, here's a quick setup:
# docker-compose.yml for ntfy
version: "3"
services:
ntfy:
image: binwiederhier/ntfy
container_name: ntfy
command: serve
ports:
- "8090:80"
volumes:
- ./ntfy-cache:/var/cache/ntfy
restart: unless-stoppeddocker compose up -dThen install the ntfy app and add your server.
| Feature | Description |
|---|---|
| Title | "Memories from 2020" (one per year) |
| Message | Randomized cozy messages like "A little trip back to 2020..." |
| Thumbnail | Preview photo from that specific year |
| Spacing | Notifications spread throughout the day (default: 1 hour apart) |
| Click Action | Opens Immich app via my.immich.app |
Messages are randomly selected from customizable templates in config.yaml:
messages:
- "A little trip back to {year}..."
- "Remember this day {years_ago} years ago?"
- "Some memories from {year} want to say hello"
- "Throwback to {year}! Take a moment to smile"
- "Once upon a time in {year}..."
# ... and more!Placeholders: {year} (e.g., 2020) and {years_ago} (e.g., 4)
- Check if you have memories for today:
docker compose run --rm notify --dry-run - Verify ntfy subscription in the app
- Check logs:
docker compose logs scheduler
- Verify your API key in Immich web UI
- Make sure the key has "Read" permissions
- Check environment variable is set:
echo $IMMICH_API_KEY_*
- Verify Immich URL is accessible from Docker
- Check ntfy server is running
- Try using internal IPs instead of hostnames
The script tracks sent notifications to avoid duplicates. To resend:
docker compose run --rm notify --forceOr delete state.json to reset.
Source files are mounted as volumes, so you can edit them without rebuilding:
.
├── notify.py # Main script (edit freely)
├── config.yaml # Configuration (edit freely)
├── Dockerfile # Container definition
├── docker-compose.yml # Service definitions
└── .env.example # Template to start from
After editing notify.py, changes take effect immediately on next run.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Immich - The amazing self-hosted photo solution
- ntfy - Simple push notification service
- Inspired by Google Photos' "Memories" feature
Made with love for the Immich community