Wikibase/Docker

The Wikibase team is now regularly releasing Docker images with MediaWiki, Wikibase and associated services. With a little customization, you can install exactly the kind of Wikibase instance you need.

Before you start

 * You’ll need to have docker and docker-compose installed on the computer where you want to run your Wikibase instance. (For help with this step, consult the resources list at the bottom of the page.)
 * The Wikibase team recommends providing at least 8GiB of RAM for a complete Docker install including all services.
 * You can get quick insight into your Docker resource usage with the  command; also check out Docker’s documentation on resource constraints.

Preparing your environment
Examine the files in the example directory of the wikibase-release-pipeline repository. As you'll see below, you'll be creating your own copies of several of these files and using them to launch your version of our Docker images.

You'll need a  file much like the one provided in the   directory, and an optional   (see below for context). You'll also need your own file.

''' Create a new directory.  Copy the  file into that directory, and copy the   in the example directory into your new directory as a file named  .''' ''' In the file, replace the passwords and secrets with your own. '''

MediaWiki Configuration

 * MW_ADMIN_NAME
 * MW_ADMIN_PASS
 * MW_ADMIN_EMAIL

These values will be deployed into your MediaWiki installation. You'll use this username and password to log into the web interface of your new instance for the first time; the email address you enter here also serves as your password recovery channel.



This secret key should be unique; MediaWiki uses it for several purposes (e.g., session management, fallback cryptographic entropy source). See the link for more information.

Database Configuration

 * DB_NAME
 * DB_USER
 * DB_PASS

The database name, user and password you specify here will be deployed into your installation.

Wikibase Configuration

 * WIKIBASE_PINGBACK=false

By default, the Wikibase pingback feature is disabled. Please consider enabling this feature (which sends only anonymized data) by changing  to.

Enabling this feature significantly improves Wikimedia Deutschland's insight into how Wikibase is being used and helps us make more informed decisions regarding the development roadmap. For more information, read our pingback documentation topic.

Hostnames






These define the host name and port of your Wikibase (what you would put in your browser’s address bar) and any external services you chose to install.

If you're using any of the above external services outside of a self-contained Docker setup, you need to set,  ,   and/or   to publicly-accessible hostnames -- that is, hostnames that can be resolved in DNS -- or IP addresses (which might be the right choice if you're running this on a local network). Don't use  in any setup that requires separate services to talk to one another.

Minimal install
At this stage, you have what you need to install MediaWiki (running on port 80) with Wikibase and a MySQL (MariaDB) backing database.

In the folder where you placed as mentioned above, simply run:

Extended install
You may also wish to run additional services like the query service (WDQS), QuickStatements (see here for more information) and Elasticsearch.

To run these additional services we need to bring the containers up and specify both configurations by running:

Job runner
The example docker-compose.yml sets up a dedicated job runner which restarts itself after every job, to ensure that changes to the configuration are picked up as quickly as possible.

If you run large batches of edits, this job runner may not be able to keep up with edits. You can speed it up by increasing the  variable in your   file, to run more jobs between restarts, if you’re okay with configuration changes not taking effect in the job runner immediately.

Alternatively, you can run several job runners in parallel by adding an option like  to the docker-compose up command.

After install
1. Verify that all the services have started: run. You should see something like this: Name                   Command             State         Ports - example_mysql_1     docker-entrypoint.sh mysqld   Up      3306/tcp example_wikibase_1  /bin/bash /entrypoint.sh      Up      0.0.0.0:80->80/tcp

2. Log into your local machine.

3. You may check the logs for success, further information or errors using this command:

If you would like to create links between MediaWiki and Wikibase, make sure to run the add site script. Otherwise, you will see error messages like "The provided site identifier was not recognized".

For more detailed information, check out the README in the examples section of the wikibase-release-pipeline repository.

Using your new instance
Once all the services have started, you can begin the exciting process of filling up, extending and customizing your empty instance of Wikibase. Take a look at our setup resources page to get started.