Arches Collector Checklist

The following steps must be completed to enable an Arches Collector connection with your Arches instance.

Install CouchDB

Arches uses CouchDB 2.x, though the current version of CouchDB is 3.x. If you already have 3.x installed, use sudo apt-get --purge remove couchdb to start over. Then:

# only if you haven't already done this
wget --quiet -O - https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -
sudo add-apt-repository "deb https://apache.bintray.com/couchdb-deb $(lsb_release -sc) main"
sudo apt-get update

# necessary to find the older release
sudo apt-cache policy couchdb
sudo apt-get update

this will list all available versions — make note of the latest version 2 and then install it:

sudo apt-get install couchdb=2.3.1~bionic

For the quickest installation configuration, choose standalone, 127.0.0.1, and pick your password.

Test the installation with curl http://admin:[your password]@127.0.0.1:5984, the response should contain the correct version number.

Finally, add this line to settings.py or settings_local.py:

COUCHDB_URL = 'http://admin:[your password]@127.0.0.1:5984'

At this point you should be ready to move on, but see the official CouchDB setup documentation for more information.

Register an OAuth Application

To allow others to connect to your Arches instance, including Arches Collector users, you must create an OAuth client id and add it to your settings.

  1. In a browser go to

    http://<yourdomain:port>/o/applications/
    
  2. Create a new application

  3. Fill out the form with a Name of your choosing, and set Client type and Authorization grant type as shown in the image below.

    ../_images/oauth-create-client.png
  4. Copy the Client id and submit the form (you can access this id at any time).

  5. In your Arches project’s settings.py or settings_local.py file, set or add this variable

    MOBILE_OAUTH_CLIENT_ID = "<your new Client id>"
    

Important

  • Only make one application, though you are technically allowed to make more.

  • An application is “owned” by whichever user created it, and will not be visible to other users.

Set WSGIPassAuthorization in Apache Conf

If you are using Apache as a webserver, you must add the following line to your VirtualHost:

WSGIPassAuthorization on

Restart Apache for all of these steps to take effect. You should now be able to use the Arches Collector Manager to create new projects.

Configure a Celery Broker

To support sync operations between the mobile app and your Arches database, Celery must be supplied with a message broker. Please see Task Management for how to set this up.