Post Installation Tasks
After installing, but before configuring MythTV, there are some steps users may want to take. Some of these items may have been previously configured if MythTV was installed from a package.
Firewall
For remote frontends and secondary backends to function, access to the web app from another host, streaming media to external devices, or when using network tuners, certain ports will need to be open to external hosts.
| Port/Protocol | Function | Additional Comments |
| 3306/tcp | MySQL/MariaDB | |
| 6543/tcp | mythbackend | for MythTV front and back ends to communicate with the master |
| 6544/tcp | web app | |
| 6547/tcp | UPnP/MythFrontend/ServicePort | |
| 6549/tcp | SSDP Discovery (Simple Service Discovery Protocol) | |
| 6554/tcp | web app (SSL/TLS) | |
| 6754/tcp | web app | why? |
| SOURCE PORT 65001/udp ? | HDHomerun tuners | |
| ? | uPNP/DNLA | For streaming media to devices like smart TVs. |
MySQL
These items are specific to a MythTV master backend.
MySQL Database configuration
When MythTV is installed from a package, /etc/mysql/conf.d/mythtv.cnf, and /etc/mysql/mysql.conf.d/mythtv.cnf as a symlink to it, are created on the master backend (technically this should be on the database host, which is almost always going to be the master backend), containing:
[mysqld] #bind-address=:: max_connections=100
The bind-address may need to be uncommented and possibly altered, depending on mysql version and local configuration, so that mysql will allow connections from sources other than localhost, which is required when using remote frontends or secondary backends. The max_connection entry usually increases the maximum number of connections, but should be omitted if other files in the configuration directories already increase this setting to a higher value.
Disable binary logging
When MythTV is installed from a package, /etc/mysql/conf.d/mythconverg.cnf may be installed on the master backend, containing:
# Disable Binary logging for the mythconverg database. Binary logging # for all databases was off by default prior to MySQL V8. [mysqld] binlog-ignore-db=mythconverg
Database Backup
When a MythTV master backend is installed from a package, regular database backups may be automatically scheduled via cron (or a similar utility). An example script can be found at https://github.com/MythTV/packaging/blob/master/deb/debian/mythtv-database.cron.weekly. Information about backing up the mythconverg database can be found at Database Backup and Restore. Note that the provided script depends on configuration of the DB Backups Storage Group, as described at Setup Storage Directories.
Backend Startup
For MythTV to be able to schedule and make recordings, the backend must be running at the time of the scheduled recordings. Normally this means running the backend at all times while the server is running. It should be set up to be automatically started when the server starts. This is handled automatically for you in the pre-built packages, but if you are building it yourself you have to set up some mechanism.
Backend Startup with systemd
An example service file for environments running systemd can be found at https://github.com/MythTV/packaging/blob/master/deb/debian/mythtv-backend.service. This service file expects mythbackend to be in /usr/bin, while by default mythbackend is installed in /usr/local/bin when building from source.
Note: The Ubuntu packages use 'mythtv-backend' for the service name. The Fedora packages from RPM Fusion use 'mythbackend'. The name is not important.
$ sudo -E systemctl edit --force --full mythtv-backend.service # insert the contents from the link above, modifying path as appropriate $ sudo systemctl enable mythtv-backend.service
Configure Logging
When MythTV is installed from a package, logging may be configured automatically. See Logging for information on configuring logging. An example configuration file for (r)syslog can be found at https://github.com/MythTV/packaging/blob/master/deb/debian/40-mythtv.conf. Example configuration files for logrotate can be found at https://github.com/MythTV/packaging/blob/master/deb/debian/mythtv-backend.logrotate, and https://github.com/MythTV/packaging/blob/master/deb/debian/mythtv-frontend.logrotate.
sysctl
When MythTV is installed from a package, at least on Debian based distributions, /etc/sysctl.d/30-mythtv-sysctl.conf is created containing
net.core.rmem_max=1048576
This sets the maximum size of a network receive socket butter to 1 MB. This usually increases the default setting, but may conflict with adjustment made for other application, in which case the lower setting should usually be omitted (do not set net.core.rmem_max to 1 MB if it is already set to a greater value, which will be rare).
XMLTV
Users who do not intend to acquire all of their program guide data over the air (EIT) will need to configure an XMLTV grabber on the master backend. First review Schedules Direct (which will almost certainly be necessary for users in the US), then proceed to installing and configuring XMLTV -- Note: Currently (around the time of the release of v35), the XMLTV page needs a little cleanup, in particular the parts where it tells you to go into MythTV and do something (not only because the process is changing, but mostly because MythTV hasn't been set up yet). Follow the instructions to install the XMLTV software (noting that Ubuntu users on 22.04 or higher are probably fine using the packaged version and do NOT need to install from source), and leave the configuration until prompted during Configuring MythTV (a link will guide you back to the XMLTV page at that time if you need it for reference).
Schedules Direct users (in the US at least) will have two options. It is probably better to use the SQLite version ("Multinational ..."). It takes just a couple extra configuration steps that the "basic" version does not require, but also fixes a few issues seen by some users
Remote Control
Users who intended to use a remote control may want to do so before configuring mythfrontend.
Desktop Integration
The following are examples which, when placed in /usr/share/applications or ~/.local/share/applications, create desktop menu entries to launch mythfrontend and the web application from a freedesktop.org compatible window manager. The MythTV icon will be installed in a location such as /usr/local/share/mythtv/html/images/mythtv.png, depending on the prefix used when MythTV was compiled, and will be located automatically as long as the icon is found under $XDG_DATA_DIRS.
# mythfrontend.desktop [Desktop Entry] Name=MythTV Frontend Comment=A frontend for all content on a mythtv-backend GenericName=MythTV Viewer Exec=/usr/local/bin/mythfrontend --syslog local7 Type=Application Icon=mythtv Categories=GNOME;GTK;AudioVideo;Audio;Video; X-AppInstall-Package=mythtv StartupWMClass=mythfrontend
# mythwebapp.desktop [Desktop Entry] Name=MythTV Web App Comment=A web based tool for configuring MythTV GenericName=MythTV Setup Exec=xdg-open http://mythbackend:6544 Type=Application Icon=mythtv Categories=GNOME;GTK;AudioVideo;Audio;Video;