Hey there! Thank you for stopping by to check out this blog post. Today, we’ll dive into a simple trick that can significantly speed up your Proxmox deployment process. If you’re a fan of self-hosting and love exploring different ways to optimize your setup, you’re in for a treat.
In our previous video, we covered setting up Proxmox on a Zima blade, configuring storage, and downloading a Proxmox container template (specifically, Debian twelve or Turnkey Debian twelve). Now, we’ll take it a step further by exploring a process that will allow you to set up a container, turn it into a template, and then quickly duplicate it for future deployments.
The Goal: Streamlined Container Deployment
The goal for today is to get a Proxmox container set up with Debian twelve, install Docker, Docker Compose, and a few other essential tools. Once we have this initial setup ready, we can convert it into a template and use it to deploy future Proxmox containers even faster.
Now, I know that some of you might have different approaches, and that’s totally fine! One of the things I love about the self-hosting community is that we can all do things a little differently and learn from each other along the way. If you disagree with how I’m doing this, no worries! Feel free to share your approach in the comments section below.
Setting Up the Initial Container
Let’s start by jumping over to my desktop, where we’ll set up our first Proxmox container.
Here’s what we need to do:
- Go to the “Create CT” button in the top-right corner of the Proxmox web interface.
- Give your container a name (e.g., “my-template”) and a unique ID (e.g., 999).
- Set a root password for the container.
- Click on the “Template” tab and select the Debian twelve Turnkey Core template from your local storage.
- Configure the disk size (e.g., 32GB), CPU cores (e.g., 1), and RAM (e.g., 512MB).
- Set the network configuration. I prefer using DHCP and handling IP configurations at the router level.
- Configure DNS settings (e.g., Cloudflare and Google DNS).
- Click “Confirm” and then “Finish” to create the container.
Once the container is created, start it up and go through the initial setup process. This may involve skipping some optional steps, installing security updates, and rebooting the container.
Note: The initial setup process might take a few minutes, so grab a cup of coffee or stretch your legs while it completes.
Installing Docker, Docker Compose, and Dockge
With our base container up and running, it’s time to install Docker, Docker Compose, and a handy tool called Dockge. Dockge is a lightweight web UI for managing Docker containers, and it’s going to make our lives a whole lot easier.
To install these tools, we’ll use a script from my GitHub repository. Here’s how you can do it:
- Clone the repository to your container:
git clone
https://github.com/dnburgess/dockerinstall.git
- Navigate to the cloned repository:
cd dockerinstall
- Make the installation script executable:
chmod +x fulldockgeinstall.sh
- Run the installation script:
./fulldockgeinstall.sh
The script will prompt you to install various components, such as Sudo, Docker, Docker Compose, and Dockge. Follow the prompts and let the script do its magic.
Once the installation is complete, you’ll have a fully functional Docker environment, complete with a handy web UI (Dockge) for managing your containers.
Pro Tip: You can also install Portainer instead of Dockge by using the
full_install.sh
script. Both Portainer and Dockge are excellent container management tools, so feel free to choose the one that best suits your preferences.
To verify that everything is working correctly, navigate to http://<your-container-ip>:5001
in your web browser. You should see the Dockge login screen, confirming that your Docker setup is functioning properly.
As an extra step, let’s go ahead and deploy a sample container using Dockge, just to make sure everything is working as expected. We’ll use a simple application called Wallabag for this demonstration.
- In the Dockge web UI, click on the “Compose” button and paste the docker-compose for the container
- Provide a stack name (e.g., “wallos”) and click “Deploy.”
After a few moments, your Wallabag instance should be up and running. You can verify this by visiting http://<your-container-ip>:8081
in your web browser.
Congratulations! You’ve successfully set up a Proxmox container with Docker, Docker Compose, and Dockge, and even deployed a sample application. Now, let’s take this a step further and turn our container into a template for future deployments.
Creating a Reusable Template
To create a reusable template, follow these steps:
- Shut down your container from the Proxmox web interface.
- Right-click on the container and select “Clone.”
- Give your new container a name (e.g., “my-app”) and a unique ID (e.g., 134).
- Click “Clone” to create the new container.
Once the cloning process is complete, you’ll have a brand new container based on your initial setup. However, you might need to adjust the resources (CPU, RAM, storage) for your specific application requirements.
To modify the resource allocation, follow these steps:
- Click on the container name in the Proxmox web interface.
- Go to the “Resources” tab.
- Adjust the memory allocation by clicking “Edit” and specifying the desired amount.
- Adjust the CPU cores by clicking “Edit” and specifying the desired number of cores.
- Resize the disk by going to “Volume” > “Action” > “Resize” and entering the desired disk size.
After making the necessary resource adjustments, start your new container, and you’re ready to deploy your application!
Wrapping Up
By following this process, you’ve learned how to set up a Proxmox container, install essential tools like Docker, Docker Compose, and Dockge, and then convert that initial setup into a reusable template. This template can be cloned and customized for different applications, saving you a significant amount of time and effort in the long run.
The beauty of this approach lies in its simplicity and efficiency. Instead of repeating the same setup process for every new application, you can clone your template and make minor adjustments to meet the specific requirements of that application.
I hope you found this blog post helpful and that it has empowered you to streamline your Proxmox deployments. Remember, the self-hosting community thrives on sharing knowledge and exploring different approaches. If you have any questions, suggestions, or alternative methods, feel free to share them in the comments section below.
Happy self-hosting!