A fileserver that does something else is not a fileserver. Squeezing lots of services into a single machine makes it harder to maintain and keep stable.
If you do want to do that it helps to run those other services in docker or some other container to isolate them from the host.