Skip to content

Instantly share code, notes, and snippets.

@simonv3
Last active July 11, 2021 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonv3/69703c5732c0a08a766b4ae00e57feb1 to your computer and use it in GitHub Desktop.
Save simonv3/69703c5732c0a08a766b4ae00e57feb1 to your computer and use it in GitHub Desktop.
Podsync & Pocket Casts

Say you want to listen to youtube videos as a podcast but you're too stubborn to use the AWS instant install thing on the podsync home page.

Before you start: if you're using Pocket Casts you'll want to make sure this all works before adding the podcast. Pocket Casts will cache your podcasts and then if you goofed it will always be referencing the non-working podcast. You can fix that by changing the subdomain you use. But it's just easier if you get it right from the start. You can test that it works by using something like Apple Podcasts, which will not cache and will just work if it works.

I'm kind of expecting that you're comfortable (though not necessarily experienced in) logging into your router, accessing the terminal and doing git commands, managing domain names, and that docker works on your system.

  1. Use a Dynamic DNS service to set up a subdomain that will access your local computer. I already had a namecheap account so I just used that.
  2. Set up a Dynamic DNS client on your computer (with namecheap you can just ping a URL too, that works). I used ddclient.
  3. Make sure your computer always has the same internal IP on your network
  4. Set up port forwarding on your router

So you'll want to set up port forwarding on your router:

Service name: podsync
Service type: TCP/UDP (any)
External port: 7777
Internal port: 7777
Internal IP Address: <whatever your internal IP address is>
  1. Create a custom playlist on Youtube, save videos to it. You will use the url of that playlist to start up podsync.
  2. Set up a Youtube API Key
  3. Clone the podsync repository in the terminal and cd to it. (I'm not sure this step is necessary but it's just how I do this).
  4. Change the following in the config.toml file:
[server]
hostname: sub.domain.tld <whatever the DDNS subdomain you set up in step 2 was> 
port: 7777 <or whatever>

Add whatever feeds you want on podsync [as described in the podsync config.toml](https://github.com/mxpv/podsync#configuration-example)

  1. Download podsync via docker
  2. Make your podsync available locally:
docker run --name podsync -p 7777:7777 -v $(pwd)/data:/app/data/ -v $(pwd)/config.toml:/app/config.toml mxpv/podsync:latest

This will make it accessible on localhost:7777

Note that if this doesn't work right away you might have to uncomment some lines in the config.toml. Search the podsync issues for help, you're not the only one (and I can't remember it all).

  1. Now, if you've done the above steps correctly, if you go to your sub.domain.tld:7777 you should be able to see the same thing as you see at localhost:7777. If you do this from your phone, you can copy the feed.xml and put it in your podcast playing app.

Downsides:

  • You need to periodically run podsync on your computer, or keep it running to keep track of new podcasts.
  • Every time your computer starts up it should probably run ddclient so that your Dynamic DNS updates to point to the right IP address you're now using. ddclient does this out of the box, you just have to change one of its config values (this is described in the How To Geek article.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment