I’ve tried, but it was not easy at all and I sadly finally gave up because it uses Redis and that Redis needs some specific instructions that are not available for old/low end CPUs like the one I have in my homelab. The best self-hosted alternative I found at the time was FidusWriter. Probably not the best solution for OP, but still an OK self-hosted alternative to Overleaf.
It reminds me of Nicodemus from The secret of NIMH