How to use vim remotely with vimwiki in nextcloud?

Hi,

I’m using a raspberry 3b+ as a nas server with nextcloud on it (nextcloudpi-image). There is also a folder in my nextcloud storage space named Wikifolder.

I can remotely access my nextcloud with a dyndns service without problems.

Short question: Can i login with ssh remotely from outside the local net on my nas and use the local vim with the Wikifolder on my nextcloud storage files?

Longer explanation: I use a local pc with linux mint. On this local pc I use the Nextcloud Desktop Client. I can work with the Wikifolder locally and use (you know it) vim. It gets synced with the nextcloud. I can also login to my local pc in my local network with ssh and work with my vimwiki in the Wikifolder. Very cool.

But it would be more useful, if I could login remotely via internet with ssh and could use my vimwiki from outside. This is my problem: I want to login in my nas with ssh and use the vim installation on my raspberry. This should work with my dyndns-adress from outside.

I don’t want to setup a new user in the shell for it. Is it possible to use the nextcloud user for this purpose? In the files of my nextcloud user there is the Wikifolder installed.