Obtain a client id/secret pair from Codeberg (under Manage OAuth2 Applications). Set the name to whatever and set the redirect uri to https://your.discourse/auth/codeberg/callback
This is a companion discussion topic for the original entry at https://meta.discourse.org/t/discourse-codeberg-login/255511