3.9 KiB
3.9 KiB
Subsonic API Setup Guide
Your server now supports the Subsonic API! This means you can use existing music apps with CarPlay support.
Recommended Apps
iOS Apps with CarPlay Support
-
Amperfy (FREE, Open Source)
- Download: https://apps.apple.com/app/amperfy/id1530633066
- Best free option
- Full CarPlay support
- Offline caching
-
play:Sub ($4.99)
- Download: https://apps.apple.com/app/play-sub/id955329386
- Polished interface
- Excellent CarPlay integration
- Worth the price
-
Substreamer ($4.99)
- Download: https://apps.apple.com/app/substreamer/id1012991665
- Another solid option
Server Configuration
Default Credentials
Username: admin
Password: admin
⚠️ IMPORTANT: Change these credentials!
Edit src/routes/subsonic.js and update:
const USERS = {
admin: { password: 'your-secure-password', salt: '' }
};
Server URL
http://your-server-ip:3000/rest
Example: http://192.168.1.100:3000/rest
Setup Instructions
1. Start Your Server
npm install
npm run scan # Scan your audio library
npm start # Start the server
2. Find Your Server IP
# On macOS/Linux
ifconfig | grep "inet "
# On Windows
ipconfig
Look for your local IP (usually 192.168.x.x)
3. Configure Your App
For Amperfy:
- Open Amperfy
- Tap "Add Server"
- Enter:
- Server URL:
http://YOUR-IP:3000/rest - Username:
admin - Password:
admin
- Server URL:
- Tap "Connect"
- Wait for library to sync
For play:Sub:
- Open play:Sub
- Tap "+" to add server
- Enter:
- Server Address:
http://YOUR-IP:3000 - Username:
admin - Password:
admin - Port:
3000 - Path:
/rest
- Server Address:
- Tap "Done"
4. Test CarPlay
- Connect your iPhone to CarPlay (cable or wireless)
- Open the music app on CarPlay display
- Browse your library
- Play music!
Supported Features
✅ Browse by artist, album, folder ✅ Search tracks ✅ Playlists ✅ Album artwork ✅ Audio streaming ✅ Random songs ✅ CarPlay integration (via apps)
Troubleshooting
Can't Connect
- Make sure server is running (
npm start) - Check firewall settings
- Verify IP address is correct
- Try
http://localhost:3000/restif on same machine
No Music Showing
- Run
npm run scanto scan your library - Check that audio files are in
audio_library/folder - Look at server logs for errors
Authentication Failed
- Double-check username/password
- Make sure you're using the credentials from
src/routes/subsonic.js
CarPlay Not Working
- Make sure you're using an app with CarPlay support (Amperfy, play:Sub)
- Check that CarPlay is enabled in iPhone Settings
- Try disconnecting and reconnecting CarPlay
Security Notes
For Local Network Only
Current setup is fine for home network use.
For Internet Access
If exposing to internet:
- Change default password immediately
- Use HTTPS (add SSL certificate)
- Consider adding proper user authentication
- Use a reverse proxy (nginx)
- Set up firewall rules
API Endpoints
Your server now responds to Subsonic API calls:
/rest/ping.view- Test connection/rest/getMusicFolders.view- Get folders/rest/getIndexes.view- Get artists/rest/getAlbum.view- Get album details/rest/stream.view- Stream audio/rest/getCoverArt.view- Get artwork/rest/getPlaylists.view- Get playlists/rest/search3.view- Search
All endpoints require authentication via query parameters:
u- usernamep- password (ort+sfor token auth)
Next Steps
- Install Amperfy or play:Sub on your iPhone
- Configure with your server details
- Let it sync your library
- Connect to CarPlay and enjoy!
Need Help?
Check server logs for errors:
npm start
# Watch the console output
Test the API directly:
curl "http://localhost:3000/rest/ping.view?u=admin&p=admin"
Should return XML with status="ok"