R2 as main storage

Hello, could anyone help me with nextcloud and R2? I don’t know how to configure it as main storage as external storage, it didn’t work and could anyone answer my question how do I edit the files because I installed nextcloud via snap but snap won’t let me save.