# Proxmox LXC Container

**Proxmox LXC** is a lightweight container solution within the Proxmox VE virtualization platform, based on LXC (Linux Containers) technology. They allow running isolated Linux systems with minimal resource consumption compared to full virtual machines.

{% embed url="<https://youtu.be/hrA8oDI3W2Q>" %}

### Downloading the Container Template

1. Go to the "**local**" storage, then "**CT Templates**". Click "**Download from URL**" to open the template download dialog from a URL.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FGu6dnp4gKaSwhFFLoqks%2Fproxmox-CTtemplates.png?alt=media&#x26;token=dece24d3-9a74-4103-960a-d360aa7afb6f" alt=""><figcaption><p>Downloading a template from a link</p></figcaption></figure>

2. Go to [MikoPBX GitHub](https://github.com/mikopbx/core/releases) with releases and copy the download link for the template file with the "**lxc.tar.gz**" extension.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FLgQyEjBPUgX2vFXdkvj9%2FcopyingLinkToLxctargz.png?alt=media&#x26;token=6debf5b8-d34c-4342-a262-4e8d837fa54b" alt=""><figcaption><p>Copying the template link</p></figcaption></figure>

3. Paste the link into the "**URL**" field and click "**Query URL**". If you copied the correct link, the "**File name**" field will be populated with the filename having the "**lxc.tar.gz**" extension.

Click "**Download**" to start the download.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FrLuogKN4w6iC323dGabp%2Fproxmox-downloadFromURL.png?alt=media&#x26;token=57764532-7aea-4da8-a5b1-2f269cc453e9" alt=""><figcaption><p>Downloading a template from URL</p></figcaption></figure>

After the download is complete, you will see the "**TASK OK**" message.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FSGCLYWPNi9nRUPmTOA7M%2FCTimg-taskOK.png?alt=media&#x26;token=e11e9884-7255-49f1-8c66-8177ccb193d3" alt=""><figcaption><p>Successful template download</p></figcaption></figure>

### Creating an LXC Container

1. Click "**Create CT**" in the upper right part of the interface to create a new container.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F4DrCDqAHueqq5hTZfdbb%2FcreateCTbutton.png?alt=media&#x26;token=4e550db5-8dc3-40e4-aed8-007077fc5776" alt=""><figcaption><p>"Create CT" button for creating a new container</p></figcaption></figure>

2. Fill in all the basic container parameters:

* **Hostname** — enter a name for the service.
* **Password** — enter the password for logging into the MikoPBX web interface.
* **SSH public keys** — generate and paste your SSH key. You will then be able to use it to connect to the station via SSH. More details about key generation and SSH connection can be found [here](https://docs.mikopbx.com/mikopbx/english/faq/troubleshooting/connecting-to-a-pbx-using-ssh).

Click "**Next**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FqF7T0hbWFIinXGFYKxCl%2FCreateLXCGeneral.png?alt=media&#x26;token=c5b9e018-bcfb-4e39-b61c-6c5d7d81c300" alt=""><figcaption><p>Basic container parameters</p></figcaption></figure>

3. Select the previously downloaded template in the "**Template**" section.

Click "**Next**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FyLzOYjw0xug8Q9073KeR%2FCreateLXCTemplate.png?alt=media&#x26;token=06d7f7dc-5919-4523-90d7-265dd64d7278" alt=""><figcaption><p>Selecting a template for the container being created</p></figcaption></figure>

4. Next, specify the system disk size. The recommended value is 1 GB.

Click "**Add**" to add a new disk.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F05OwZRbkx5CytEwtb2iE%2FCreateLXCDisksP1.png?alt=media&#x26;token=b3a9b2a8-114b-4f00-bae8-9ece1a7d6aed" alt=""><figcaption><p>System disk parameters</p></figcaption></figure>

5. Specify the size of the second disk — this is where call recordings will be stored. The recommended size is at least 50 GB. Also specify the disk path — "**/storage**".

Click "**Add**" to add a new disk.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FRBMmBcqyZAD6GvGvOt0R%2FCreateLXCDisksP2.png?alt=media&#x26;token=08268a4a-ed99-47a7-ad33-640e2d9d5bfb" alt=""><figcaption><p>Parameters for the second disk</p></figcaption></figure>

6. Specify the size of the third disk for storing configuration. The recommended size is 0.5 GB. Also specify the disk path — "**/cf**".

Click "**Next**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fms9B8tr2rXKQKR3qPYS2%2FCreateLXCDisksP3.png?alt=media&#x26;token=1273b5a7-99a0-458b-bccf-b6e154cd692a" alt=""><figcaption><p>Parameters for the third disk</p></figcaption></figure>

7. On the next tab, specify the number of CPU cores to be used. For a small company, 1–2 cores is sufficient (see [this article](https://docs.mikopbx.com/mikopbx/english/readme/system-requirements) for more details).

Click "**Next**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F1d42AwAuQGrAPMD2L5wR%2FCreateLXCcpu.png?alt=media&#x26;token=d23555d5-68fe-4163-aee0-4f198ca6761c" alt=""><figcaption><p>Container parameters (CPU)</p></figcaption></figure>

8. Next, specify the amount of RAM and Swap memory for the container.

{% hint style="info" %}
Swap is a disk area that the system uses as additional memory when RAM runs out. It operates significantly slower than RAM and serves as a reserve to prevent the system from terminating processes when memory is insufficient.
{% endhint %}

Click "**Next**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F4EY4ozqIsxg9KXhS9E2n%2FCreateLXCmemory.png?alt=media&#x26;token=1d7d794d-9dc6-462b-92b5-85324e4fe79e" alt=""><figcaption><p>Container parameters (Memory)</p></figcaption></figure>

9. In the next section, configure your network settings. In our case, DHCP is used to obtain an IPv4 address. The Firewall does not need to be enabled here, but it must be configured later in MikoPBX (see [this article](https://docs.mikopbx.com/mikopbx/english/manual/connectivity/firewall) for more details).

Click "**Next**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FNDGUiPfIV6AtsDTLDKpb%2FCreateLXCnetwork.png?alt=media&#x26;token=8568e14c-f2bc-4ebb-ba47-321056b10a51" alt=""><figcaption><p>Container parameters (Network)</p></figcaption></figure>

10. In the DNS settings section, click "**Next**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FLxa9ki5cFixrr465tI9w%2FCreateLXCdns.png?alt=media&#x26;token=d7b0159d-a8b6-484b-abed-71e3f4605986" alt=""><figcaption><p>Container parameters (DNS)</p></figcaption></figure>

You will see the final container configuration. Click "**Finish**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F09iPCROpNjhbPLrIE8Cq%2FCreateLXCconfirm.png?alt=media&#x26;token=56cc1482-9355-4e94-81c7-52be44afe02e" alt=""><figcaption><p>Final container configuration</p></figcaption></figure>

### First Launch

1. Go to the management window of the created container by clicking on its name. Click the "**Start**" button to launch it.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F5XBHy1PHxKeEXY25lxir%2FLXCStart.png?alt=media&#x26;token=c5177caa-d840-45f5-9bda-09ac2bb3e2cc" alt=""><figcaption><p>Container startup process</p></figcaption></figure>

2. Then go to the "**Console**" tab. Wait for the system to load and find the web interface IP address.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FsYcQOdra3eDyy0m4IqFK%2FLXCConsole.png?alt=media&#x26;token=2aec1efa-c473-48f4-85c1-7963540dba95" alt=""><figcaption><p>Web interface IP address</p></figcaption></figure>

Enter it in your browser's address bar. Then perform the first login to MikoPBX.

{% hint style="info" %}
Login credentials:

**Login:** admin

**Password:** the password you set during the initial container creation.
{% endhint %}

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fw0mbfKUhYIJG7XIWaMeL%2FLXC-MikoPBXweb.png?alt=media&#x26;token=702e48f2-93d2-4fe8-b43b-0254bac8d685" alt=""><figcaption><p>MikoPBX web interface</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mikopbx.com/mikopbx/english/setup/hypervisor/proxmox/lxc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
