> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# INSTALL PLUGIN

> INSTALL PLUGIN is used to install a plugin.

INSTALL PLUGIN is used to install a plugin.

**Tip**

This operation requires the SYSTEM-level PLUGIN privilege. You can follow the instructions in [GRANT](/documents/4.2/sql-reference/sql-statements/account-management/GRANT.md) to grant this privilege.

## Syntax

```sql theme={null}
INSTALL PLUGIN [IF NOT EXISTS] FROM [source] [PROPERTIES ("key"="value", ...)]
```

**IF NOT EXISTS**: If specified, the statement succeeds silently when the plugin is already installed instead of returning an error.

3 types of sources are supported:

```plain text theme={null}
1. An absolute path that directs to a zip file
2. An absolute path that directs to a plugin directory 
3. A http or https download link that directs to a zip file
```

PROPERTIES supports setting some configurations of plugins, such as setting the  md5sum value of the zip file, etc.

## Examples

1. Install a plugin from local zip file:

   ```sql theme={null}
   INSTALL PLUGIN FROM "/home/users/starrocks/auditdemo.zip";
   ```

2. Install a plugin from local inpath:

   ```sql theme={null}
   INSTALL PLUGIN FROM "/home/users/starrocks/auditdemo/";
   ```

3. Download and install a plugin:

   ```sql theme={null}
   INSTALL PLUGIN FROM "http://mywebsite.com/plugin.zip";
   ```

4. Download and install a plugin. Meanwhile, set the md5sum value of the zip file:

   ```sql theme={null}
   INSTALL PLUGIN FROM "http://mywebsite.com/plugin.zip" PROPERTIES("md5sum" = "73877f6029216f4314d712086a146570");
   ```

5. Install a plugin if it is not already installed:

   ```sql theme={null}
   INSTALL PLUGIN IF NOT EXISTS FROM "/home/users/starrocks/auditdemo.zip";
   ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.