Subsonic is a powerful media streaming server that lets you access your music and video collection from anywhere. It’s particularly well-suited for Linux users who want to host their own media server. This guide will walk you through installing and configuring Subsonic on Ubuntu and Debian systems.
Prerequisites
Before we begin, ensure you have:
- A Ubuntu or Debian system with root access
- At least 1GB of RAM and 2GB of free disk space
- A stable internet connection
Installing Subsonic
Step 1: Update your system packages
sudo apt update && sudo apt upgrade -y
Step 2: Install Java, which is required to run Subsonic
sudo apt install openjdk-11-jre -y
Step 3: Download the latest Subsonic .deb package
wget https://s3-eu-west-1.amazonaws.com/subsonic-public/download/subsonic-6.1.6.deb
Step 4: Install Subsonic
sudo dpkg -i subsonic-6.1.6.deb
sudo apt-get install -f
Configuring Subsonic
After installation, Subsonic runs as the root user by default. For better security, we’ll create a dedicated user account.
Step 1: Create a new system user for Subsonic
sudo useradd --system subsonic
sudo gpasswd --add subsonic audio
Step 2: Edit the Subsonic configuration file
sudo nano /etc/default/subsonic
Change the SUBSONIC_USER
variable:
SUBSONIC_USER=subsonic
Step 3: Set up your music directory
sudo mkdir /var/music
sudo chown subsonic:subsonic /var/music
Step 4: Restart the Subsonic service
sudo systemctl restart subsonic
Accessing Subsonic
You can now access Subsonic through your web browser:
http://your_server_ip:4040
Replace your_server_ip
with your actual server IP address.
Securing Your Subsonic Server
To enhance security:
- Change the default admin password immediately
- Set up SSL/TLS encryption
- Configure a firewall to restrict access
Optimizing Performance
For better performance:
- Increase the memory allocation in
/etc/default/subsonic
- Use a dedicated SSD for your media library
- Enable transcoding for smoother streaming on slower connections
Troubleshooting Common Issues
If you encounter issues:
- Check the Subsonic log file at
/var/subsonic/subsonic_sh.log
- Ensure your firewall allows traffic on port 4040
- Verify that Java is installed and properly configured
With Subsonic set up, you can now enjoy your media collection from anywhere. Remember to keep your server and Subsonic installation updated for the best experience and security.