# Updating MOTAR Installation

{% hint style="warning" %}

### CAUTION

Before updating MOTAR, you should take a backup of your instance. See: [backup-and-restore-data](https://docs.motar.com/how-to/motar-core-services/backup-and-restore-data "mention")
{% endhint %}

The Platform Version tab has a version checker, will tell you when there is a new version available to update:

When a new version is available, <mark style="color:red;">(!)</mark> will show next to the Platform Version tab.

Note the Installed Version vs Available Version in the image below.\\

<figure><img src="https://540871446-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVJV84grXWXSLppsAzVKx%2Fuploads%2F1Bf93TBF6IXaKe2Ztqys%2FScreenshot%202025-04-18%20124801.png?alt=media&#x26;token=84258b3f-a804-46a2-9489-dd845f27f89e" alt=""><figcaption><p>The Platform Version tab notes a new version is available.</p></figcaption></figure>

**Updating** your **MOTAR** Ghost to the latest version is **highly dependent** on your **installation** method. **Choose** the method below that matches your installation. If you do not know what type of installation you have, consult your platform admin.

{% hint style="danger" %}

### WARNING

Updating the platform version requires some degree of technical knowledge pertaining to your company's server architecture and installation method.&#x20;

Please review the steps below and if you are unsure of any of the steps, **DO NOT PROCEED,** reach out to your company administrator or [contact-us](https://docs.motar.com/support/contact-us "mention")
{% endhint %}

Choose the guide based on your installation method:

<details>

<summary>HELM Installation</summary>

#### Upgrade

{% hint style="danger" %}

### WARNING

If you did not provide **secrets** for HELM install, **do NOT** **delete** the **secrets** . The update process will recreate secrets and motar won't be able to access your data.
{% endhint %}

To update the MOTAR version on your HELM install, run:

{% code overflow="wrap" %}

```shell
# Replace {new version} with the latest release number (e.g. 1.2.3)
# Replace {yourvalues.yaml} with your Helm values file

helm upgrade motar --version {new version} oci://harbor.dynepic.net/helmrelease/motar -f {yourvalues.yaml} -n motar
```

{% endcode %}

#### Uninstall/Upgrade

{% hint style="warning" %}

If you **uninstall** instead of upgrade, you need to **backup** your secrets and your instance first!
{% endhint %}

* *Backup your secrets file (secrets backup is not covered in this guide. If you need assistance on how to backup your secrets, refer to your IT administrator.*
* *Backup your MOTAR Instance:* [backup-and-restore-data](https://docs.motar.com/how-to/motar-core-services/backup-and-restore-data "mention")

Once you have backed up everything, you can run:

```sh
helm uninstall motar -n motar
```

Once the uninstall process completes you can start the install process by running:

<pre class="language-sh" data-overflow="wrap"><code class="lang-sh"># Replace {new version} with the latest release number (e.g. 1.2.3)
# Replace {yourvalues.yaml} with your Helm values file

<strong>helm install motar --version {new version} oci://harbor.dynepic.net/helmrelease/motar -f {yourvalues.yaml} -n motar
</strong></code></pre>

{% hint style="warning" %}
The relevant **secrets** will persist (do not delete the ones that stayed)
{% endhint %}

If secrets were deleted you will need to destroy persistent volumes

If you uninstall MOTAR before updating, you will need to restore from backup.\
Follow this guide to restore your data: [backup-and-restore-data](https://docs.motar.com/how-to/motar-core-services/backup-and-restore-data "mention")

</details>

***

<details>

<summary>ARGO Installation</summary>

Update the MOTAR version number  to in your settings to the latest version number listed in your Platform Verision tab.&#x20;

*See example below.*

<figure><img src="https://540871446-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVJV84grXWXSLppsAzVKx%2Fuploads%2FUdm2ebSdxToIFvUAbWpy%2Fimage.png?alt=media&#x26;token=c5836c4e-c6d1-4df5-863d-7d2191b0fd6a" alt=""><figcaption></figcaption></figure>

</details>

***

<details>

<summary>DOCKER Installation</summary>

{% hint style="warning" %}
The following guide is for Docker installtion/update on a Linux/Mac machine. For Windows machines, see the Tutorial setup installation guide: [#id-2.-installing-motar-with-docker](https://docs.motar.com/welcome/commercial-use-installation-and-setup-tutorial#id-2.-installing-motar-with-docker "mention")

For an **easier** install process, **download** the MOTAR Installer for **Windows**:

{% embed url="<https://dyn-downloads.s3.us-east-1.amazonaws.com/MOTAR.Installer.exe>" %}

**Instructions** can be found here: [motar-installer-for-windows](https://docs.motar.com/welcome/motar-installer-for-windows "mention")
{% endhint %}

Installing via Docker

* Download the correct install package for your operating system. &#x20;
  * <https://github.com/Dynepic/MOTAR/tree/main/Docker-Installation-Packages>
* *If you do not have access to this link, please reach out to*[ *motar@dynepic.com*](mailto:motar@dynepic.com) *for assistance.*&#x20;

If you want to shut down your instance during the update run:

```
docker compose down 
```

{% hint style="success" %}
Take note of where you download the MOTAR installation package because you will need it to configure the MOTAR Environment.
{% endhint %}

***

{% code overflow="wrap" %}

```sh
# Replace <version-number> with the MOTAR version you downloaded (e.g., 1.2.3)
cd /path/to/motar/download/directory/motar-<version-number>-beta-docker-compose/EasySetup
```

{% endcode %}

### Check and Configure Docker

{% hint style="warning" %}
Before running Docker commands, ensure the Docker desktop app is running.
{% endhint %}

* Open your terminal window
  1. Search **Terminal** in Spolight or find it in Application > Utilities
* Run the following **command** to check if Docker Compose is installed:

```shell
docker compose version
```

* You should see a result like this example *(your result may vary):*

```sh
Docker Compose version v2.31.0-desktop.2
```

* If no errors, continue, otherwise if you encounter a permission error, prepend sudo to the command:&#x20;

```sh
sudo docker compose version
```

* Make sure your Docker is running by typing:

```sh
docker ps
```

* As an **example**, if docker is running, but there are no containers running you may see output like this *(if you have containers running you may see additional details beneath these headings)*:

```sh
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
```

* If you get the proper response, continue to [#linux-mac-1](#linux-mac-1 "mention"), otherwise if you encounter a permission error, use the sudo command:

```sh
sudo docker ps
```

{% hint style="warning" %}
If you still encounter an error or do not see the expected output (see below), please follow Docker’s documentation for fixing your Docker or Docker Compose.
{% endhint %}

**With Docker running it is time to Configure your MOTAR Environment**

### Configure Your MOTAR Environment

While in Terminal, you will configure your MOTAR Docker package.

1. **Change directory** to the location you saved the MOTAR docker compose install package from [#motar-installation-packages](#motar-installation-packages "mention")

{% hint style="info" %}
This is the folder where you saved your **motar-**[**3.0.1**](#user-content-fn-1)[^1]**-docker-compose.tar.gz** file.
{% endhint %}

{% code overflow="wrap" %}

```sh
cd /<path to motar-docker-compose package> # Change to your MOTAR download directory
# Example: cd /downloads/
```

{% endcode %}

2. **Unpack** the MOTAR installation file (if you already unpacked the file, you may skip to step 3)

<pre class="language-sh"><code class="lang-sh"># Replace &#x3C;version-number> with the MOTAR version you downloaded (e.g., 1.2.3)
tar -xvf motar-<a data-footnote-ref href="#user-content-fn-2">3.0.1</a>-beta-docker-compose.tar.gz
</code></pre>

3. Once the file is **unpacked**, you will need to change directory into the EasySetup folder.

<pre class="language-sh"><code class="lang-sh">cd motar-<a data-footnote-ref href="#user-content-fn-2">3.0.1</a>-beta-docker-compose/EasySetup
</code></pre>

{% hint style="warning" %}
For other more **advanced** options, replace the child sub-directory with ‘SelfProxy-Advanced’ or ‘EasyDNS’.  **This walk-through will only provide instructions for ‘EasySetup’.**

Reach out to <motar@dynepic.com> with questions.
{% endhint %}

4. **Before** launching MOTAR, you'll need to **copy sample environment files** and update with your deployment’s specifics. Sample environment files are provided to help you get started.

{% code overflow="wrap" %}

```sh
#Replace <version-number> with the MOTAR version you downloaded (e.g., 1.2.3)
cd /path/to/motar/download/directory/motar-3.0.1-beta-docker-compose/EasySetup
```

{% endcode %}

```sh
cp ../sample_env .env
```

<pre class="language-sh"><code class="lang-sh"><strong>cp ../sample_motar_env motar.env
</strong></code></pre>

{% hint style="info" %}
For this demo the URL for your MOTAR intance will be set to "motarghost.com".&#x20;
{% endhint %}

{% hint style="success" %}
**MOTAR images** are hosted in Dynepic’s private **Harbor** repository. Follow these steps to authenticate
{% endhint %}

### Deploying MOTAR with Docker Compose

{% hint style="success" %}
MOTAR can be deployed in different configurations. Choose the setup that best suits your needs.
{% endhint %}

1. Ensure you are still in the EasySetup folder in **Terminal**

{% code overflow="wrap" %}

```sh
#Replace <version-number> with the MOTAR version you downloaded (e.g., 1.2.3)
cd motar-<version-number>/EasySetup #Your installation directory
docker compose up -d # brings up the deployment in the background
```

{% endcode %}

{% hint style="danger" %}
Deployment of MOTAR on your local machine will take 3-5 minutes.
{% endhint %}

*You should see the following progress/message(s)*

```sh
 ✔[+] Running 19/19
 ✔ Network motar_motar            Created 
 ✔ Container minio                Healthy 
 ✔ Container motar-traefik-1      Started 
 ✔ Container nats                 Started 
 ✔ Container dnsmasq              Started 
 ✔ Container postgres             Healthy 
 ✔ Container clamav               Started 
 ✔ Container db-init              Exited  
 ✔ Container obj_init             Exited  
 ✔ Container assets               Healthy 
 ✔ Container scanner              Started 
 ✔ Container devices              Started 
 ✔ Container hub                  Started 
 ✔ Container admin                Started 
 ✔ Container studio               Started 
 ✔ Container login                Started 
 ✔ Container studio-permissions   Started 
 ✔ Container hub-permissions      Started 
 ✔ Container devices-permissions  Started  
```

{% hint style="warning" %}
&#x20;**Launching** a browser window may direct your admin page to <mark style="color:red;">**https\://**</mark>\
&#x20;to avoid this, launch in a private window. This should keep the path **http\://**
{% endhint %}

### Configuring Network & Domain Routing

To ensure your client device can resolve domain names correctly, configure your DNS settings.

1. Use the following **Terminal** command to backup your 'hosts' file:

```sh
cp /etc/hosts /etc/hosts_bak
```

2. Append your 'hosts' file with the following command:

{% code overflow="wrap" fullWidth="true" %}

```sh
IP="127.0.0.1"
BASE_URL="motarghost.com"
echo "$IP admin.$BASE_URL hub.$BASE_URL studio.$BASE_URL devices.$BASE_URL api-minio.$BASE_URL  login.$BASE_URL console-minio.$BASE_URL minio" | sudo tee -a /etc/hosts
```

{% endcode %}

</details>

<br>

[^1]: Version numbers may vary. Please refer to the downloaded file.

[^2]: Replace with the MOTAR version you downloaded (e.g., 1.2.3)
