I am going to start this guide off at the point of having made an unprivileged container. For this guide we are using a ubuntu 22.04 image.
Select your Proxmox server in the datacenter menu and open the Shell
![](https://virtualizeeverything.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-10-at-9.35.50-PM-1024x102.png)
Take note of your CTs id number
go to Shell
Enter the command
nano /etc/pve/lxc/<CT #>.conf
![](https://virtualizeeverything.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-10-at-9.37.39-PM-1024x264.png)
Add the below line at the bottom
lxc.apparmor.profile: unconfined
![](https://virtualizeeverything.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-10-at-9.39.23-PM-1024x235.png)
Now go back to the Web Interface START the CT and open the console
apt update && apt upgrade -y
Use the command
apt install nfs-kernel-server -y
To install the NFS server
After installing NFS server lets add a folder to store the shared data in
mkdir -p /srv/nfs4/backup
![](https://virtualizeeverything.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-10-at-9.46.35-PM-1024x512.png)
We now need to edit the exports file to tell the server what folder and how to share the folder
nano /etc/exports
/srv/nfs4/backups 192.168.1.0/24(rw,sync,no_subtree_check)
![](https://virtualizeeverything.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-10-at-9.49.20-PM-1024x293.png)
Run
exportfs -ar
to modify the exports file
![](https://virtualizeeverything.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-10-at-9.51.53-PM-1024x534.png)
Now it is time to start using your new NFS server
if you find that you have problems writing to the folder you might need to run
chmod 777 <file path>
This will loosen up the user write restrictions and allow everyone to write files to this folder.