I'm not sure if this is the best way to do it but this seems to work for me:
LocalSettings.php of the repo:
wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" );
$wgWBRepoSettings['siteLinkGroups'] = [ 'mywiki', 'pool', 'quote' ];
$wgWBRepoSettings['localClientDatabases'] = array(
'de' => 'dewiki',
'en' => 'enwiki',
'ja' => 'jawiki',
);
$wgExtraNamespaces[120] = "Property";
$wgExtraNamespaces[121] = "Property_talk";
$entitySources = [
'data' => [
'entityNamespaces' => [ 'item' => 0, 'property' => 120 ],
'repoDatabase' => 'datawiki',
'baseUri' => 'https://data.mywiki.com/wiki/',
'interwikiPrefix' => '',
'rdfNodeNamespacePrefix' => '',
'rdfPredicateNamespacePrefix' => 'wd',
'type' => 'db'
],
];
$wgWBRepoSettings['entitySources'] = $entitySources;
$wgWBRepoSettings['localEntitySourceName'] = 'data';
LocalSettings.php of the clients:
wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" );
$wgWBClientSettings['repoUrl'] = 'https://data.mywiki.com';
$wgWBClientSettings['repoScriptPath'] = '';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$entitySources = [
'datawiki' => [
'repoDatabase' => 'datawiki',
'baseUri' => 'https://data.mywiki.com/wiki/',
'entityNamespaces' => [
'item' => 0,
'property' => 120,
],
'interwikiPrefix' => '',
'rdfNodeNamespacePrefix' => '',
'rdfPredicateNamespacePrefix' => 'wd',
],
];
$wgWBClientSettings['entitySources'] = $entitySources;
$wgWBClientSettings['itemAndPropertySourceName'] = 'datawiki';
$wgWBClientSettings['siteLinkGroups'] = [ 'mywiki' ];
$wgWBClientSettings['siteGlobalID'] = 'enwiki';
$wgWBClientSettings['otherProjectsLinks'] = [ 'poolwiki', 'quotewiki' ];
After the changes, I also ran cleanupTitles.php on the repo. Thanks and cheers!