# Install odoo18 with external database

### Prerequisite

* มียอดเงินคงเหลือใน Project มากกว่า 0 บาท ([ขั้นตอนการเติมเงินเข้าสู่ Project](/ncs-documents/nipa-cloud-space-overview/billing-and-wallet/topup-a-project-wallet.md))

## Instructions

### 1. ทำการสร้าง instance 2 เครื่อง&#x20;

โดยใช้ Deployment Script ชื่อ odoo18 และ postgresql-odoo

<figure><img src="/files/bHdW4jKs7IfUrCkliwDz" alt=""><figcaption></figcaption></figure>

### 2. console ไปที่เครื่อง postgresql database&#x20;

เพื่อเก็บ value ต่าง ๆ มาใช้ที่ odoo server

<figure><img src="/files/RWFc9ATxtx5FH3DzOxZR" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ZShGj3VpGUR1ChCtFEvd" alt=""><figcaption><p>value ที่ต้องเก็บคือ IPv4, Username_db และ Password_db</p></figcaption></figure>

### 3. จากนั้น console ไปที่เครื่อง odoo18

เพื่อดำเนินการแก้ไข file อยู่ที่ path /etc/odoo18.conf แล้วให้เปลี่ยน configure ของ parameter ดังนี้

*db\_host = IPv4 postgresql database server*\
*db\_port = 5432*\
*db\_user = Username\_db*\
*db\_password = Password\_db*

<figure><img src="/files/7rZa1ryMqqArsCsR81i8" alt=""><figcaption><p>ตัวอย่างวิธีการ configure</p></figcaption></figure>

### 4. จากนั้นดำเนินการ restart odoo18 ที่ odoo server

`systemctl restart odoo18.service`

`systemctl status odoo18.service`

<figure><img src="/files/HJ0L95r1fs1ycyMRAEE8" alt=""><figcaption><p>expected output</p></figcaption></figure>

### 5. ทดสอบเข้าใช้งาน

ทดสอบเข้าใช้งานผ่าน External\_IP:8069

<figure><img src="/files/XAAYdmfmXC66FRmVXvon" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
หากต้องการใช้งานผ่าน LoadBalancer สามารถดูวิธีการติดตั้ง LoadBalancer ได้ที่ [LOAD BALANCING](/ncs-documents/load-balancing/load-balancer.md)
{% endhint %}


---

# 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-epc.gitbook.io/ncs-documents/tutorial/install-odoo18-with-external-database.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.
