The Lookup-Server is a server component that can be run independently from an Nextcloud Server. This Lookup-Server can be used by Nextcloud to find remote users that can be used for federated sharing. This is useful for autocompletion in the sharing dialog to get the federation ID. Users can optionally decide to publish their sharing ID to be found by others. Think about it as a kind of public sharing telephone book.
Please look into the doc directory for more information.
In some cases, due to race condition, duplicate entries may have been inserted into the users table, meaning more than one row with the same federationId. While this does not cause any critical issues, it can lead to unnecessary database growth over time.
Since this was reported, a UNIQUE KEY constraint has been added to users.federationId in mysql.dmp, preventing this from happening on new installations.
If your installation was set up before this change, two SQL scripts are available under sql/ to help you fix this:
sql/cleanup_duplicate_users.sql- removes entries with duplicatedfederationId, keeping the most recent onesql/add_unique_federationId.sql- adds the unique constraint onusers.federationId
cleanup_duplicate_users.sql should be run before add_unique_federationId.sql, since the unique constraint cannot be added while duplicates exist.
Scripts can be run like:
mysql -h database_host -u username -p database_name < sql/cleanup_duplicate_users.sqlEven though data in these tables is regenerated upon new user creation/login, it is advised to back up your database before running the scripts.
This code is licensed as AGPL v3 or later.
If you want to contribute please open a pull request here on github. Every improvement is welcome.
Frank Karlitschek frank@nextcloud.com