I want to add an extra folder in my admin profile.

I installed nextcloud via snap.
I have a folder called “Backup” in /home/ubuntu/
As a test I took a “Test” folder and moved it to /var/snap/nextcloud/common/nextcloud/data/admin/files/
Where admin is my username.
I thought that if I did just that, it would be enough to appear on the web console.
I tried moving the folder to the /data root and without success.
I changed the datadirectory in /var/snap/nextcloud/30258/nextcloud/config/config.php to my Backup folder, but to no avail either.
It said the .ocdata file was missing.
So I copied the .ocdata from the default folder and it still didn’t work.

How do I add this folder to my profile?

That will work as long you make sure the ownership/permissions match the rest of the things in there. You’ll also need to run sudo nextcloud.occ files:scan --all before the files actually show up, in my experience.

That won’t work-- the snap is very limited on the directories it can read due to confinement. It can only access /var/snap/nextcloud/current, /var/snap/nextcloud/common, and also /mnt and /media if you connect the removable-media interface.