This guide details how to install, configure, and secure Subsonic, a powerful media streaming server, on Ubuntu and Debian systems. Enjoy your music and videos remotely, securely, and from any device.
Subsonic offers versatile media management, including remote access, multi-user support, and format conversion. This guide prioritizes security and performance best practices.
Why Choose Subsonic?
Subsonic provides:
- Browser-based access to your entire media library from any device.
- Wide format support (MP3, AAC, FLAC, OGG, WMA, and more).
- Streaming to Android, iOS, and smart TVs.
- Automatic audio/video format conversion for compatibility.
- Customizable user access levels.
- Integrated podcast and web radio support.
Step 1: Installing Subsonic on Ubuntu/Debian
Begin by updating your system:
sudo apt update && sudo apt upgrade -y
Install necessary dependencies: Java (for Subsonic) and FFmpeg (for media streaming):
sudo apt install openjdk-8-jre ffmpeg curl -y
Download the latest Subsonic DEB package (replace 6.1.6
with the current version):
wget https://sourceforge.net/projects/subsonic/files/subsonic-6.1.6.deb
Install the downloaded package:
sudo dpkg -i subsonic-6.1.6.deb sudo apt-get -f install
Access Subsonic via your browser at http://localhost:4040
. Change the default password immediately for security.
Step 2: Configuring Media Folders
Specify your media library locations:
- Navigate to Settings > Media Folders.
- Click Add Folder and enter the paths to your music and video directories (e.g.,
/home/user/music
,/home/user/videos
). - Click Save. Subsonic will automatically index your media.
Step 3: Enabling Transcoding for Compatibility
Enable real-time transcoding for broader media support:
- Go to Settings > Transcoding.
- Add the necessary FFmpeg transcoding command (example provided below).
- Click Save.
ffmpeg -i %s -map 0:0 -b:a 128k -v 0 -f mp3 -
Step 4: Setting Up a Reverse Proxy (Nginx or Apache)
Using a reverse proxy (Nginx or Apache) enhances security and allows custom domain access with HTTPS. Instructions for both are provided below. Remember to replace yourdomain.com
with your actual domain name.
Option 1: Nginx
Install Nginx: sudo apt install nginx -y
Create /etc/nginx/sites-available/subsonic.conf
with the provided Nginx configuration. Enable the configuration and restart Nginx.
Option 2: Apache
Install Apache: sudo apt install apache2 -y
Enable necessary Apache modules (proxy
, proxy_http
, ssl
). Create /etc/apache2/sites-available/subsonic.conf
with the provided Apache configuration. Enable the configuration and restart Apache.
Step 5: Securing Subsonic with HTTPS (Let's Encrypt)
Secure your Subsonic instance with HTTPS using Let's Encrypt and Certbot:
sudo apt install certbot python3-certbot-nginx python3-certbot-apache -y
Run Certbot, specifying your domain and choosing either the Nginx or Apache plugin:
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com # For Nginx sudo certbot --apache -d yourdomain.com -d www.yourdomain.com # For Apache
Access Subsonic securely via https://yourdomain.com
.
Step 6: Mobile Access
Use the official Subsonic mobile apps (available on Google Play and the Apple App Store) for convenient on-the-go access.
Conclusion
Subsonic provides a robust and user-friendly media streaming solution. This guide's steps ensure a secure and performant setup for your media library.
The above is the detailed content of How to Install Subsonic and Stream Your Media Securely. For more information, please follow other related articles on the PHP Chinese website!

The startup process of Linux includes: 1. Start BIOS/UEFI, 2. Load GRUB, 3. Load kernel and initrd, 4. Execute init process, 5. Start system services, 6. Start login manager; the startup process of Windows includes: 1. Start BIOS/UEFI, 2. Load WindowsBootManager, 3. Load winload.exe, 4. Load tonskrnl.exe and HAL, 5. Start system services, 6. Start login screen; Linux provides more customization options, while Windows pays more attention to user experience and stability.

This guide details how to configure automatic service restarts in Linux using systemd, enhancing system reliability and minimizing downtime. System administrators often rely on this functionality to ensure critical services, such as web servers (Apa

As Linux users, we often rely on commonly used commands ls, grep, awk, sed and find to complete the work. But Linux has a large number of lesser-known commands that can save time, automate tasks and simplify workflows. This article will explore some underrated but powerful Linux commands that deserve more attention. rename – efficient batch rename files The rename command is the savior when you need to rename multiple files at once. Without using loops containing mv, rename allows you to easily apply complex renaming patterns. Change all .txt files to .log. rename 's/\.txt$/\.log/' *

Linux systems provide various system services (such as process management, login, syslog, cron, etc.) and network services (such as remote login, email, printer, web hosting, data storage, file transfer, domain name resolution (using DNS), dynamic IP address allocation (using DHCP), and so on). Technically, a service is a process or group of process (usually known as a daemon) that runs continuously in the background, waiting for incoming requests (especially from the client). Linux supports different ways to manage services (start, stop, restart, enable automatic startup at system startup, etc.), usually through a process or service manager. Almost all modern Linux distributions now use the same

Run Windows Software and Games on Linux with CrossOver 25 Running Windows applications and games on Linux is now easier than ever, thanks to CrossOver 25 from CodeWeavers. This commercial software solution lets Linux users run a wide variety of Wind
![pCloud - The Most Secure Cloud Storage [50% Off Offer]](https://img.php.cn/upload/article/001/242/473/174580357418126.jpg?x-oss-process=image/resize,p_40)
Secure Your Data with pCloud: A Comprehensive Guide to Linux Installation pCloud, a leading secure cloud storage service, provides a robust platform for managing your files and data. This guide details the installation process on Linux systems. About

MangoHud: A powerful tool for real-time monitoring of Linux gaming performance MangoHud is a powerful and lightweight tool designed for gamers, developers, and anyone who wants to monitor system performance in real time. It acts as an overlay for Vulkan and OpenGL applications, displaying important information such as FPS, CPU and GPU usage, temperature, etc. This article will explore the functions, working principles and usage of MangoHud, and provide step-by-step instructions for installing and configuring MangoHud on Linux systems. What is MangoHud? MangoHud is an open source project available on GitHub and aims to provide a simple and customizable way to monitor

Managing archived files is a common task in Linux. This article, the first of a two-part series, explores five powerful command-line archive tools, detailing their features and usage with examples. 1. The tar Command: A Versatile Archiving Utility t


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools

Atom editor mac version download
The most popular open source editor
