Tape Drive, a selfhosted Podcast Client and Archiver
Tape Drive is a selfhosted podcast client with built-in archiving features. By default, all subscribed podcasts will be properly organized on disk based on a user-chosen naming scheme, and including the available metadata.
Current state of affairs
Tape Drive is built using Django and contains beta releases on
master branch. While the initial feature set is being completed and stabilized, day-to-day development might also happen on master, in addition to feature branches and
- Aesthetically pleasing presentation of podcasts, episodes, and their metadata
- Manually initiated episode downloads possible
- Elaborate User-selectable directory/file naming scheme based on Python's
- Ability to efficiently fetch multi-page feeds
Prerequisites and setup
The easiest way to deploy Tape Drive on your server is to install it via Docker. The service is available through GitLab Container Registry, and the repository contains a
docker-compose.yml file for the real out-of-the-box experience.
Please note, that the Docker image and bare metal deployment require you to take care of a database solution. It is technically possible to just use a SQLite database file but as background tasks for feed refreshes and downloads are running concurrently, running into database lockups is to be expected. For real-life / production use, please setup an instance of MySQL/MariaDB or PostgreSQL. In any case you'll have to provide the database connection details to Tape Drive (see below).
When applying the initial batch of database migrations (
users.0003_create_initial_superuser to be precise), an admin account is created with a random password. That password will printed to the console log of the migrations run:
Applying users.0003_create_initial_superuser...Creating initial user: admin // pass: <randompass>
You may use those credentials to log in at first, and change the password or create additional users from within Tape Drive.
Tape Drive in a standalone Docker container
Creating a Docker container from the Tape Drive Docker image is pretty a straight-forward process. As discussed above, Tape Drive expects you to provide a database connection on input, formatted as the well-known
DATABASE_URL environment variable. Most testing of Tape Drive is done in MySQL, so I recommend using that:
docker create \ --name=tapedrive \ -v <path to data>:/data \ -e DATABASE_URL="mysql://USERNAME:PASSWORD@HOSTNAME:PORT/DATABASE_NAME" \ -e DJANGO_ALLOWED_HOSTS=127.0.0.1,myfancy.domainname.example \ -p 8273:8273 \ janwh/tapedrive
DJANGO_ALLOWED_HOSTS variable to tell Tape Drive which hostnames to accept connections from (as a comma-separated list). Most likely you want to link the storage path inside the container to a real location on your filesystem. By default, Tape Drive downloads data to
/data, hence the above
Deploying Tape Drive via Docker-compose
For the development/bare-metal setup of Tape Drive I use Poetry. Just clone the repo and setup the virtualenv:
git clone https://github.com/janw/tapedrive.git cd tapedrive poetry install
Unless deactivated with the
--no-dev flag, all dependencies (including debug tooling, django-extensions, etc.) will be installed. To further simplify running the dev environment, it is advised to add the necessary flags to Python / the virtualenv via a
.env file. It will be automatically loaded as part of the Django configuration.. You can use it to provide the default development settings, like a
DATABASE_URL for your local database instance, or setting
DEBUG flags for Django. My
.env contains theses variables:
ENVIRONMENT=DEVELOPMENT DJANGO_DEBUG='yes' DJANGO_TEMPLATE_DEBUG='yes' DATABASE_URL=mysql://tapedrive:supersecretpassword@localhost/tapedrive
ENVIRONMENT is not strictly necessary, as Tape Drive launches in development implicitly when cloned from the Git repository. By extension of that, the same is true for the
DEBUG flags that are enabled in the development environment by default as well.
Currently the main 'todo' is completing the sought out feature set around archiving. This mostly entails
- Automated periodic feed updates
- Automated downloads of newly published episodes, including a Subscribed/Unsubscribed paradim to include/exclude feeds from the automated downloads
- Smart handling of duplicate downloads if applicable (hashing, filename comparison, etc.)
- A comprehensive utilities library for handling podcast feeds
- Full test coverage, and replacing actual feed downloads with mocked/vcr'ed fixtures
Authors and License
- Jan Willhaus - Initial work
- Cassette Icon by JustUI via IconFinder
- Login backdrop photo "Grado Headphones SR80e" by Michael Mroczek via Unsplash
The project is licensed under the Apache License 2.0 - see the LICENSE file for details.