mobile Media Server in background mode

It would be cool to have the iOS plex media server not only running when I have the app open.
For example, I would like to put my media on my phone, biggest device, and then connect my tablet when I am out of my network to play the media. That is working, if I have the plex app open on my phone. But I would like to have the Mobile showing up as server also if the device is locked.
And a secured connection would be a plus.

Anyone else how would like that? Could be for android also.

I don’t know about Android but afair iOS allows background app to run only for 20 minutes (there might be also another policies applying).