Plex and router

Good,

It’s probably something that can not be done because dont find anything to do it, but I’m looking for ways to use an external hard drive connected to the router as a Plex server. In external HD there isnt SO so Plex server cant run, logically, but the question is, could i install a SO (like any linux distribution or another SO like Raspberri Pi) to make it run?

Thanks in advance, greetings