Configuring an LXC container cloned from a template via API

Jun 3, 2026
5
0
1
I have an LXC container with some specialized configuration options which I have converted into a template. Now some users should be capable of cloning this template via the ProxMox API while performing some configuration options (like, setting an authorized SSH key).
How can this be done? The clone operation does not contain any option similar to user-data and cloud-init which is available for qemu.
 
this is not possible with a single api call. you have to clone first and then configure the options you want to set.
 
It doesn't matter if it is a single or mutliple API calls, as long as it works.
Which API call allows me to upload files to a container and/or run code there?

So what I need, if the user-data approach is not available, would be an API equivalent to "pct push" and "pct exec".
 
Last edited: