Patching Nextcloud
Obtaining a patch
If you found a related pull request on GitHub that solves your issue, or you want to help developers and verify a fix works, you can get a patch for the pull request.
- Using https://github.com/nextcloud/server/pull/26396 as an example.
- Append
.diffto the URL: https://github.com/nextcloud/server/pull/26396.diff - Download the patch to your server e.g. via
wget https://github.com/nextcloud/server/pull/26396.diff(this will place26396.diffin the local directory) - Follow the Applying a patch steps.
- If you are on an older Nextcloud version, you might first need to go to the correct backported patch for your version.


- You can find the appropriate version by looking for a link posted by
backportbot-nextcloudto the backport pull request for your release, or by checking for a developer comment with a manual backport link. Use the.diffURL of that backport PR.
Applying a patch
Patching server
Patching apps
Reverting a patch
Notes and troubleshooting
提示
You may see errors about files not being found, especially when applying patches from GitHub. Patches can include development or test files (for example, files under
build/ortests/) that are not present on your installation. These messages are expected and can be ignored if they refer only to such files.