Join our Discord communityβ for support, updates, and discussion.
Comprehensive date and chronology management for Radarr and Sonarr
Chronarr tracks and manages "dateadded" timestamps for all your movies and TV episodes, integrating directly with Radarr and Sonarr databases. Keep accurate library chronology for sorting, organizing, and understanding when content was added to your collection.
The Problem: Radarr and Sonarr don't consistently track when media was added to your library. Import dates get lost during migrations, upgrades replace dates, and manual additions have no timestamp at all.
The Solution: Chronarr maintains a dedicated PostgreSQL database tracking every movie and episode's true "dateadded" timestamp, pulling from multiple authoritative sources and presenting them in a clean web interface.
One-command setup with auto-configuration!
wget -O docker-compose.yml https://raw.githubusercontent.com/sbcrumb/chronarr/main/docker-compose.yml.example && \
echo "DB_PASSWORD=change_me_please" > .env && \
docker-compose up -d
What just happened?
.env with temporary database password./config/.env from embedded example./config/.env.secrets from embedded exampleEdit the auto-generated config files:
nano ./config/.env
nano ./config/.env.secrets
Required Settings:
# 1. FIRST: Update root .env file (next to docker-compose.yml)
# This is used by Docker Compose for PostgreSQL initialization
nano .env
# Set a secure password:
DB_PASSWORD=your_secure_database_password
# 2. THEN: Update ./config/.env.secrets with the SAME password
nano ./config/.env.secrets
# In ./config/.env.secrets:
DB_PASSWORD=your_secure_database_password # Must match root .env!
# API Keys (optional but recommended):
RADARR_API_KEY=your_radarr_api_key
SONARR_API_KEY=your_sonarr_api_key
TMDB_API_KEY=your_tmdb_api_key
Note: DB_PASSWORD must be in BOTH locations:
.env β Docker Compose uses this to create PostgreSQL database./config/.env.secrets β Chronarr uses this to connect to the databaseOptional Settings (in ./config/.env):
# Radarr connection
RADARR_URL=http://radarr:7878
# Sonarr connection
SONARR_URL=http://sonarr:8989
# Direct Database Access (faster - recommended)
RADARR_DB_TYPE=postgresql
RADARR_DB_HOST=radarr-db
RADARR_DB_NAME=radarr-main
RADARR_DB_PASSWORD=radarr_password # Add to .env.secrets
# SQLite alternative for Radarr
# RADARR_DB_TYPE=sqlite
# RADARR_DB_PATH=/path/to/radarr.db
SONARR_DB_TYPE=postgresql
SONARR_DB_HOST=sonarr-db
SONARR_DB_NAME=sonarr-main
SONARR_DB_PASSWORD=sonarr_password # Add to .env.secrets
# SQLite alternative for Sonarr
# SONARR_DB_TYPE=sqlite
# SONARR_DB_PATH=/path/to/sonarr.db
Edit your docker-compose.yml to configure paths:
Media Paths:
chronarr:
volumes:
- ./config:/config
- /your/movies:/media/Movies:ro # β Change this
- /your/tv:/media/TV:ro # β Change this
SQLite Database Access (Required for SQLite-based Radarr/Sonarr):
If your Radarr or Sonarr uses SQLite (not PostgreSQL), you MUST mount the database directory:
chronarr:
volumes:
# ... other volumes ...
# Radarr SQLite database (read-only)
- /path/to/radarr/config:/radarr-config:ro
# Sonarr SQLite database (read-only)
- /path/to/sonarr/config:/sonarr-config:ro
Then update ./config/.env:
# For Radarr SQLite
RADARR_DB_TYPE=sqlite
RADARR_DB_PATH=/radarr-config/radarr.db
# For Sonarr SQLite
SONARR_DB_TYPE=sqlite
SONARR_DB_PATH=/sonarr-config/sonarr.db
Common SQLite Database Locations:
/path/to/radarr/config)C:\ProgramData\Radarr or C:\ProgramData\Sonarr/home/user/.config/Radarr or /var/lib/radarr# Apply configuration changes
docker-compose restart
# Access web interface
open http://your-server:8081
Then in the web interface:
Watch as Chronarr imports all your media with proper dates!
π For detailed setup instructions, see QUICKSTART.mdβ
Chronarr works with standard Radarr/Sonarr folder naming out of the box β no changes required.
Standard naming (always works):
/movies/Selena (1997)/
/tv/Breaking Bad (2008)/
Optional β embed IMDb ID in folder name:
/movies/Selena (1997) [imdb-tt0120094]/
/tv/Breaking Bad (2008) [imdb-tt0903747]/
When an IMDb ID is present in the folder or file name, Chronarr cross-checks it against the webhook payload as an extra validation step. If a conflicting ID is found, the webhook is rejected to prevent processing the wrong media. If no ID is present, the webhook payload is trusted as the authoritative source β which is correct for all standard naming setups.
Radarr β if your movie file naming includes [{ImdbId}], Chronarr detects it from the filename inside the folder even when the folder name itself is standard.
Sonarr β the series folder name is checked. If your series folder format includes [imdb-{ImdbId}], Chronarr will cross-check on every TV webhook.
Supported IMDb formats in folder/file names: [imdb-tt1234567], [tt1234567], {imdb-tt1234567}, (imdb-tt1234567).
Chronarr uses a 3-container Docker Compose architecture:
βββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
β chronarr-web ββββββΆβ chronarr-core ββββββΆβ chronarr-db β
β (Port 8081) β β (Port 8080) β β (PostgreSQL) β
β β β β β β
β - Web UI β β - Webhooks β β - Movie dates β
β - API routes β β - Processing β β - Episode dates β
β - Dashboard β β - Database ops β β - History β
βββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
β β β
β β β
βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββ
β Radarr/Sonarr Databases & APIs β β Jellyfin Server β
βββββββββββββββββββββββββββββββββββββββ β + Plugin β
ββββββββββββββββββββ
Benefits:
Chronarr uses an intelligent priority system to determine the best date for each item:
Database Configuration:
DB_TYPE=postgresql # Database type (postgresql only)
DB_HOST=chronarr-db # Database hostname
DB_PORT=5432 # Database port
DB_NAME=chronarr # Database name
DB_USER=chronarr # Database user
DB_PASSWORD=secure_pass # Database password (.env.secrets)
Radarr Integration:
RADARR_URL=http://radarr:7878 # Radarr URL (optional, for metadata only)
RADARR_API_KEY=your_key # Radarr API key (.env.secrets)
# REQUIRED: Direct database access for import history
RADARR_DB_TYPE=postgresql # postgresql or sqlite
RADARR_DB_HOST=radarr-db # Radarr PostgreSQL host
RADARR_DB_NAME=radarr-main # Radarr database name
RADARR_DB_USER=radarr # Radarr database user
RADARR_DB_PASSWORD=radarr_pass # Radarr database password (.env.secrets)
# SQLite alternative
# RADARR_DB_TYPE=sqlite
# RADARR_DB_PATH=/path/to/radarr.db
# IMPORTANT: Docker users must mount the SQLite database directory!
# See docker-compose.yml.example for volume mount configuration
Sonarr Integration:
SONARR_URL=http://sonarr:8989 # Sonarr URL (required)
SONARR_API_KEY=your_key # Sonarr API key (.env.secrets)
# Optional: Direct database access (recommended for better performance)
SONARR_DB_TYPE=postgresql # postgresql or sqlite
SONARR_DB_HOST=sonarr-db # Sonarr PostgreSQL host
SONARR_DB_NAME=sonarr-main # Sonarr database name
SONARR_DB_USER=sonarr # Sonarr database user
SONARR_DB_PASSWORD=sonarr_pass # Sonarr database password (.env.secrets)
# SQLite alternative
# SONARR_DB_TYPE=sqlite
# SONARR_DB_PATH=/path/to/sonarr.db
# IMPORTANT: Docker users must mount the SQLite database directory!
# See docker-compose.yml.example for volume mount configuration
SQLite Docker Configuration:
When using SQLite databases with Docker, you must mount the database directories as read-only volumes. See the Quick Start guide (step 3) or check docker-compose.yml.example for detailed examples.
GET /api/movies - List all movies with paginationGET /api/movies/{imdb_id} - Get specific movie detailsPUT /api/movies/{imdb_id} - Update movie date and sourceDELETE /api/movies/{imdb_id} - Delete movie from databaseGET /api/movies/{imdb_id}/date-options - Get available date options for moviePOST /api/movies/{imdb_id}/migrate-imdb - Migrate placeholder IMDb ID to real IDGET /api/series - List all series with episode countsGET /api/series/{imdb_id}/episodes - Get episodes for seriesGET /api/episodes/{imdb_id}/{season}/{episode} - Get specific episodePUT /api/episodes/{imdb_id}/{season}/{episode} - Update episode dateDELETE /api/episodes/{imdb_id}/{season}/{episode} - Delete episodePOST /api/series/{imdb_id}/migrate-imdb - Migrate series IMDb IDPOST /admin/populate-database - Trigger database populationGET /api/dashboard - Get dashboard statisticsGET /health - Health check endpointhttp://chronarr-core:8080/webhook/radarrhttp://chronarr-core:8080/webhook/sonarrChronarr includes a Jellyfin plugin that automatically syncs episode and movie dates to Jellyfin, ensuring your media library displays the correct import dates from Chronarr instead of scan dates.
Add the Chronarr Plugin Repository to Jellyfin:
https://raw.githubusercontent.com/sbcrumb/chronarr-jellyfin-plugin/main/manifest.json
Install the Plugin:
Configure the Plugin:
http://chronarr-core:8080)For more information, visit the Chronarr Jellyfin Plugin Repositoryβ .
# Check database is running
docker ps | grep chronarr-db
# Check database logs
docker logs chronarr-db
# Test connection from core container
docker exec -it chronarr-core psql -h chronarr-db -U chronarr -d chronarr
# Check core container logs
docker logs chronarr-core
# Verify API connectivity
docker exec -it chronarr-core curl http://radarr:7878/api/v3/system/status?apikey=YOUR_KEY
# Check database access (if enabled)
docker exec -it chronarr-core psql -h radarr-db -U radarr -d radarr-main
chronarr/
βββ api/ # API route handlers
βββ clients/ # Radarr/Sonarr API clients
βββ config/ # Configuration management
βββ core/ # Core database and logic
βββ chronarr-web/ # Web interface container
β βββ static/ # HTML, CSS, JavaScript
β βββ api/ # Web-specific API routes
βββ processors/ # Webhook processors (legacy)
βββ utils/ # Utility functions
βββ docker-compose.yml.example # Docker Compose configuration template
# Clone repository
git clone https://github.com/sbcrumb/chronarr.git
cd chronarr
# Build Docker image
docker build -t chronarr:dev .
# Run with development settings
docker-compose -f docker-compose.dev.yml up -d
Q: Does Chronarr modify my Radarr/Sonarr databases? A: No. Chronarr only reads from Radarr/Sonarr databases (if direct access is enabled). All data is stored in its own dedicated PostgreSQL database.
Q: What happens if I delete a movie from Radarr? A: The movie will remain in Chronarr's database. You can manually delete it from Chronarr's web interface if desired.
Q: Can I use this without direct database access? A: Radarr requires direct database access (PostgreSQL or SQLite) - the Radarr API doesn't expose all the import history data needed for accurate date tracking. Sonarr can work with API-only access, though direct database access provides better performance.
Q: Does this work with SQLite Radarr/Sonarr databases?
A: Yes, Chronarr can read from both SQLite and PostgreSQL databases for both Radarr and Sonarr. Important for Docker users: You must mount the directory containing the SQLite database file(s) as a read-only volume in your docker-compose.yml. See the Quick Start guide for configuration details.
Chronarr's core application does not collect personal data. It reads only from your local Radarr and Sonarr databases and stores date information in your own PostgreSQL instance.
The Emby plugin collects the following information during license registration:
This data is transmitted to the Chronarr license server and is used solely for license management. It is never sold, shared with third parties, or used for any purpose other than validating and managing your license.
To request removal of your data, open an issue at github.com/sbcrumb/chronarr/issuesβ .
Contributions welcome! Please:
This project is licensed under the MIT License - see the LICENSE file for details.
Content type
Image
Digest
sha256:206c885d7β¦
Size
166.6 MB
Last updated
8 days ago
docker pull sbcrumb/chronarr