---
title: "Export and import Opspack"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/6.11.7/configuration/service-checks-and-host/export-import-opspack/index.html"
---
You may wish to easily exchange a Host Template with another Opsview Monitor instance of with the Opsview Community. This section will show you how to export an Opspack from the Host Templates page. For more details on Opspacks, see [Find an Opspack](https://docs.itrsgroup.com/docs/opsview/6.11.7/opspacks/opspack-index/index.html).

## Exporting a Host Template into an Opspack

1. Click on specific Host Template's contextual menu.
2. Select **Export Opspack**.

    ![Export Opspack option](https://docscdn.itrsgroup.com/opsview/images/config-host-temp-export.png)

3. Confirm by clicking **Export**.
4. Your browser client will download the Host Template to your computer into the folder you have selected.

## Importing an Opspack

You can import an Opspack in three ways:

  - Using the user interface
  - Using the REST API
  - Using the command line


**Warning**


Only import Opspacks containing plugins from trusted sources. Importing untrusted and unverified scripts could compromise your system's integrity.




**Warning**


Log4j vulnerabilities

If importing custom Java-based plugins, we recommend ensuring that any version of Log4j used is >= 2.17.1, to mitigate vulnerabilities:

- [CVE-2021-44228](https://nvd.nist.gov/vuln/detail/CVE-2021-44228)
- [CVE-2021-45046](https://nvd.nist.gov/vuln/detail/CVE-2021-45046)
- [CVE-2021-45105](https://nvd.nist.gov/vuln/detail/CVE-2021-45105)
- [CVE-2021-44832](https://nvd.nist.gov/vuln/detail/CVE-2021-44832)



### Import an Opspack using the user interface

1. Click **Import Opspack** in the top right corner of the page.

  ![Import Opspack option](https://docscdn.itrsgroup.com/opsview/images/config-host-temp-import-opspacks.png)

  You may get an error at this point if your Opsview Administrator has not enabled imports.

  ![Import Opspack error](https://docscdn.itrsgroup.com/opsview/images/config-host-temp-import-error.png)


**Note**


The **Import Opspack** functionality has been disabled by default on new installations.

You can still import Monitoring Plugins or Opspacks using the command line. Please contact your System Administrator for assistance.



2. To enable this feature, set the following variable in the `/opt/opsview/deploy/etc/user_vars.yml` file:

    ```
    opsview_allow_plugin_upload: True
    ```

3. Then, run the `orchestrator-install.yml` playbook.
4. Click **Browse** to import the file you want, and then click **Upload**.

The loader will show either of the following:

  - **Import** — The new Opspack has no issues. Click **Import** to import the Opspack.

  ![Import Opspack option](https://docscdn.itrsgroup.com/opsview/images/config-host-temp-import-opspacks-import.png)

  - **Overwrite** — An existing Opspack file has some conflicts, these will be listed. Pressing **Overwrite** will revert to the configuration in the Opspack file.

  ![Import Opspack Overwrite option](https://docscdn.itrsgroup.com/opsview/images/config-host-temp-import-opspacks-overwrite.png)

  - **Error** — An error is detected with the configuration, such as a built-in plugin with the same name already exists. The button will be disabled.

  ![Import Opspack Error](https://docscdn.itrsgroup.com/opsview/images/config-host-temp-import-opspacks-duplicate.png)


**Note**


To import an Opspack containing secure args plugins, see [Secure Arguments](https://docs.itrsgroup.com/docs/opsview/6.11.7/configuration/secure-arguments/index.html#import-an-opspack-with-secure-args-plugins).



### Import an Opspack using the REST API

Opspacks can also be imported using the REST API following the instructions at [Config Host Templates](https://docs.itrsgroup.com/docs/opsview/6.11.7/rest-api/config/api-config-host-templates/index.html) for uploading and then importing.

### Import an Opspack using the command line

1. To install an Opspack using the command line, transfer the Opspack into the orchestrator host, for example:

    ```
    scp opspack.tar.gz <orchestrator address>:/tmp/opspacks.tar.gz
    ```

2. Then run as the opsview user on the orchestrator:

    ```
    /opt/opsview/coreutils/bin/install_opspack -f /tmp/opspack.tar.gz
    ```

3. If you are importing multiple Opspacks that are all in the same directory, you can use the `orchestratorimportopspacks` script and `for` loop:

    ```
    for opspack in /tmp/opspacks/*.tar.gz; do
    /opt/opsview/orchestrator/bin/orchestratorimportopspacks -f -o $opspack
    done
    ```


