Converting an Unprivileged LXC to a Privileged LXC in Proxmox
In the previous article, we delved into the step-by-step process of setting up Nginx Proxy Manager for our Home Lab. We also configured it to work with our Adguard Home instance.
In this article, we will be looking at the steps to convert an Unprivileged LXC to a Privileged LXC.
Understanding Unprivileged and Privileged LXC:
Before we proceed, it’s vital to understand the distinction between unprivileged and privileged LXC containers. Unprivileged containers run with reduced privileges, enhancing security by limiting access to certain system resources. However, this limitation can pose challenges when attempting certain functionalities. Converting an LXC container to privileged status grants it elevated access, enabling seamless integration with other functionalities.
Why Convert to a Privileged LXC?
Converting an LXC container to privileged mode is often necessary when dealing with applications that require direct access to system resources, such as mounting network drives using NFS. While unprivileged containers enhance security by restricting access, certain scenarios demand the elevated privileges of a privileged container. This transition empowers users to make the most of advanced features without compromising security.
Steps to Convert to a Privileged LXC:
- There is no direct way to convert an Unprivileged LXC into a privileged LXC. The best and easiest way is to backup the LXC container and then restore it. We will also be using the same method today in this article.
- First, we need to head to our Proxmox login. We can type in our username and password to log in to the same.
- Now after login, we need to shut down the LXC. To shut down the LXC we can click on the LXC on the left sidebar and then click on the shutdown option in the top right corner.
- Now we can start with taking the backup of the LXC. We now can click on the Backup option.
- Here we can click on the Backup now option so that we can get started with it.
- Now for the backup settings, the default options would do fine. So I’ll just leave it as the default. If needed you can make any additional changes to the settings. Now we can click on the Backup button to start the backup.
- Once the backup is completed, we will have the TASK OK message at the bottom. We can now close this backup progress pop-up.
- We now will be able to see the backup of the LXC that we just took. Now we can begin with restoring the backup to convert it into a Privileged LXC.
- We can just click the backup once and then hit the restore button on the top to begin the backup restore process.
- We now will be able to select the privilege level of the restored LXC. By default, it would be selected as Unprivileged. We can click on the Privileged radio button.
- Now we can hit the Restore button to begin the backup restore process.
- Once the restore process completes we will have the TASK OK message at the bottom. We can close this pop-up and start our LXC container.
We have now successfully converted our Unprivileged LXC into a Privileged LXC. This is the easiest and official method to convert. The above method can also be used to convert a Privileged LXC into an Unprivileged one.
We now will be able to perform all functionalities that we were previously limited due to privileges such as mounting a drive using NFS.
In this article, we have explored Privileged and Unprivileged LXC & went into the step-by-step process of converting an Unprivileged to a Privileged LXC in our Home Lab.
In the next article, we will be looking into another service that we will be deploying in our Home Lab. Stay tuned for more detailed instructions on expanding our Home Labbing capabilities.