You can lose access to a server fast when working with firewalls but they are need. So here is what you do if you have made a BAD rule for your firewall and can no longer access your Proxmox server with the web interface.
If you are going to run snap in a Proxmox container the first thing that you are going to need to have is a container if you already know how to make a container you can skip to the point where we are installing software.
The first step in setting up a container is to get the image that we will use for the container. to do that open the dropdown for your server labeled here as R2D2. Then go down to local and select it, then select CT Templates, after selecting CT Templates, select Templates.
With CT Templates open select the image that you plan on using for this guide I will be using Ubuntu 22.04, after selecting the image click download.
After your image is downloaded it will show up in the CT Templates folder of the local drive.
Enter the hostname for you CT or container, then fill out your root password, finish by clicking Next.
At this screen select the Template that you downloaded.
select the drive that you will store the CT on and set the max size for the CT.
Set the number of CPU cores.
Set the amount of RAM to use for your CT.
Enter the IP address fallowed by the CID sub net mass for most home networks smaller then 254 systems this most likely will be /24. Then enter the address to the gateway on most home networks this will be the ip address for your router.
If your Proxmox server was setup right when installing your should not have to fill out this page, so click Next
If all looks good click Finish.
When the CT is fully setup it will say TASK OK close the window.
Select your new CT under the drop down for your server, then select Options and under Options select Features and click Edit.
A window like this will appear and select FUSE and click OK
To start your CT click Start, then Console to display a command promote.
To log in enter a username of root and the password that was entered in the CT setup.
To update the CT enter the command
apt update && apt upgrade -y
Now with the CT up to date it is time to install the software that we will use to install snap packages to do this use the command
apt install squashfuse snapd -y
Now it is time to install your snap package. to do this you are going to use the command below. This might fail the first time.
snap install nextcloud
This is what it will look like if it fails. The problem is due to apparmor.
Rerun the command and it will complete.
After we use snap to download nextcloud we need to run some command to setup and finish installing nextcloud
nextcloud.manual-install <username> <password>
The last thing that we need to do before we login and start using NextCloud is tell NextCloud that we can trust the ip address