> For the complete documentation index, see [llms.txt](https://docs.plenit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plenit.com/docs-en/productos/servers/how-to/how-to-deploy-a-3cx-template.md).

# How to Deploy a 3CX Template on a Plenit Server

3CX is a unified communications and PBX platform based on Debian. In Plenit, you deploy it from the **Marketplace**, which speeds up initial provisioning and leaves the 3CX web configuration ready to be completed later.

> #### 👍 What you get
>
> A server with 3CX deployed from the Marketplace and its web configuration wizard accessible through port 5015.

### Before you start

* Log in to the Plenit platform.
* Have a **Servers** subscription available.
* Decide which public IP you will use to expose port **5015** during initial setup.

> #### 📘 Two things after deployment
>
> When the server has been created, open its **console** to enable remote access to the web administration and publish the **port 5015** in the firewall. You can see it in Step 2.

### Step 1. Deploy the 3CX template

Go to the subscription of **Servers** and click **New server** to open the wizard. From there:

1. Select the **location** and click **Next**.
2. Choose the **size** (CPU and RAM) and click **Next**.
3. Open the **Marketplace**, click the **3CX**, choose the version and the **language** and click **Next**.
4. Choose the **disk size** and click **Next**.
5. Configure the **network** and click **Next**.
6. On the final screen, create a label and an SSH key if you need them, check **Open SSH port to Access the service** only if you are going to manage it from the terminal, assign a **name** and click **Create Server**.

> #### 📘 Size according to your environment
>
> The minimum recommendation for 3CX is 1 CPU with 2 cores and 2 GB of RAM. Assign more resources if the environment requires it.

When deployment starts, you will see the server in status **Loading** and a creation notification. When it finishes, you can continue with the initial 3CX setup.

![Selection of 3CX, its version, and its language in the Marketplace](https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2FVOsYGaSpUVWaYefQCuCa%2Fservidores-plantilla-3cx-01.png?alt=media\&token=b27ebd57-49aa-4eec-afc5-6df1b491d1ad)

### Step 2. Prepare the 3CX system

> #### 🚧 First the console, then the port
>
> Port 5015 is useless until you enable web access from the console. Do this step before opening the firewall.

Go back to the Plenit dashboard and open the **console** of the server. Select the option **1** to enable remote access to the initial web administration. The console starts the configuration web tool and shows a URL with the server's private IP and port 5015. Since the server is in the cloud, to access it from outside you'll have to use its public IP instead of the private one: that's why the next step is to expose that port.

![3CX console with the option to enable web configuration](https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2FbtwAlUiJAhl5KD1YSNRC%2Fservidores-plantilla-3cx-02.png?alt=media\&token=1a173a6a-165b-4899-97c8-568b2ea3c82a)

Then, at the bottom of the server configuration, click **New entry rule** and create a **NAT** (redirection between the public IP and the server's private IP) to expose 5015:

* **Select network**: normally, leave it as is.
* **IP or Network**: an IP or source range, or **Any IP** to allow any network.
* **Protocol**: TCP.
* **Public IP**: the public IP through which the connection is served.
* **Public port**: 5015, the same one you will use to validate access.
* **Private IP**: the internal IP of the 3CX server.
* **Private Port**: **5015**.

Click **Continue** and check that the rule appears in the firewall list.

![Creation of the NAT rule for the 3CX 5015 port](https://3894148717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxksPMyYRDCe4qKkhbpcY%2Fuploads%2Flw7H1lZ5ZI74OiTsdtFe%2Fservidores-plantilla-3cx-03.png?alt=media\&token=51203d8c-7537-4af6-9fff-5aa33155a482)

> 👍 Reduce the exposure of initial access
>
> 5015 is the gateway to the administration of your PBX. Whenever you can:
>
> * Fill in **IP or Network** with a specific IP or range instead of **Any IP**.
> * Open 5015 only during initial setup and remove or restrict the rule when you're done.
> * Check **Open SSH port** and use an SSH key only if you are really going to manage it from the terminal.

### Validation

Open in the browser `http://Public_IP:5015`, replacing `Public_IP` with the public IP of the rule. If it loads, you'll see the screen **Configure your 3CX Install**, with the options to upload a new configuration or restore a backup, and you can now continue with the web wizard.

To confirm it from the terminal:

```bash
curl -I http://<PUBLIC-IP>:5015
```

### If something doesn't fit

| Symptom                                         | Probable cause                              | What to do                                                       |
| ----------------------------------------------- | ------------------------------------------- | ---------------------------------------------------------------- |
| `http://IP:5015` does not respond               | You didn't enable web access in the console | Open the console and choose the option **1**                     |
| Still doesn't open                              | The rule doesn't publish 5015 correctly     | Check that the rule exists and that the **Private Port** is 5015 |
| Connects to another machine or doesn't reach it | IPs incorrectly assigned in the rule        | Check that **Public IP** and **Private IP** are correct          |
| It responds to others but not to you            | `IP or Network` leaves you out              | Make sure your IP is within the allowed range                    |

<br>

### Conclusion

With this, you have 3CX deployed from the Marketplace and its web wizard ready on 5015. The key to the process is two steps in order: enable web access from the console and, only after that, publish the port. And since this is a PBX, close or restrict that 5015 as soon as you finish the initial setup: it is not a good idea to leave administration exposed to the Internet any longer than necessary.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.plenit.com/docs-en/productos/servers/how-to/how-to-deploy-a-3cx-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
