installing a confluence plugin via filesystem
Asked by Tom Jackson:

We are trying to automate the construction of our Confluence server via Chef or Puppet. We are able to install our Jira plugins by copying them to a directory under jira-home. Is there a comparable directory for confluence type 2 plugins?


Answers:
author: Tom Jackson
body: Looks like there is a way to load via the DB.

The plugindata table hold plugin metadata and the plugin binary

The bandana table holds the plugin state (enabled/disabled)

See also:

<https://confluence.atlassian.com/display/CONFKB/How+to+manually+remove+malfunctioning+add-ons>


author: Yilin
body: The workaround solution is to copy the jar or obr file to the folder "\<Confluence instance\>/confluence/WEB-INF/atlassian-bundled-plugins" that once Confluence restarted, it will load as a system plugin in the manage add ons list.

However, if you want to uninstall it, it is not possible to uninstall via UI, you need to :

# Remove the file from the "atlassian-bundled-plugins" folder  
# Shutdown Confluence and clear the plugin cache before restart.


author: Tom Jackson
body: I raised a SR with Atlassian and got this response:

> Tom,
>
> Unfortunately it is not possible to install plugins via the install directory. You can upload add-ons[directly in the interface](https://confluence.atlassian.com/display/UPM/Installing+add-ons) for via Marketplace.
>
> Anything outside of those methods are unfortunately not supported by Atlassian.
>
> Regards,  
> Shannon

comments: author: ivanrossier
body: so, you mean that an Internet connection is mandatory ... which is not always the case !!!


author: Yiraphic __ Schildwacht
body: [@ivanrossier](/t5/user/viewprofilepage/user-id/3251956)You can always update an App using the jar file from local disk if you do not have an internet connection. If you go to manage apps -\> Upload app -\> Select the jar file.

There is also the following way to update an App via the database for CI testing purposes / non-production environments: For example: if you have a new version of the App named confluence-create-content-plugin.jar -\> Stop Confluence and then use this SQL on the PostgreSQL database:

```
UPDATE plugindata SET data=pg_read_binary_file('confluence-create-content-plugin.jar') WHERE pluginkey = 'com.atlassian.confluence.plugins.confluence-create-content-plugin';
```

Then start Confluence again. Do mind that the .jar file (confluence-create-content-plugin.jar in this example) should be in the data directory of the PostgreSQL environment in order to access it by the function pg_read_binary_file(). You can find out where your data directory is on the PostgreSQL database:

```
SHOW data_directory;
```


author: AnnWorley
body: Try \<confluence_install\>/confluence/WEB-INF/lib. That's my understanding from:

<https://confluence.atlassian.com/display/DOC/Important+Directories+and+Files>

comments: author: Tom Jackson
body: I believe that's for type I plugins... but i'll give it a shot...


author: Tom Jackson
body: nope, didn't work. Any other idears?


author: Tom Paine
body: Did you get anywhere with this?


author: Tom Jackson
body: Hey Tom,

Back in January I was working with an Atlassian support engineer on a separate issue. I asked about him about this issue. His response is below. I haven't had a chance to try it but will be doing so this week:
> Hi Tom,  
> I also had a chance to catch up with the plugin dev team on being able to add plugins. Apparently, Confluence is out only application which cannot do this (which explains why I was unaware of the option). However, what is possible is adding the jar file to the confluence/WEB-INF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip file which is where bundled plugins load from. Once there, the plugin will load on Confluences next restart.
>
> Cheers,  
> Andrew Campbell  
> Atlassian Support, San Francisco


author: Tom Jackson
body: I just tried it and results were not as expected. Plugins do in fact get pulled in but ...

**expected:**

plugins get installed

plugins show in "manage add-ons" UI

plugin shows in "User-installed" add-ons

plugins can be enabled/disabled

plugins can be uninstalled

works with plugins deployed as .jar's and .obr's

**actual:**

plugins get installed

plugins show in "manage add-ons" UI

plugin shows in "System" add-ons

plugins can be enabled/disabled

plugins can NOT be uninstalled

works with plugins deployed as .jar's but NOT with .obr's


Tags: confluence-app

install

puppet