If you have to setup SAP Document Management Service (DMS), Integration Option in connection of S/4HANA Public Cloud connecting an external repository - this blog-post will summarize steps to archieve a solution.
Why Document Management in SAP S/4HAN...