Hello,
Phpdocx works with any server that can run PHP.
To use the conversion plugin based on LibreOffice with Heroku, please check this information to install LibreOffice:
https://github.com/rishihahs/heroku-buildpack-libreoffice
A LibreOffice AppImage can also be used with phpdocx as the conversion plugin.
Regards.