If you're just looking for ebooks Calibre/Calibre-Web will do the job. I wanted a good audiobook player too so I went with Audiobookshelf as it does that and a few other things. You could also go with Jellyfin as I've read it can do epub, but I have no experience with it.
I highly recommend AudioBookShelf . It's mostly geared towards audiobooks/podcasts, but it has a decent reader built into it. That being said, it's not without it's flaws, like some document file types aren't recognized, and not properly syncing progress occasionally.
Edit: I should mention it's actively being developed, devs are active on discord & GitHub, and it's getting better all the time.
AudioBookShelf is awesome for audiobooks. I can't speak to its capability as an eReader but I thought I'd throw that out there for anyone wanting a second opinion. I use it daily and the Android app is great too. My go-to audiobook server for life if it stays just like it is right now.