Audio Streaming Server hardware advice reddit / selfhosted ---------------------------------------------------------------------- izymedia · 2023-09-28 16:54 I own an app that is used for streaming audiobooks , it is similar to Spotify but for audiobooks built in React Native. The app is currently in beta testing and only a limited amount of people have access to it as it needs a bit more work before release (so i didnt test it with many users). The server of the app is a "custom" version of Ampache ( [https://ampache.org/](https://ampache.org/) ) , the last version with some tweaks and stuff, the basic functionality is the same. I am using it with php8.2 and MariaDB. Right now is hosted on a cheap VPS with 1GB RAM, 2 vCores, 64G storage and limited bandwidth and its only used for testing with a limited amount of audiobooks. The full library of audiobooks is about 1TB, i am not sure yet but probably ill need at least 750GB of space (and keep some free space for the future),i might transcode some tracks to a lower bitrate, the mp3 files are encoded 64kbs to 256kbs but ill probably transcode all of them to 96/128kbs , all the books are in chapters and each chapter has 5mb to 20mb (i think). My app has a buffer currently set at 120 secs , so it preloads 120 sec from the current chapter (track) that the user wants to listen to. Currently the transcoding is disabled server side but i have the option in my app to request the server to transcode , current values are 128kbs , 192kbs and "no transcoding". The most demanding thing i saw so far (server side) is when asking the server to import / update the library as it has to scan all the mp3s and get their tags etc and update the db. (i wont do that often) An usual server response looks like this: [https://raw.githubuserconte nt.com/ampache/python3-ampache/api6/docs/json-responses/song.json](htt ps://raw.githubusercontent.com/ampache/python3-ampache/api6/docs/json- responses/song.json) , basically all the bandwidth (and cpu usage) will go for the images ,the mp3 streaming and handle the requests (query the db), the response is pretty light (just some text). Now i want a cheap way to host my server and all the audiobooks for when it will go live but using a VPS is not cheap and i am limited in different ways (at least for the first 6 -12 months , to see if its worth the investment or not, i dont expect many users in the first months). 1. Seems that having a lot of bandwidth spikes the price for more than i would like to pay 2. Having over 500gb of storage spikes the price for more than i would like to pay 3. Even harder to find VPS with decent nr of cores/ram that includes my bandwidth / storage requirements. \- pro VPS is that i dont have deal with the server (location , power bill etc). \- if you know any VPS that offers what i need at a low price feel free to post the links here My second option is to build my own little server and i dont know for what i should go for, i have access to unlimited bandwidth at 1gbs for cheap (8E/m or something) and soon will be able to upgrade it to 2.5G or even 10G at a price of 10E -15E. The options i have in mind are (but i dont know if they will handle my server, pros and cons - i can keep transcoding disabled if that will be a bottleneck and i can save some cash ) : 1. Get something like raspberry pi 5 ( orange pi 5 etc..) - i am not sure if they are powerful enough to handle the server with more users simultaneous but they are cheap ( i think i can use NVME with them at 1gb speed and add 2.5G networking?) 2. Get some mini PC ( something like this - [https://www.amazon.com/MINISFORUM-NAB5-i5-12450H-Compter-PCIe4- 0/dp/B0C2HDTQJP/ref=sr\_1\_7\_sspa?keywords=mini+server&qid=1695914779 &sr=8-7- spons&sp\_csd=d2lkZ2V0TmFtZT1zcF9tdGY&th=1](https://www.amazon.com/MIN ISFORUM-NAB5-i5-12450H-Compter-PCIe4- 0/dp/B0C2HDTQJP/ref=sr_1_7_sspa?keywords=mini%2Bserver&qid=1695914779& sr=8-7-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9tdGY&th=1&tag=tec06d-20)) , more expensive (even harder to find with 2.5G network) and im not sure what CPU i should go for and if having an x86 CPU will have any noticeable impact over something on arm. 3. Build my own mini Server , i have no idea what i should go for and i think this is the most expensive option , uses more power but i can find good parts at second hand. I was looking to build something with a G CPU from AMD but i need a lot more parts than just getting some prebuilt. All advices are welcome ---------------------------------------------------------------------- DadOfLucifer · 2023-09-28 18:12 Have you checked lowendtalk forum their you can get server for cheap ---------------------------------------------------------------------- izymedia · 2023-09-28 18:14 I think for the bandwidth and storage i need it will be too expensive, im mostly thinking on a miniPC \~200Euro that can do the job for now , im not sure what to expect from it. ---------------------------------------------------------------------- kmaid · 2023-09-28 22:02 Have you thought about using something like cloudflare R2 or Backblaze R2? Its pretty cheap. Maybe you could do something with [https://developers.cloudflare.com/r2/api/s3/presigned- urls/](https://developers.cloudflare.com/r2/api/s3/presigned-urls/) to allow the app to access the bucket directly saving bandwidth etc. How important is transcoding for audio books? They are usually very low bitrates/filesizes and formats are pretty undemanding for clients to play. Hosting it externally I think Racknerd black friday deals (check lowendtalk) are okay mostly for very low CPU usage and as cheap as it gets. You wont get the amount of storage you want. Personally I would go for Hetzner Cloud. The systems are more performant and you can increase and decrease the size as demand requires. Their starting price is more expensive but still pretty cheap. They do have block storage thats reasonably cheap (compared to AWS) but I would still be leaning towards CF/BB R2. If i was hosting it at my home and uptime/a hard drive and days of downtime being okay because im drunk or lazy id suggest buying something a bit overpowered like something from beelink (SER5?) on aliexpress. I would probally use it for lots of experiments and you can't really upgrade these systems without buying an entirely new one ---------------------------------------------------------------------- kmisterk · 2023-09-29 15:33 ## Post Removed Hey, izymedia! Thanks for your submission on selfhosted. Your post has been removed due to a violation of the purpose of the subreddit: **Self Hosting** ## Not Self-Hosted When it comes to posts regarding applications in this subreddit, they must feature a self-hosted tool, or a tool that *can be* self-hosted, or some kind of related information, help request, or otherwise related to a tool that is something that one can self-host. If you believe this post *is in fact* relevant to /r/selfhosted, feel free to [message the mods](https://www.reddit.com/message/compose/?to= /r/selfhosted&subject=Removed For Not Being Self- Hosted&message=[Removed Post](https://www.reddit.com/r/selfhosted/comments/16ul7qs/-/\)) with your concerns.