How to set up and populate an update site

QR for this page

From Fiji

Jump to: navigation, search
Update Sites
An update site is web space used by the Updater which enables users to share their macros, scripts and plugins with other researchers. With update sites, you do not need to manually download and install anything; ImageJ takes care of it for you.


Introduction

This tutorial explains how to set up a website to distribute your plugins. It assumes that your plugins are correctly installed in your local ImageJ setup.

Add your personal update site

By far the easiest method to provide your macros, scripts and plugins to other users, letting them keep up-to-date in the most convenient manner, is to set up your personal update site.

A personal update site is hosted on http://sites.imagej.net/<imagej-wiki-account>. If you do not have an ImageJ Wiki account yet, no need to worry, you can register one while setting up your update site.

First of all, start the updater with Help>Update and click on the Manage update sites button:

Mamed-3.jpg

Now, click Add my site.

Specifying an existing ImageJ Wiki account

If you already have an ImageJ Wiki account, enter the name of that account and click OK:

Personal-Update-Site-1.png

If the update site was never initialized, you will then be asked to provide the password and the initialisation will be performed.

Warning.png There is currently a bug where if your wiki account is created but uninitialized, the GUI will not allow you to continue.


Until this issue is fixed, please use this page to set your update site password.


If you do not have an ImageJ Wiki account, you will need to create one:

Creating a new ImageJ Wiki account

Specify the desired account name. If it is taken already, you will be asked for the password (and need to cancel the dialog and start over). If the account is available, the updater will greet you with this message:

Personal-Update-Site-2.png

After clicking OK, the updater will let you type in your name and your email address:

Personal-Update-Site-3.png

After you specified the information and click OK, the updater will acknowledge thusly:

Personal-Update-Site-4.png

You should soon receive a mail notifying you about the newly created account, and a temporary password. You need to log into the ImageJ Wiki to reset the password:

Personal-Update-Site-5.png

Now you can continue in the updater: type in your password and press the OK button:

Personal-Update-Site-6.png

This will initialize your update site and it will be added to your list of active update sites:

Personal-Update-Site-7.png

Now you are ready to upload files. After that, you might want to consider to add your site into the alphabetical list on this page for the convenience of other ImageJ users (your update site will then be shown in the Manage update sites dialog by default).

Adding an update site on your own server

If you have an own server or web space with WebDAV, SFTP or SSH access, you can create a directory in that web space and initialize it as an update site, too. Just call the updater with Help>Update and click the Manage update sites button:

Mamed-3.jpg

Now press the Add button, provide a nick name for your update site, the URL of your web space, and upload information.

The upload information depends on the protocol available for uploading:

Protocol Host Directory on Host
WebDAV webdav:, or webdav:<webdav-user> .
SFTP sftp:<sftp-user>@<sftp-host> <absolute-path>
SSH ssh:<ssh-user>@<ssh-host> <absolute-path>

In case you want to use an SFTP/SSH server, it must have an empty, public web accessible folder where you intend to publish your updates. The ImageJ updater will not create that empty folder.

Example: Let's assume you have SFTP access to a machine known as imagej.example.org to the internet, and let's assume that you have a user account myself that has write access to the path /var/www/my-update-site/ on that machine that is served via http://imagej.example.org/my-update-site/. Then the line you need to add might look like this:

Name URL Host Directory on Host
My Update Site http://imagej.example.org/my-update-site/ myself@imagej.example.org /var/www/my-update-site/

If the update site has not been initialized yet (i.e. if nobody else has initialized that site yet), you will see a dialog like this:

How to setup a plugin distribution site-6a.jpg

Just click OK and let the updater upload an empty file index (it is stored in the file db.xml.gz which is also called the database in the documentation of the updater).

It is also possible to create an update site for a group to which multiple users can upload.

Uploading files to your update site

Note: you cannot simply copy files to your web space; the updater would miss all kinds of important information, and consequently refuse to accept that update site. You need to let the updater handle the file uploading.

Start the updater and check your plugins

First, start the updater:

How to setup a plugin distribution site-1.jpg

Click on the Advanced mode button and set the view options to View local-only files to see your plugins. In this case, the plugin we'll be uploading is contained in A_Jolly_Useful_Plugin.jar.

Select the file to upload, right-click (on MacOSX, ^ Ctrl+click) for the context menu and select "Upload to <name>".

Upload-to-update-site.png

Note that this plugin's dependencies, ij.jar and someJarOrOther.jar, are automatically determined by the updater. Hence if you require 3rd party packages for your plugin you can place them into the jars folder of ImageJ and the updater will automatically upload them to the site.

Enter any information you wish to provide about the plugin:

How to setup a plugin distribution site-15.jpg

Finally, click 'Upload to server' to upload your plugin to the server and allow others to access it. If you have dependencies that are not part of ImageJ, the updater will ask you if you want to upload that jar as well. Finally, you will be asked for your login credentials again and the files will be uploaded to the server.

Check that your plugins are now registered as ImageJ plugins by selecting 'View files of the '[your site name here]' site':

UpdaterFinalScreen.jpg

That's it - you're done. Now, anyone who wants a copy of your plugins merely needs to add your update site to the Update manger via the URL you specified, and your plugins will be downloaded and updated in their ImageJ installations just like the standard ImageJ plugins.

Publishing your update site

If you want to let other people know about your update site, just add it to the list of update sites.