No description
Find a file
nagelm fd8e787104 fix(logging): render log timestamps in the system display timezone
Application log timestamps are pinned to UTC no matter what the operator
configures, while nginx in the same container honors TZ - one container,
two timezones (issue 1439). Two mechanisms force this:

1. docker/entrypoint.sh launches the app tree via `su - dispatch`,
   which strips the environment; only whitelisted vars are re-exported
   through /etc/environment and /etc/profile.d, and TZ is not among
   them, so no app process ever sees the operator's declared zone.

2. Whitelisting TZ alone cannot fix Django-managed processes anyway:
   Django's settings loader unconditionally re-stamps os.environ["TZ"]
   = TIME_ZONE ("UTC") and calls time.tzset() in every uwsgi, celery
   and management-command process. Stdlib logging's %(asctime)s renders
   via time.localtime(), so it can never show local time in a Django
   process regardless of the environment.

The fix, keeping TIME_ZONE = "UTC" / USE_TZ untouched (DB truth and
every wire surface - XMLTV offsets, XC server_info/time_now/EPG
timestamps - stay UTC by design):

- entrypoint: normalize a DISPATCHARR_TIME_ZONE bootstrap var from the
  standard TZ env and whitelist it. TZ itself is deliberately NOT
  whitelisted: pam_env would hand it to every su- child including
  initdb/postgres, silently flipping the database server timezone on
  fresh installs - the precondition for the EPG-offset corruption
  class tracked in issue 651, and (with an invalid zone) a source of
  psycopg "unknown PostgreSQL timezone" warnings emitted while the
  connection lock is held. Verified empirically: with TZ whitelisted,
  a fresh install ran its sessions at the container zone; without it,
  the server default stays UTC.

- settings: capture DISPATCHARR_DISPLAY_TZ at module import, before
  Django's tzset re-stamp, as the pre-database display default.

- logging: the verbose formatter renders timestamps with
  datetime/ZoneInfo from an in-process cached zone - never
  time.localtime(), and never a database query at emit time. An
  emit-time query can self-deadlock: a log record that originates
  inside a psycopg call (e.g. its timezone warning) would re-enter the
  same non-reentrant connection lock the ORM query then needs. The
  cache is refreshed out-of-band from provably safe contexts instead:
  request_started, celery task_prerun, and a CoreSettings post_save
  receiver (immediate in the process that saves the UI setting). The
  zone resolves to the UI's System > Time Zone setting - already
  canonical for DVR rules, celery crontabs and backup naming - with
  the env capture as the value before the first refresh, and any
  database error or invalid stored zone keeps the previous value.

- first-boot seed: the fresh-install default that the settings
  consolidation migration writes for the system time zone now derives
  from the same env capture (validated against zoneinfo, falling back
  to UTC) instead of a hardcoded "UTC", so a new install honors the
  declared container timezone from first boot. Existing installs are
  untouched: the migration only manufactures a default when no stored
  value exists, and installs that already ran it never re-run it.

Known residuals: uWSGI's native request log renders its own C-level
ftime outside Python logging and keeps UTC, as do celery's internal
worker_log_format lines; idle workers adopt a changed UI zone on their
next request/task. All documented rather than patched.
2026-07-15 13:32:36 +12:00
.github test: Implement github workflow for backend tests. 2026-07-07 20:51:49 +00:00
.idea Initial commit 2025-02-18 11:14:09 -06:00
apps tests: Fix backend timeshift test. 2026-07-13 23:31:31 +00:00
core fix(logging): render log timestamps in the system display timezone 2026-07-15 13:32:36 +12:00
dispatcharr fix(logging): render log timestamps in the system display timezone 2026-07-15 13:32:36 +12:00
docker fix(logging): render log timestamps in the system display timezone 2026-07-15 13:32:36 +12:00
docs/images Updated Readme. 2026-02-11 16:27:31 -06:00
frontend chore(changelog): update CHANGELOG.md to reflect recent enhancements in unit tests and Backup Manager functionality 2026-07-12 14:35:05 +00:00
scripts refactor: Update test label mapping to load test discovery dynamically 2026-07-08 13:16:21 +00:00
tests Enhancement: Update changelog to reflect changes in ChannelPagination, ensuring pagination works correctly with only page_size provided. Refactor tests to improve reliability and consistency, including adjustments to database connection management in various test cases. Modify EPG name normalization tests for accuracy and clarity, and enhance program data serializer tests to utilize precomputed season and episode values. 2026-07-07 18:30:06 +00:00
.dockerignore Refactor for uv transition. 2026-01-30 12:12:42 -06:00
.gitattributes Added gitattributes to support multi-platform development without getting noisy diffs. 2025-03-24 09:13:29 -05:00
.gitignore Remove vite deps and add to gitignore. 2026-03-13 16:45:46 -05:00
.python-version feat: migrate to UV 2026-01-23 22:45:37 +01:00
CHANGELOG.md fix(timeshift): enhance session handling and playback logic 2026-07-12 21:09:40 +00:00
CONTRIBUTING.md enhancement(tests): introduce isolated backend test settings and improve test documentation 2026-06-23 20:54:12 -05:00
debian_install.sh feat: enhance package installation logic by resolving candidate packages 2026-06-02 21:53:07 -05:00
fixtures.json Correct profile name casing for FFmpeg, Streamlink, and VLC in fixtures.json 2025-12-23 15:17:50 -06:00
LICENSE license update 2026-03-11 08:29:40 -04:00
manage.py enhancement(tests): introduce isolated backend test settings and improve test documentation 2026-06-23 20:54:12 -05:00
Plugin_repo.md Split manifest base URL 2026-06-14 09:43:46 -04:00
Plugins.md fix(proxy): enhance connection management and event handling during streaming operations 2026-06-15 17:14:48 -05:00
pyproject.toml chore(dependencies): update Django, requests, gevent, torch, sentence-transformers, and lxml to latest versions 2026-06-24 16:14:00 -05:00
README.md chore: Update docs 2026-05-09 08:09:39 -05:00
version.py Release v0.27.2 2026-06-30 16:28:27 +00:00

🎬 Dispatcharr — Your Ultimate IPTV & Stream Management Companion

Dispatcharr Logo


📖 What is Dispatcharr?

Dispatcharr (pronounced like "dispatcher") is an open-source powerhouse for managing IPTV streams, EPG data, and VOD content with elegance and control.
Born from necessity and built with passion, it started as a personal project by OkinawaBoss and evolved with contributions from legends like dekzter, SergeantPanda and Bucatini.

Think of Dispatcharr as the *arr family's IPTV cousin — simple, smart, and designed for streamers who want reliability and flexibility.


🎯 What Can I Do With Dispatcharr?

Dispatcharr empowers you with complete IPTV control. Here are some real-world scenarios:

💡 Consolidate Multiple IPTV Sources
Combine streams from multiple providers into a single interface. Manage, filter, and organize thousands of channels with ease.

📺 Integrate with Media Centers
Use HDHomeRun emulation to add virtual tuners to Plex, Emby, or Jellyfin. They'll discover Dispatcharr as a live TV source and can record programs directly to their own DVR libraries.

📡 Create a Personal TV Ecosystem
Merge live TV channels with custom EPG guides. Generate XMLTV schedules or use auto-matching to align channels with existing program data. Export as M3U, Xtream Codes API, or HDHomeRun device.

🔧 Transcode & Optimize Streams
Configure output profiles with FFmpeg transcoding to optimize streams for different clients (reduce bandwidth, standardize formats, or add audio normalization).

🔐 Centralize VPN Access
Run Dispatcharr through a VPN container (like Gluetun) so all streams route through a single VPN connection. Your clients access geo-blocked content without needing individual VPNs, reducing bandwidth overhead and simplifying network management.

🚀 Monitor & Manage in Real-Time
Track active streams, client connections, and bandwidth usage with live statistics. Monitor buffering events and stream quality. Automatic failover keeps viewers connected when streams fail—seamlessly switching to backup sources without interruption.

👥 Share Access Safely
Create multiple user accounts with granular permissions. Share streams via M3U playlists or Xtream Codes API while controlling which users access which channels, profiles, or features. Network-based access restrictions available for additional security.

🔌 Extend with Plugins
Build custom integrations using Dispatcharr's robust plugin system. Automate tasks, connect to external services, or add entirely new workflows.


Why You'll Love Dispatcharr

Stream Proxy & Relay — Intercept and proxy IPTV streams with real-time client management
M3U & Xtream Codes — Import, filter, and organize playlists with multiple backend support
EPG Matching & Generation — Auto-match EPG to channels or generate custom TV guides
Video on Demand — Stream movies and TV series with rich metadata and IMDB/TMDB integration
Multi-Format Output — Export as M3U, XMLTV EPG, Xtream Codes API, or HDHomeRun device
Real-Time Monitoring — Live connection stats, bandwidth tracking, and automatic failover
Stream Profiles — Configure how Dispatcharr connects to backend streams (VLC, FFmpeg, Streamlink, or custom commands)
Output Profiles — Transcode what stream profiles deliver before it reaches the client (e.g. AC3 for media servers, AAC for browsers) with fMP4 or MPEG-TS container selection
Multi-User & Access Control — Granular permissions and network-based access restrictions
Plugin System — Extend functionality with custom plugins for automation and integrations
Fully Self-Hosted — Total control, no third-party dependencies


Screenshots

Channels TV Guide Stats & Monitoring M3U & EPG Manager VOD Library Settings

🛠️ Troubleshooting & Help


🚀 Get Started in Minutes

docker pull ghcr.io/dispatcharr/dispatcharr:latest
docker run -d \
  -p 9191:9191 \
  --name dispatcharr \
  -v dispatcharr_data:/data \
  ghcr.io/dispatcharr/dispatcharr:latest

Customize ports and volumes to fit your setup.


🐋 Docker Compose Options

Use Case File Description
All-in-One Deployment docker-compose.aio.yml Recommended! A simple, all-in-one solution — everything runs in a single container for quick setup.
Modular Deployment docker-compose.yml Separate containers for Dispatcharr, Celery, Redis, and Postgres — perfect if you want more granular control.
Development Environment docker-compose.dev.yml Developer-friendly setup with pre-configured ports and settings for contributing and testing.

🛠️ Building from Source

⚠️ Warning: Not officially supported — but if you're here, you know what you're doing!

If you are running a Debian-based OS, use the debian_install.sh script. For other OS, contribute a script and well add it!


🤝 Want to Contribute?

We welcome PRs, issues, ideas, and suggestions!

Whether it's writing docs, squashing bugs, or building new features, your contribution matters! 🙋


📚 Documentation & Roadmap

Upcoming Features (in no particular order):

  • 🎬 VOD Management Enhancements — Granular metadata control and cleanup of unwanted VOD content
  • 📁 Media Library — Import local files and serve them over XC API
  • 👥 Enhanced User Management — Customizable XC API output per user account
  • 🔌 Fallback Videos — Automatic fallback content when channels are unavailable

❤️ Shoutouts

A huge thank you to all the incredible open-source projects and libraries that power Dispatcharr. We stand on the shoulders of giants!


✉️ Connect With Us

Have a question? Want to suggest a feature? Just want to say hi?
➡️ Open an issue or reach out on Discord.


💖 Support Dispatcharr

Dispatcharr Open Collective

Open Collective provides a transparent way for anyone who finds value in Dispatcharr to support things like: • Infrastructure costs (Domains, Servers, etc.) • Apple Developer Program and Google Play Developer accounts • Helping contributors dedicate more time to improving the project

Support is completely optional, and Dispatcharr will always remain free and open-source.

Contribute here


Dispatcharr is licensed under GNU AGPL v3.0: For full license details, see LICENSE.

Dispatcharr is a trademark of the Dispatcharr project. Use of the Dispatcharr name or logo requires permission from the maintainers.


🚀 Happy Streaming! The Dispatcharr Team