MediaWiki Hidden Service: Anonymous Collaborative Wikis on Tor
Collaborative wikis have documented historical events, technical knowledge, and cultural information that governments and corporations have attempted to suppress. MediaWiki, the software powering Wikipedia, can be deployed as a Tor hidden service to create a censorship-resistant knowledge base accessible only through Tor. An .onion MediaWiki allows anonymous contributors to add and edit content without revealing their IP addresses, and the server's location remains hidden from content removal requests and network-level blocking. This architecture is used by privacy communities maintaining technical documentation, historical record projects, and collaborative research efforts operating under jurisdictional constraints. This guide covers MediaWiki deployment, anonymous editing configuration, spam prevention strategies that work without traditional CAPTCHAs (which typically require clearnet access to verify), and content moderation for anonymous environments.
Need this done for your project?
We implement, you ship. Async, documented, done in days.
Install MediaWiki on a LAMP stack (Linux, Apache, MySQL/MariaDB, PHP 8.1+) or LEMP stack (Nginx instead of Apache). Install dependencies: apt install php php-mysql php-mbstring php-xml php-intl mariadb-server nginx. Download MediaWiki from the official releases, extract to /var/www/mediawiki. Run the web-based installer by pointing Tor Browser to your .onion address after configuring the hidden service. In LocalSettings.php, set $wgServer = 'http://youronion.onion', $wgScriptPath = '', and $wgArticlePath = '/wiki/$1'. Disable $wgAllowExternalImages = false to prevent image hotlinking that could expose the server via clearnet image requests. Configure $wgUploadPath to serve uploads through the .onion only. Cache: APC or Memcached significantly improve wiki performance under Tor's latency.
Anonymous Editing Configuration
MediaWiki supports anonymous editing where contributors edit without account registration. Enable with $wgGroupPermissions['*']['edit'] = true. This allows anyone reaching the .onion to edit. The IP address MediaWiki would log for anonymous edits will show the Tor exit node IP, not the contributor's real IP. To prevent all users from appearing to come from the same exit node (which happens when many users share an exit), configure MediaWiki to log a hash of a more granular identifier or simply accept that anonymous editors appear as Tor IPs. For semi-anonymous editing requiring account creation but not personal information, enable $wgEmailConfirmToEdit = false and allow registration with only username/password (no email requirement). Edit history is maintained by username or anonymous IP, enabling attribution for editorial disputes.
Spam Prevention Without Traditional CAPTCHAs
Traditional image CAPTCHAs (reCAPTCHA, hCaptcha) require contacting clearnet servers that log IPs - defeating anonymous editing. Tor-compatible spam prevention alternatives: (1) Question-based CAPTCHA via MediaWiki's QuestyCaptcha extension - ask domain-specific questions that spammers cannot automatically answer. (2) AbuseFilter extension - automatically block edits matching spam patterns (excessive external links, known spam phrases). (3) SpamBlacklist extension - block known spam domains and phrases from being added. (4) ConfirmEdit with math CAPTCHA - simple arithmetic challenges handled locally without external servers. (5) For high-spam environments, require account creation for all edits and implement manual account approval by administrators. The combination of AbuseFilter, SpamBlacklist, and question-based CAPTCHA handles most spam without clearnet external service calls.
Content Moderation in Anonymous Environments
Anonymous wikis face unique moderation challenges: vandalism, organized disruption, and coordinated inaccurate edits. MediaWiki's moderation tools: Rollback (one-click revert of bad edits by designated rollbackers), Protect pages (restrict editing to confirmed users or admins for sensitive content), and FlaggedRevs extension (require review before edits go live). For high-conflict topics, enable pending changes review where anonymous edits queue for approval before publication. The WikimediaIncubator and other large wikis use Patrol to mark new edits as reviewed. Semi-protection (requiring account age/edit count for editing) reduces most automated vandalism. MediaWiki's block system blocks specific usernames or IP ranges - blocking Tor exit nodes by IP is counterproductive since all Tor users share exit IPs, but blocking specific account patterns (username/email) is effective against coordinated campaigns.
Backup, Redundancy, and Mirror Configuration
MediaWiki provides built-in export/import tools for content backup. Export all pages as XML: php maintenance/dumpBackup.php --full > wiki_dump.xml. Import: php maintenance/importDump.php wiki_dump.xml. For database backup: mysqldump --single-transaction anubizwiki > wiki_db.sql. Schedule automatic daily backups using cron, storing to encrypted storage. For redundancy, MediaWiki supports read-only mirrors: set up a second .onion server that synchronizes from the primary and serves read-only requests. Implement this with database replication (MariaDB master-replica) or scheduled rsync of the database dump and file uploads. For distributed censorship resistance, encourage the wiki community to maintain XML dump mirrors at different .onion addresses. The Kiwix offline format allows generating a complete offline copy of the wiki for distribution.