Support
PiTunes has two halves, the app in your browser and the server on your Raspberry Pi. Most problems are the connection between them. Start at the top and work down.
The app cannot connect
- Is Tailscale on? Open the Tailscale app on the phone and check that the switch is on. iOS sometimes turns a VPN off after an update or a restart.
- Can the phone see the Pi? In the Tailscale app, your Pi (usually called
music) should be in the device list and shown as connected. If it is missing or offline, the problem is on the Pi's side. Go to step 4. - Is the address right? Open the address the installer printed, for example
https://music.your-tailnet.ts.net. Without HTTPS it ishttp://music:8000, and the:8000at the end matters. In the app, Library, then the gear, then Test Connection tells you whether the server answers. - Is another VPN on? An iPhone runs one VPN at a time, so switching on another VPN app switches Tailscale off. On a computer, some VPN apps use network addresses that clash with Tailscale and break name lookups while both are on. Turn the other VPN off, or set it to use a public DNS server such as
1.1.1.1. - Is the Pi running? Check that it has power and that its light is on. Unplugging it and plugging it back in is safe. The server starts on its own within a couple of minutes.
- Has the Pi's Tailscale login expired? In the Tailscale admin page, look for an "Expired" label next to the Pi. If it is there, log in to the Pi over your home Wi-Fi and run
sudo tailscale up, then choose Disable key expiry for that machine so it does not happen again.
To check the server directly, log in to the Pi and run:
systemctl status pitunes
It should say active (running). To see what it has been doing:
journalctl -u pitunes -n 50
A song will not play
- One song fails, others work. That video is probably unavailable, private, or blocked in your country. Search for the song again and pick another result. Results marked "Video" are music videos, and the unmarked ones are album recordings.
- The first play is slow. A song the Pi has never played takes 10 to 15 seconds to start on a Pi Zero 2 W, more on a slow connection. The second time it is instant.
- Nothing plays at all. YouTube has probably changed something. Update the server (next section). This is the usual fix.
- Playback stops when you leave home. Tailscale is off on the phone, or the phone has no signal. Downloaded songs keep working without a connection.
Updating the server
The server updates the part that talks to YouTube every night on its own. To update everything now, including PiTunes itself, log in to the Pi and run the install command again:
curl -fsSL https://raw.githubusercontent.com/pf25/pitunes/main/install.sh | bash
Your likes, playlists, history and cached songs are kept. Playback stops for a few seconds while the server restarts.
The web app is part of the server, so updating the server updates the app on every device. If you built the native iPhone app, pull the latest source and build again.
Downloads
- There is no Downloads row or download button. Downloads only work on the secure address, the one starting with
https://. Switch on HTTPS in Tailscale (step 2 of the guide), run the install command again, then open thehttpsaddress and add that one to your home screen. - Downloaded songs disappeared. Phones can clear a web app's storage when they run short of space, and removing the app from the home screen removes its downloads. Add the app to the home screen (rather than using it in a browser tab) and download the list again.
- Podcast episodes cannot be downloaded in the web app. The native iPhone app can.
Profiles
- Someone sees another person's library. Each person must sign in to Tailscale on their phone with their own account, not a shared one. The server tells people apart by their Tailscale account.
- To switch to a different profile, open Library, then Settings, then Use a Different Profile.
Sound search does not find the song (native iPhone app only)
Hold the phone near the speaker and try again. It recognises recorded music, not humming or singing, and it cannot identify music playing from the same phone. It needs microphone permission, which you can check in the iPhone's Settings app under PiTunes.
Reporting a bug or asking a question
Open an issue on GitHub. Say what you did, what you expected and what happened instead. If the problem is with playback, the last lines of journalctl -u pitunes -n 50 from the Pi help a lot.