Jump to: navigation, search

First, follow the setup instructions. If you aren't using Ubuntu or Debian, then you might have to follow the developer setup instructions instead.

Check that your localhost interwiki is set up correctly[edit]

First check that your api is accessible from the server Parsoid is going to run on:

curl http://your-mediawiki-server/api.php

Then set this URL in your /etc/mediawiki/parsoid/settings.js (Parsoid/js/api/localsettings.js in a developer install):

parsoidConfig.setMwApi({ uri: 'https://your-mediawiki-server/api.php', prefix: 'localhost', domain: 'localhost' });

(In older versions of mediawiki, the api.php file is located in a subfolder, e.g. '/w/'. In this case, the uri would be: 'https://your-mediawiki-server/w/api.php'.)

Now (re-)start Parsoid (sudo service parsoid restart on Ubuntu, sudo /etc/init.d/parsoid restart on Debian, node server & in a developer install) and verify that it is working:

curl -L http://localhost:8142/localhost/v3/page/html/<pagename>/
# or, for a developer install:
curl -L http://localhost:8000/localhost/v3/page/html/<pagename>/

Usually "Main_Page" is a good candidate for <pagename>.

The first "localhost:8xxx" is yours (Apache) web server virtual host, for example it can be:; localhost;;; etc.). The second "/localhost/" is those set up in: parsoidConfig.setMwApi({ ... domain: 'localhost' }).

You can set up any number of wikis by adding more parsoidConfig.setMwApi statements in settings.js / localsettings.js.

Is your parsoid even working and "serving"? Check in your browser:


Type in some wiki styled text

Hit "Submit Query" button

Should see formatted text

Invalid Domain Error[edit]

Invalid domain: localhost

This error likely means there is an issue with the Parsoid configuration file. Some items to check about the configuration file are:

  • Has the Parsoid service been restarted? Are there any errors in the Parsoid log file?
  • Is the configuration file being read? Try putting errors in the file then restart the service and check the log to see that it saw those errors.
  • Is there an error in the configuration section for that domain? For example, "#- # This is the only required parameter," would need the first hash removed in order for for the mwApi section to be read.

Other things to check[edit]

  • If your MediaWiki is private, then you need to set up VisualEditor to forward the cookie to Parsoid. See the VisualEditor instructions for this case. [1]
    • If you enabled cookie forwarding, but Parsoid logs ETIMEDOUT (causes VisualEditor to 'load' indefinitely) when accessing a page, you may want to make sure you included the $wgSessionsInObjectCache = true in your config, as documented in the VE instructions.
  • If your MediaWiki runs via SSL, make sure that your Parsoid server can access your MediaWiki without certificate errors. In other words; make sure that the certificate is valid and added to the certificate storage on your Parsoid-running system.

Alternatively and similarly, you can set up your webserver to listen on another port, that is not open on your firewall, thus it can be standard http without SSL, therefore be accessed by Parsoid.

  • Debian package version of Parsoid stores its logs in /var/log/parsoid/parsoid.log.
  • You might also want to check the Troubleshouting section of the Extension:VisualEditor page.


  1. Also see bug 44483.