Login to ubuntu 21.10 sever.
Run the following command to download Nextcloud.
sudo snap install nextcloud
root@server:~# snap install nextcloud nextcloud 22.1.1snap1 from Nextcloud✓ installed
Now type your IP address in the URL to launch the Nextcloud.
You will have to create an admin account -- Enter the username and password which you want to set.