Compare commits

...

460 commits

Author SHA1 Message Date
a913c11230 bump version
Some checks are pending
ci/woodpecker/push/publish/1 Pipeline is pending
ci/woodpecker/push/publish/2 Pipeline is pending
ci/woodpecker/push/publish/4 Pipeline is running
ci/woodpecker/push/docs Pipeline is running
2026-03-14 13:20:10 +00:00
Oneric
9d1e169472 webfinger/finger: allow WebFinger endpoint delegation with FEP-2c59
The ban on redirects was based on a misreading of FEP-2c59’s
requirements. It is only meant to forbid addresses other than
the canonical ActivityPub ID being advertised as such in the
returned WebFinger data.
This does not meaningfully lessen security and verification still
remains stricter than without FEP-2c59.

Notably this allows Mastodon with its backwards WebFinger redirect
(redirecting from the canonical WebFinger domain to the AP domain)
to adopt FEP-2c59 without causing issues or extra effort to existing
deplyoments which already adopted the Mastodon-recommended setup.
2026-03-13 00:00:00 +00:00
Oneric
4f03a3b709 federation.md: document our WebFinger behaviour 2026-03-13 00:00:00 +00:00
Oneric
e8d6d054d0 test/webfinger/finger: fix tests
One asserted the response format of finger_actor on a finger_mention
call as a previous iteration of the implementation mistakenly returned.
The other didn’t actually test anything WebFinger but fundamental id
containment and verification for generic AP fetches. Now it does.
2026-03-12 00:00:00 +00:00
Oneric
ab2210f02d test/webfinger/finger: add more validation tests 2026-03-12 00:00:00 +00:00
Oneric
5256785b9a test/webfinger/finger: mock url in all new tests
It is used in security checks and only due to an abudance of
existing tests lacking it, _only_ the test env is allowed to
fallback to the query URL for theses tests as a temporary
(well, ... it’s been a while now) measure.
We really shouldn’t be adding more deficient tests like that.
2026-03-12 00:00:00 +00:00
Oneric
4460c9c26d test/webfinger/finger: improve new test names and comments 2026-03-12 00:00:00 +00:00
f87a2f52e1 add extra happy and unhappy path tests for webfingers 2026-03-12 00:00:00 +00:00
627ac3645a add some more webfinger tests 2026-03-12 00:00:00 +00:00
2020a2395a add baseline webfinger FEP-2c59 tests 2026-03-12 00:00:00 +00:00
Oneric
fd734c5a7b webfinger/finger: normalise mention resources to more common format 2026-03-12 00:00:00 +00:00
Oneric
d86c290c25 user: drop unused function variants and parameters 2026-03-12 00:00:00 +00:00
Oneric
838d0b0a74 ap/views: use consistent structure for root collections
Notably user follow* collections faked a zero totalItem count
rather than simply omitting the field and included a link to a first
page even when knowing this page cannot be fetched while most others
omitted it. Omitting it will spare us receiving requests doomed to
failure for this page and matches the format used by GtS and Mastodon.

Such requests occur e.g. when other *oma servers try to determine
whether follow* relationships should be publicly shown. Other
implementations like Mastodon¹ simply treat the presence of a (link to)
a first page aready as an indicator for a public collection. By
omitting the link Mastodon servers will now too honour our users
request to hide follow* details.

The "featured" user collection are typically quite small and thus
the sole occurence of the alternative form where all items are directly
inlined into the root without an intermediate page. Thus it is not
converted but also no helper for this format created.

1: eb848d082a/app/services/activitypub/process_account_service.rb (L303)
2026-03-12 00:00:00 +00:00
Oneric
ddcc1626f8 ap/user_view: optimise total count of follow* collections
The count is precomputed as a user property.
Masto API already relies on this cached value.
This let’s us skip actually querying  follow* details unless
follow(ing/ed) users are publicly exposed and thus will be served.

In fact this could now be optimised further by using keyset pagination
to only fetch what’s actually needed for the current page. This would
also completely obsolete the need for the _offset collection page
helpers. However, for this pagination to be efficient it needs to happen
o the follow relation table, not users. This is left to a future commit.

Due to an ambiguity with PhoenixHtmlHelpers the Ecto.Query
select import was unusable without extra qualification,
therfore it is converted to a require expression.
2026-03-12 00:00:00 +00:00
Oneric
fbf02025e0 user/query: drop unused legacy parameter
There deactivated db column since 860b5c7804
and users of this legacy kludge introduced in 10ff01acd9
all migrated to an equivalent newer parameter
2026-03-12 00:00:00 +00:00
Oneric
a899663ddc Fix malformed is_active qualifiers in User.Query usages
While "is_active" is a property of users, it is not a recognised keyword
for the User.Query helper; instead "deactivated" with negated value must
be used.
This arose because originally the user property was also called
"deactivated" until it was renamed adn negated five years ago
in 860b5c7804. This included renaiming
the parameter in most but not all User.Query usages.
Notably the parameter in User.get_followers_query was renamed
but not in User.get_friends_query (friends == following).
The accepted query parameter in User.Query however was not changed.
This lead to the former mistakenly including deleted users causing
too large values to be reported in the ActivityPub follower, but not
following collection as reported in #1078.

In Masto API responses filtering by `User.is_visible` weeded out
the extra accounts before they got displayed to API users.

On the surface it might seem logical to align the name of the User.Query
parameter with the actual property name. However, User.Query already
accepts an "active" parameter which is an alias for limiting to accounts
which are neither deleted nor deactivated by moderators (both indicated
by is_active) and also are not newly created account requests still
pending an admin approval (is_approved) or necessary email confirmation
(is_confirmed); in short as the alias suggests whether the account is
active. Two highly similar parameter names like this would be much too
confusing.

The renamed "is_active" on the other hand does not actually suffice to
say whether an account is actually active, only whether it has (not yet)
ceased to be active (by its own volition or moderator action).
Meaning its "new" name is actively misleading. Arguably the rename
made things worse for no reason whatsoever and should not ever have
happened.

For now, we’ll just revert the incorrect query helper parameter renames.

Fixes: https://akkoma.dev/AkkomaGang/akkoma/ issues/ 1078
2026-03-12 00:00:00 +00:00
Oneric
d2fda68afd user/fetch: properly flag remote, hidden follow* counts
Instead of treating them like a public zero count.
2026-03-12 00:00:00 +00:00
Oneric
9fb6993e1b cosmetic/user/fetch: reorder functions
Such that helper functions are near their sole caller
instead of being interpsarsed with other public functions
2026-03-12 00:00:00 +00:00
Oneric
4bae78d419 user/fetcher: assume collection to be private on fetch errors
With the follow info update now actually running after being fixed
a bunch of errors about :not_found and :forbidden collection fetches
started to be logged
2026-03-12 00:00:00 +00:00
Oneric
f3821628e3 test: fix module name of GettextCompanion tests
Oversight in 54fd8379ad
2026-03-12 00:00:00 +00:00
Oneric
b4c6a90fe8 webfinger/finger: allow leading @ in handles
At least for FEP-2c59 this shouldn’t be the case
but in theory some WebFinger implementations may
serve their subject with an extra @
2026-03-12 00:00:00 +00:00
Oneric
a37d60d741 changelog: add missing changes 2026-03-12 00:00:00 +00:00
Oneric
71757f6562 user/fetcher: utilise existing verified nick on user refetch
Unless the force-revalidation config is enabled (currently the default).
Also avoids an unneecessarily duplicated db query for the old user.
2026-03-12 00:00:00 +00:00
Oneric
892628d16d user/fetcher: always detect nickname changes on Update activities
Even when the "always force revalidation" option is not enabled
while avoiding unnecessary revalidations if nothing changed.

With this heuristic we should be able to change the default to "false"
soon, but for now keep it enabled to help amend recent bugs.
2026-03-12 00:00:00 +00:00
Oneric
2a1b6e2873 user/fetcher: drop nonsense type-based follow update skip
The real intent behind the commit introducing this seemed to have been
avoiding running this when the actor does not expose follow collection ids
ec24c70db8.
This is already taken care of with the :collections_available check.
Some Implementations use other actor type like Group etc for visible,
followable actors making skipping undesirable.

Notably though, this actually has _always_ skipped counter updates
as even when this check was introduced, the user changeset data and
struct used the :actor_type key not :type.

In some situations fetch_follow_information_for_user is called directly
from other modules thus occasionally counters still got updated
for accounts with closer federation relationships masking the issue.
2026-03-12 00:00:00 +00:00
Oneric
756cfb6798 user/fetcher: fix follow count update
Users no longer have an info substruct for over 6 years
since e8843974cb.
Instead the counters are now directly part of the user struct itself.
2026-03-12 00:00:00 +00:00
Oneric
698ee181b4 webfinger/finger: fix error return format for invalid XML
By default just a plain :error atom is returned,
differing from the return spec of the JSON version
2026-03-12 00:00:00 +00:00
Oneric
c80aec05de webfinger: rewrite finger query and validation from and to actors
Resolves all security issues discussed in 5a120417fd86bbd8d1dd1ab720b24ba02c879f09
and thus reactivates skipped tests.
Since the necessary logic significantly differs for WebFinger handle dicovery/validation
and fetching of actors from just the webfinger handle the relevant public function was split
necessitating also a partial rewrite of the user fetch logic.

This works with all of the following:
  - ActivityPub domain is identical to WebFinger handle domain
  - AP domain set up host-meta LRDD link to WebFinger domain
  - AP domain set up a HTTP redirect on /.well-known/webfinger
    to the WebFinger domain
  - Mastodon style: WebFinger domain set up a HTTP redirect
    on its well-known path to AP backend (only for discovery
    from nickname though until Mastodon supports FEP-2c59)

This intentionally does not work for setups where FEP-2c59 is not
supported and the initially queried domain simply directly responds with
data containing a nickname from another domain’s authority without any
redirecty. (This includes the setup currently recommended by Mastodon,
when enriching an AP actor. Once Mastodon supports FEP-2c59 though its
setup will start to work again too automatically).
While technically possible to cross-verify the data with the nickname
domain, the existing validation logic is already complex enough and
such cross-validation needs extra safety measures to not get trapped
into infinite loops. Such setups are considered broken.
2026-03-12 00:00:00 +00:00
Oneric
69622b3321 Drop obsolete kludge for a specific, dead instance
It doesn’t make sense in general (many implementations use ids not nicks in ap_id)
and just wastes time by making additional, unnecessary, failing network requests.
This arguably should have never been committed.
2026-03-12 00:00:00 +00:00
Oneric
1e6332039f user/fetcher: also validate user data from Update
And fixup sloppy test data
2026-03-12 00:00:00 +00:00
Oneric
eb15e04d24 Split user fetching out of general ActivityPub module
The ActivityPub module is already overloaded and way too large.
Logic for fetching users and user information is isolated from
all other parts of the ActivityPub module, so let’s split it out.
2026-03-12 00:00:00 +00:00
Oneric
25461b75f7 webfinger: split remote queries and local data generation
They do not share any logic and the lack of separation makese it easy
to end up in the wrong section with ensuing confusion.
2026-03-12 00:00:00 +00:00
Oneric
4a35cbd23d fed/out: expose webfinger property in local actors (FEP-2c59)
It makes discovery and validation of the desired webfinger address
much easier. Future commits will actually use it for validation
and nick change discovery.
2026-03-12 00:00:00 +00:00
Oneric
1cdc247c63 Temporarily disable customised webfinger hosts
Proper validation of nicknames must consider both the domain
the nickname is associated with _and_ the actor to be assigned this
nickname consent to this.
Prior attempts at securing this wer emade in
a953b1d927 and
0d66237205 but they do not suffice.

The existing code attempted to validate webfinger responses independent
of the actual ActivityPub actor data and only ever consider the former
(yet failed to properly validate even this).

When resolving a user via a user-provided nickname the assignment
done by the provided URL was simply trusted regardless of the actors
AP host or data. When the nresolving the AP id, the nickname from this
original WebFinger query was passed along as pre-trusted data overriding
any discovery or validation from the actual actors side.
This allowed malicious actors to serve rogue WebFinger data associating
arbitrary actors with any nicknames they wished. Prompting servers to
resolve this rogue nickname then creates this nonconsensual assignment.

Notably, the existing code’s attempt at verification (only for domain
consent) used the originally requested URL for comparison against the
domain in the nickname handle. This effectively disabled custom
WebFinger domains for honest servers unless using an host-meta LRDD link.
(While LRDD links were recommend in the past by both *oma nad Mastodon,
 today most implementations other than *oma instead
 recommend setups emplyoing HTTP redirects.)
Still, this strictness did not prevent spoofing by malicious server.
It did however mean that rogue nickname assignments from an initial
nickname-based discovery were at least undone on the next user refresh
provided :pleroma, Pleroma.Web.WebFinger, :update_nickname_on_user_fetch
was not changed from its default truthy value.
(A renewed fetch via the rogue nickname would re-establish it though)

When enriching an already resolved ActivityPub actor to discover its
nickname the WebFinger query was not done with the unique AP id as a
resource, but a guessed nickname handle.
Furthermore, the received WebFinger response was not validated
to ensure the ActivityPub ID the WebFinger server pointed to
for the final nickname matched the actual ID in the considered
AP actor data.
While the faulty request URI check described above provides some
friction for malicious actors, it is still possible for mischiveous
AP instances to setup a rogue LRDD link poitning to a third-party
domain’s WebFInger and using the freedom provided by the LRDD link
to overwrite the resource value we provide in the lookup. Thus usurping
existing nicknames in another domains authority.

Proposed tweaks to the existing, faulty checks to work with
HTTP-redirect-based custom WebFInger domains would have made it
even easier to usurp nicknames from foreign domains.

For now simply disable custom WebFinger domains as a quick hotfix.
Subsequent commits will partially de-spaghettify the relevant code
and completely overhaul webfinger and nickname handling and validation.
2026-03-12 00:00:00 +00:00
Oneric
4c63243692 emoji/pack: fix in-place changes
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Deleting a whole pack at once didn’t remove its emoji from memory
and ewly updated or added emoji used a wrong path. While the pack
also contains a path, this is the filesystem path while in-memory
Emoji need the URL path constructed from a constant prefix,
pack name and just the filename component of the filesystem file.
Test used to not check for this at all.

Fixes oversight in 318ee6ee17
2026-03-12 00:00:00 +00:00
Oneric
7b9a0e6d71 twitter_api/remote_follow: allow leading @ in nicknames
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
And never attempt to fetch nicknames as URLs
2026-03-02 00:00:00 +00:00
Oneric
5873e40484 grafana: update reference dashboard
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
2026-02-19 00:00:00 +00:00
Oneric
f8abae1f58 docs/admin/monitoring: document reference dashboard requires VM
As reported on IRC.
What exactly Prometheus takes offense with isn’t clear yet.
2026-02-19 00:00:00 +00:00
Oneric
4912e1782d docs/admin/monitoring: add instructions to setup outlier statistics 2026-02-19 00:00:00 +00:00
Oneric
6ed678dfa6 mix/uploads: fix rewrite_media_domain for user images
Fixes: #1064
2026-02-19 00:00:00 +00:00
7c0deab8c5 Merge pull request 'Fetcher: Only check SimplePolicy rules when policy is enabled' (#1044) from mkljczk/akkoma:fetcher-simple-policy into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1044
Reviewed-by: Oneric <oneric@noreply.akkoma>
2026-02-18 13:37:27 +00:00
00fcffe5b9 fix test
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-17 14:32:59 +01:00
246e864ce4 Merge pull request 'Mastodon-flavour (read) quotes API compat' (#1059) from Oneric/akkoma:masto-quotes-api into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1059
2026-02-07 22:39:47 +00:00
c4bcfb70df Merge pull request 'Use local elixir-captcha clone' (#1060) from use-local-captcha-clone into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1060
Reviewed-by: Oneric <oneric@noreply.akkoma>
2026-02-07 20:11:07 +00:00
cf8010a33e Merge pull request 'ensure utf-8 nicknames on nickname GETs and user validator' (#1057) from user-utf8 into develop
Some checks failed
ci/woodpecker/push/publish/4 Pipeline failed
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline failed
ci/woodpecker/push/publish/2 Pipeline failed
Reviewed-on: #1057
Reviewed-by: Oneric <oneric@noreply.akkoma>
2026-02-07 19:41:26 +00:00
4c657591a7 use version with git history
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2026-02-07 19:40:09 +00:00
6ae0635da7 mix format
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2026-02-07 19:28:13 +00:00
11dbfe75b9 pleroma git OBLITERATED
Some checks failed
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/pr/test/1 Pipeline failed
2026-02-07 19:16:32 +00:00
58ee25bfbb correct typings, duplicated check
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2026-02-07 19:09:02 +00:00
Oneric
fd87664b9e api/statuses: allow quoting local statuses locally
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2026-02-07 00:00:00 +00:00
Oneric
731863af9c api/statuses: allow quoting own private posts
Provided the quote is private too.

Ideally we’d inline the quoted, private status since not all
remotes may already know the old post and some implmentations
(ourselves included) have trouble fetching private posts.
In practice, at least we cannot yet make use of such an inlined post
anyway defeating the point. Implementing the inlining and ability to
make use of the inlined copy is thus deferred to a future patch.

Resolves: #952
2026-02-07 00:00:00 +00:00
Oneric
5b72099802 api/statuses: provide polyglot masto-and-*oma quote object
However, we cannot provide Masto-style shallow quotes this way.

Inspired-by: https://issues.iceshrimp.dev/issue/ISH-871#comment-019c24ed-c841-7de2-9c69-85e2951135ca
Resolves: #1009
2026-02-07 00:00:00 +00:00
Oneric
c67848d473 api/statuses: accept and prefer masto-flavour quoted_status_id
The quote creation interface still isn’t exactly drop-in compatible for
masto-only clients since we do not provide or otherwise deal with
quote-authorization objects which clients are encouraged to check before
even offering the possibility of attempting a quote. Still, having a
consistent paramter name will be easier on clients.

Also dropped unused quote_id parameter from ActivityDraft struct
2026-02-07 00:00:00 +00:00
Oneric
a454af32f5 view/nodeinfo: use string keys
This makes embedded nodeinfo data
consistent between local and remote users
2026-02-07 00:00:00 +00:00
Oneric
e557bbcd9d api/masto/account: filter embedded nodeinfo
The only kown user is akkoma-fe and it only ever
accesses the software information. For *oma instances
the full, unfiltered nodeinfo data can be quite large
adding unneeded bloat to API responses.
This would have become worse with the duplication of
account data needed for Masto quote post interop.

In case a client we’re not aware of actually uses more fields from
nodeinfo, a new but temporary config setting is provided as a workaround.

Fixes: #827
2026-02-07 00:00:00 +00:00
b20576da2e Merge pull request 'http: allow compressed responses, use system CA certs instead of CAStore fallback' (#1058) from Oneric/akkoma:http-lib-updates into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1058
2026-01-30 20:14:53 +00:00
dee0e01af9 object/fetcher: only check SimplePolicy rules when policy is enabled
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-30 00:00:00 +00:00
Oneric
e488cc0a42 http/adapter_helper: explicitly enable IPv4
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Mint was upgraded in b1397e1670
2026-01-27 00:00:00 +00:00
Oneric
be21f914f4 mix: bump finch and use system cacerts
This upgrade pulls in a fix to better avoid killing re-actived pools,
obsoletes the need for our own HTTP2 server push workaround and allows
us to use system CA certs without breaking plain HTTP connections.

We tried to to the latter before on a per request basis, but this didn’t
actually do anything and we actually relied on the CAStore package
fallback the entire time. The broken attempt was removed in
ed5d609ba4.

Resolves: #880
2026-01-27 00:00:00 +00:00
Oneric
b9eeebdfd7 http: accept compressed responses
Resolves: #755
2026-01-27 00:00:00 +00:00
Oneric
c79e8fb086 mix: update Tesla to >= 1.16.0
This is the first release containg fixes making DecompressResponse
stable enough and suitable to be used by default allowing us to
profit from transport compression in obtained responses.

(Note: no compression is used in bodies we send out, i.e.
 ActivityPub documents federated to remote inboxes, since
 this will likely break signatures depending on whether
 the checksum is generated and checked before or after compression)

Ref: 5bc9b82823
Ref: 288699e8f5
2026-01-27 00:00:00 +00:00
8da6785c46 mix format
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2026-01-25 01:31:26 +00:00
3deb267333 if we don't have a preferredUsername, accept standard fallback 2026-01-25 01:30:25 +00:00
0d7bbab384 ensure utf-8 nicknames on nickname gets and user validator 2026-01-25 01:29:10 +00:00
aafe0f8a81 Merge pull request 'scrubbers/default: Allow "mention hashtag" classes used by Mastodon' (#1056) from mkljczk/akkoma:allow-mention-hashtag into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1056
2026-01-24 14:39:56 +00:00
24faec8de2 scrubbers/default: Allow "mention hashtag" classes used by Mastodon
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-24 14:17:33 +01:00
816d2332ab Merge pull request 'Update docs/docs/administration/backup.md' (#1050) from patatas/akkoma:develop into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1050
Reviewed-by: Oneric <oneric@noreply.akkoma>
2026-01-18 17:28:49 +00:00
a4a547e76e Update docs/docs/administration/backup.md
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
separate commands with semicolon (consistent with previous step in restore instructions)
2026-01-17 20:08:57 +00:00
Oneric
6cec7d39d6 db/migration/20251227000002: improve performance with older PostgreSQL
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
On fedi.absturztau.be the planner did not utilise the context
index for the original version leading to a query plan
100× worse than with this tweaked version.

With PostgreSQL 18 the relative difference is much smaller
but also in favour for the new version with the best observed
instance resulting in nearly half the estimated cost.
2026-01-13 00:00:00 +00:00
Oneric
3fbf7e03cf db/migration/20251227000000: add analyze statement
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
The second next migration greatly profits from this index
but sometimes the planner may not pick it up immediately
without an explicit ANALYZE call.
2026-01-12 00:00:00 +00:00
Oneric
31d277ae34 db: (re)add activity type index
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Before 32a2a0e5fa the context index
acted as a (based on the name surprising) type index too.
Type-based queries are used in the daily pruning of old e.g. Delete
activities by PruneDatabaseWorker, when querying reports for the admin
API and inferring by the significant change in average execution time
a mysterious COUNT query we couldn’t associated with any code so far:

  SELECT count(a0."id") FROM "activities" AS a0 WHERE (a0."data"->>$2 = $1);

Having this as a separate index without pre-sorting results in
an overall smaller index size than merging this into the context index
again and based on it not having been sorted before non-context queries
appear to not significantly profit from presorting.
2026-01-11 00:00:00 +00:00
Oneric
3487e93128 api/v1/custom_emoji: improve performance
All checks were successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Metrics showed this endpoint taking unexpectedly long processing times
for a simple readout of an ETS table. Further profiling with
fprof revealed almost all time was spent in URI.merge.

Endpoint.url() is per its documented API contract guaranteed to have a
blank path and all our emoji file paths start with a slash.
Thus, a simple binary concat is equivalent to the result of URI.merge.

This cuts down the profiled time of just the fetching and
rendering of all emoji to a tenth for me. For the overall API request
with overhead for handling of the incoming response as well as encoding
and seding out of the data, the overall time as reported by phoenix
metrics dropped down by a factor of about 2.5.
With a higher count of installed emoji the overall relative time
reduction is assumed to get closer to the relative time reduction of
the actual processing in the controller + view alone.

For reference, this was measured with 4196 installed emoji:
(keep in mind enabling fprof slows down the overall execution)

          fprof'ed controller   Phoenix stop duration
 BEFORE:     (10 ± 0.3)s             ~250 ms
  AFTER:    (0.9 ± 0.06)s            ~100 ms

Note: akkoma-fe does not use this endpoint, but /api/v1/pleroma/emoji
defined in Pleroma.Web.TwitterAPI.UtilController:emoji/2 which only
emits absolute-path references and thus had no use for URI.merge anyway.
2026-01-11 00:00:00 +00:00
93b513d09c Merge pull request 'Fix conversations API' (#1039) from Oneric/akkoma:fix-conv-api into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1039
2026-01-11 15:54:49 +00:00
Oneric
6443db213a conversation: remove unused users relationship
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
It is never used outside tests
and even there its correctness and/or
worth was questionable. The participations recipients
or just testing over the particiaptions’ user_id seem
like a better fit.
In particular this was always preloaded for API responses
needlessly slowing them down
2026-01-11 00:00:00 +00:00
Oneric
263c915d40 Create and bump conversations on new remote posts
The handling of remote and local posts should really be unified.
Currently new remote posts did not bump conversations
(notably though, until before the previous commit remote
 edits (and only edits), did in fact bump conversations due to being
 the sole caller of notify_and_stream outside its parent module)
2026-01-11 00:00:00 +00:00
Oneric
388d67f5b3 Don't mark conversations as unread on post edits
Without any indication of which post was edited this is only confusing and annoying.
2026-01-11 00:00:00 +00:00
Oneric
6adf0be349 notifications: always defer sending
And consistently treat muted notifications.

Before, when Notifications where immediately sent out, it correctly
skipped streaming nad web pushes for muted notifications, but the
distinction was lost when notification sending was deferred.
Furthermore, for users which are muted, but are still allowed to
create notifications, it previously (sometimes) automatically marked
them as read. Now notifications are either always silent, meaning
 - will not be streamed or create web pushes
 - will automatically be marked as read on creation
 - should not show up unless passing with_muted=true
or active, meaning
 - will be streamed to active websockets and cause web pushes if any
 - must be marked as read manually
 - show up without with_muted=true

Deferring sending out of notifications isdesirable to avoid duplicate
sending and ghost notifications when processing of the actiity fails
later in the pipeline and avoids stalling the ongoing db transaction.

Inspired by https://git.pleroma.social/pleroma/pleroma/-/merge_requests/4032
but the actual implementation differs to not break with_muted=true.
2026-01-11 00:00:00 +00:00
Oneric
2516206a31 conversation: include owner in recipients upon creation
Participation.set_Recipients already does something equivalent,
but it was forgotten here.
2026-01-11 00:00:00 +00:00
Oneric
9311d603fb conversation_controller: skip superfluous second order clause
This might also have prevented utilising the pre-sorted index.
2026-01-11 00:00:00 +00:00
Oneric
34df23e468 api/masto/conversation: fix pagination over filtered blocks
Previously the view received pre-filtered results and therefore
pagination headers were also only generated with pre-filtered
results in mind. Thus the next page would again traverse over
previously seen but filtered out entries.
Curucially, since this last_activity filtering is happening _after_
the SQL query, it can lead to fewer results being returned than
requested and in particular even zero results remaining.
Sufficiently large blocks of filtered participations thus caused
pagination to get stuck and abort early.

Ideally we would like for this filtering to occur as part of the SQL
query ensuring we will laways return as many results as are allowed as
long as there are more to be found. This would oboslete this issue.
However, for the reasons discussed in the previous commit’s message
this is currently not feasible.

The view is the only caller inside the actual application of the
for_user_with_pagiantion* functions, thus we can simply move filtering
inside the view allowing the full results set to be used when generating
pagination headers.
This still means there might be empty results pages, but now with
correct pagination headers one can follow to eventually get the full set
2026-01-11 00:00:00 +00:00
Oneric
1029aa97d2 api/masto/conversations: paginate by last status id
The old pagination logic was inconsistent and thus broken.
It used to order conversations based on updated_at but generated
pagination HTTP Link headers based on participation IDs.
Thus entries could repeat or be left out entirely.

Notably using updated_at also lead to bumps when
merely marking an individual conversation as read,
though not when marking _all_ conversations as read in bulk
since Repo.update_all does not touch date fields autoamtically.

For consistent and sensible "last active" ordering this is replaced
by using the flake ID (which contains the date) of the last status
which bumped the conversation for both ordering and pagination
parameters. This takes into account whether the status was
visible to the participation owner at the time of posting.

Notably however, it does not care about whether the status continues to
exist or continues to be visible to the owner. Thus this is not marked
as a foreign key and MUST NOT be blindly used as such!
For the most part, this should be considered as just a funny timestamp,
which is more resiliant against spurious bumps than updated_at, offers
deterministic sorting for simulateanously bumped conversations and
better usability in pagination HTTP headers and requests.

Implementing this as a proper foreign key with continuously enforced
visibility restrictions was considered. This would allow to just load
the "last activity" by joining on this foreign key, to immediately
delete participations once they become empty and obsoleting the
pre-existing post-query result filtering.
However, maintaining this such that visibility restrictions are
respected at all times is challenging and incurs overhead.
E.g. unfollows may retroactively change whether the participation owner
is allowed to access activities in the context.

This may be reconsidered in the future once we are clearer
on how we want to (not) extend conversation features.

This also improves on query performance by now using a multi-row,
pre-sorted index such that one user querying their latest conversations
(a frequent operation) only needs to perform an index lookup (and
loading full details from the heap).
Before queries from rarely active users needed to traverse newer
conversations of all other users to collect results.
2026-01-11 00:00:00 +00:00
Oneric
ebd22c07d1 test/factory: take override paramters at more factories 2026-01-11 00:00:00 +00:00
Oneric
97b2dffcb9 pagination: allow custom pagination ids
While we already use wrapped return lists for
HTML pagination headers, currently SQL queries
from the SQL pagination helper use the primary key "id"
of some given table binding. However, for participations
we would like to be able to sort by a field which is not
a primary key. Thus allow custom field names.
2026-01-11 00:00:00 +00:00
Oneric
613135a402 ap: fix streamer crashes on new, locally initiated DM threads
Since side effect handling of local notes currently can only immediately
stream out changes and notifications (eventhough it really shouldn’t for
many more reasons then this) the transaction inserting the various
created objects into the database is not finished yet when StreamerView
tries to render the conversation.

This would be fine were it using the same db connection as the
inserting transaction. However, the streamer is a different process
and gets sent the in-memory version of the participation.

In the case of newly created threads the preloaded the streamer process
will not be able to load preload it itself since it uses a different db
connection and thus cannot see any effects of the unfinished transaction
yet. Thus it must be preloaded before passing it to Streamer.

Notably, the same reasoning applies to the new status activity itself.
Though fetching the activity takes more time with several prepatory
queries and in practice it appears rare for the actual activity query to
occur before the transaction finished.
Nonetheless, this too should and will be fixed in a future commit.

Fixes: #887
2026-01-11 00:00:00 +00:00
Oneric
120a86953e conversation: don't create participations for remote users
They can never query the participation via API nor edit the recipients,
thus such particiaptions would just forever remain unused and are
a waste of space.
2026-01-11 00:00:00 +00:00
Oneric
8d0bf2d2de conversation/participation: fix restrict_recipients
For unfathomable reasons, this did not actually use recipiepent (ship)
information in any way, but compared against all users owning a
participation within the same context.
This is obviously contradicting *oma’s manually managed recipient data
and even without this extension breaks if there are multiple distinct
subthreads under the same (possibly public) root post.
2026-01-11 00:00:00 +00:00
Oneric
32ec7a3446 cosmetic/conversation/participation: mark eligible functions as private 2026-01-11 00:00:00 +00:00
Oneric
9fffc49aaa conversation/participation: delete unused function
Redundant with unread_count/1 and only the latter is actually used
2026-01-11 00:00:00 +00:00
Oneric
32a2a0e5fa db: tweak activity context index
Presorting the index will speed up all context queries
and avoids having to load the full context before sorting
and limiting can even start.
This is relevant when get the context of a status
and for dm conversation timelines.

Including the id column adds to the index size,
but dropping non-Creates also brings it down again
for an overall only moderate size increase.
The speedup when querying large threads/conversations
is worth it either way.

Otherwise, the context attribute is only used as a condition in
queries related to notifications, but only to filter an otherwise
pre-selected set of notifications and this index will not be relevant.
2026-01-11 00:00:00 +00:00
Oneric
5608f974a3 api: support with_muted in pleroma/conversation/:id/statuses
It does not make sense to check for thread mutes here though.
Even if this thread was muted, it being explicitly fetched
indicates it is desired to be displayed.
While this used to load thread mutes, it didn’t actually apply them
until now, so in regard it does not change behaviour either and we
can optimise the query by not loading thread mutes at all.

This does change behavior of conversation timelines however
by now omitting posts of muted users by default, aligning it
with all other timelines.
2026-01-11 00:00:00 +00:00
Oneric
f280dfa26f docs/monitoring: note reference dashboard testing 2026-01-11 00:00:00 +00:00
Oneric
0326330d66 telemetry: log which activities failed to be delivered 2026-01-11 00:00:00 +00:00
d35705912f Merge pull request 'webfinger: accept canoncial AP type in XML and don’t serve response for remote users' (#1045) from Oneric/akkoma:fix-webfinger-type into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1045
2026-01-10 20:23:53 +00:00
Oneric
74fa8f5581 webfinger: don’t serve response for remote users’ AP id
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2026-01-10 00:00:00 +00:00
Oneric
967e2d0e71 webfinger: mark represent_user as private 2026-01-10 00:00:00 +00:00
Oneric
ee7e6d87f2 fed/in: accept canoncial AP type in XML webfinger data
This was supposed to be already handled for both XML and JSON
with d1f6ecf607 though the code
failed to consider variable scopes and thus was broken and
actually just a noop for XML.

For inexplicable reasons 1a250d65af
just outright removed both the failed attempt to parse the canonical
type in XML documents and also serving of the canonical type in our own
XML (and only XML) response.

With the refactor in 28f7f4c6de
the canoncial type was again served in both our own JSON and XML
responses but parsing of the canonical type remained missing
from XML until now.
2026-01-10 00:00:00 +00:00
e326285085 Merge pull request 'Various fixes' (#1043) from Oneric/akkoma:varfixes into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1043
2026-01-05 14:38:31 +00:00
Oneric
80817ac65e fed/out: also represent emoji as anonymous objects in reactions
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
It did not use the same Emoji object template as other occurrences.
This also fixes an issue with the icon URL not being properly encoded
as well as an inconsistency regarding the domain part of remote
reactions in retractions. All places use the image URL domain
except the query to find the activity to retract relie on the id.
Even before this change this made it impossible to retract remote
emoji reactions if the remote either doesn't send emoji IDs or
doesn't store images on the ActivityPub domain.

Addresses omission in 4ff5293093

Fixes: #1042
2026-01-05 00:00:00 +00:00
Oneric
5f4083888d api/stream: don’t leak hidden follow* counts in relationship updates
Based on the Pleroma patch linked below, but not needlessly
hiding the count if only the listing of the specific follow* accounts is
hidden while counts are still public.
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/4205

Co-authored-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-05 00:00:00 +00:00
Oneric
eb08a3fff2 api/pleroma/conversation: accept JSON body to update conversation 2026-01-05 00:00:00 +00:00
Oneric
d6209837b3 api/v1/filters: escape regex sequence in user-provided phrases 2026-01-05 00:00:00 +00:00
Oneric
59b524741d web/activity_pub: drop duplicated restrict_filtered 2026-01-05 00:00:00 +00:00
e941f8c7c1 Merge pull request 'Support Mastodon-compatible translations API' (#1024) from mkljczk/akkoma:akkoma-mastoapi-translations into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1024
2026-01-04 16:11:27 +00:00
b147d2b19d Add /api/v1/instance/translation_languages
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-04 00:00:00 +00:00
d65758d8f7 Deduplicate translations code
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-04 00:00:00 +00:00
f5ed0e2e66 Inline translation provider names in function
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-04 00:00:00 +00:00
3b74ab8623 Support Mastodon-compatible translations API
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-01-04 00:00:00 +00:00
c971f297a5 Merge pull request 'Deal with elixir 1.19 warnings and test failures' (#1029) from Oneric/akkoma:elixir-1.19-warnings into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1029
2025-12-29 00:09:37 +00:00
720b51d08e Merge pull request 'Update ci build scripts for 1.19' (#1038) from ci-builds-otp28 into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1038
2025-12-28 21:57:15 +00:00
27b725e382 Update ci/build-all.sh
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-12-28 21:52:01 +00:00
Oneric
86d62173ff test: fix regex compare for OTP28
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
This was technically already incorrect before and pointed out as such in
documentation, but in practice worked well until OTP28’s regex changes.
2025-12-28 00:00:00 +00:00
Oneric
cbae0760d0 ci: adjust elixir and OTP versions
Some checks failed
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/pr/test/1 Pipeline was successful
2025-12-28 00:00:00 +00:00
Oneric
1fed47d0e0 user/signing_key: fix public_key functions and test
Some checks failed
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/pr/test/2 Pipeline was successful
2025-12-25 00:00:00 +00:00
Oneric
712a629d84 Fix test in- and exclusion
We had a feww files matching neither inclusion nor exclusion rules.
With elixir 1.19 this creates a warning.
Most were intended to be ignored and thus we now override the default
rules in mix.exs to be explicit about this. However, two test files were
simply misnamed and intended to run, but untill now skipped.

Notably, the signing key test for shared key ids currently fails due to
a missing mock. For now this faulty test is simply disabled, the next
commit will fix it
2025-12-25 00:00:00 +00:00
Oneric
84ad11452e test: fix elixir 1.19 warnings in tests
Except for the struct comparisons, which was a real bug,
the changes are (in current versions) just cosmetic
2025-12-25 00:00:00 +00:00
Oneric
ae17ad49ff utils: comply with elixir 1.19 soft-requirement for parallel compiles
Elixir 1.19 now requires (with a deprecation warning) return_diagnostics
to be set to true for parallel compiles. However, this parameter was only
added in Elixir 1.15, so this raises our base requirement.
Since Elixir 1.14 is EOL anyway now this shoulöd be fine though.
2025-12-25 00:00:00 +00:00
Oneric
e2f9315c07 cosmetic: adjust for elixir 1.19 struct update requirments
When feasible actually enforce the to-be-updated data being the desired struct type.
For ActivityDraft this would add too much clutter and isn't necessary
since all affected functions are private functions we can ensure only
get correct data, thus just use simple map-update syntax here.
2025-12-25 00:00:00 +00:00
Oneric
fdd6bb5f1a mix: define preferred env in cli()
Defining inside project() is deprecated
2025-12-25 00:00:00 +00:00
Oneric
7936c01316 test/config/deprecations: fix warning comparsion for elixir 1.19
It can include a terminal-colour sequence before the final newline
2025-12-25 00:00:00 +00:00
Oneric
d92f246c56 web/ap/object_validators/tag: fix hashtag name normalisation
When federating out, we add the leading hashtag back in though
2025-12-25 00:00:00 +00:00
Oneric
8f166ed705 cosmetic: adjust for elixir 1.19 mix format 2025-12-25 00:00:00 +00:00
Oneric
b44292650e web/telemetry: fix HTTP error mapping for Prometheus
Some checks failed
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Fixes omission in commit 2b4b68eba7
which introduced a more concise response format for HTTP errors.
2025-12-24 00:00:00 +00:00
68c79595fd Merge pull request 'Fix more interactions with invisible posts and corresponding data leaks' (#1036) from Oneric/akkoma:fix-interacting-nonvisible-posts into develop
All checks were successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1036
2025-12-24 02:43:00 +00:00
Oneric
be7ce02295 test/mastodon_api/status: insert mute before testing unmute
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Currently the test is still correctly sensitive to the visibility issue
it wants to test, but it easy to see how this could chane in the future
if it starts considering whether a mute existed in the first place.
Inserting a mute first ensures the test will keep working as intended.
2025-12-24 00:00:00 +00:00
Oneric
b50028cf73 changelog: add entries for recent fixes
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2025-12-24 00:00:00 +00:00
Oneric
82dd0b290a api/statuses/unfav: do not leak post when acces to post was lost
If a user successfully favourited a post in the past (implying they once
had access), but now no longer are alllowed to see  the (potentially
since edited) post, the request would still process and leak the current
status data in the response.

As a compromise to still allow retracting past favourites (if IDs are
still cached), the unfavouriting operation will still be processed, but
at the end lie to the user and return a "not found" error instead of
a success with forbidden data.

This was originally found by Phantasm and fixed in Pleroma as part of
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/4400
but by completely preventing the favourite retraction.
2025-12-24 00:00:00 +00:00
Oneric
981997a621 api/statuses/bookmark: improve response for hidden or bogus targets
Also fixes Bookmark.destroy crashing when called with
parameters not mapping to any existing bookmark.

Partially-based-on: fe7108cbc2
Co-authored-by: Phantasm <phantasm@centrum.cz>
2025-12-24 00:00:00 +00:00
Lain Soykaf
126ac6e0e7 Transmogrifier: Handle user updates.
Cherry-picked-from: 98f300c5ae
2025-12-24 00:00:00 +00:00
Lain Soykaf
3e3baa089b TransmogrifierTest: Add failing test for Update.
Cherry-picked-from: ed538603fb
2025-12-24 00:00:00 +00:00
Oneric
25d27edddb ap/transmogrifier: ensure attempts to update non-updateable data are logged
Often raised errors get logged automatically,
but not always and here it doesn't seem to happen.
I’m not sure what the criteria for it being logged or not are tbh.
2025-12-24 00:00:00 +00:00
Phantasm
300744b577 CommonAPI: Forbid disallowed status (un)muting and unpinning
When a user tried to unpin a status not belonging to them, a full
MastoAPI response was sent back even if status was not visible to them.

Ditto with (un)mutting except ownership.

Cherry-picked-from: 2b76243ec8
2025-12-24 00:00:00 +00:00
Phantasm
ac94214ee6 Transmogrifier: update internal fields list according to constant
Adjusted original patch to drop fields not present in Akkoma

Cherry-picked-from: 3f16965178
2025-12-24 00:00:00 +00:00
Oneric
a2d156aa22 cosmetic/common_api: simplify check_statuses_visibility 2025-12-24 00:00:00 +00:00
Phantasm
31d5f556f0 CommonAPI: Fail when user sends report with posts not visible to them
Cherry-picked-from: 2b76243ec8
2025-12-24 00:00:00 +00:00
83832f4f53 bump version, update changelog
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
2025-12-07 05:02:26 +00:00
Oneric
3175b5aa25 docs: update for recent deprecations and removals
Some checks failed
ci/woodpecker/pr/test/1 Pipeline is running
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline failed
ci/woodpecker/push/publish/1 Pipeline failed
ci/woodpecker/push/publish/2 Pipeline failed
2025-12-05 00:00:00 +00:00
Oneric
6c1afa42d2 changelog: mention (repeated) deprecation of dm timeline
Some checks failed
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
As discussed on IRC this is already buggy on large instnaces
and conflicts with future cleanup and optimisation work.

The only remaining users currently appear to be Pleroma-derived web
frontends, namely akkoma-fe, pleroma-fe, pl-fe and Mangane.
We will switch akkoma-fe over to conversations before the actual
removal.
2025-11-28 18:37:59 +01:00
3a04241e3b Merge pull request 'include pl-fe in available frontends' (#1023) from mkljczk/akkoma:pl-fe into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1023
2025-11-28 17:04:52 +00:00
353c23c6cd include pl-fe in available frontends
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-11-28 09:22:31 +01:00
70877306af Merge pull request 'RFC: handling of third-party frontends in default available FE list' (#945) from Oneric/akkoma:third-party-frontends into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #945
2025-11-27 21:32:02 +00:00
9abce8876a Merge pull request 'Add mix task to rewrite media domains' (#961) from rewrite-media-urls into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #961
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-11-27 20:41:49 +00:00
22d1b08456 Merge pull request 'Tweak users database indexes and drop exclude_visibilities' (#1019) from Oneric/akkoma:db-index-tweaks into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1019
2025-11-27 19:43:23 +00:00
Oneric
453ab11fb2 changelog: add missing entries
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2025-11-27 00:00:00 +00:00
Oneric
0aeeaeb973 api: tentatively remove exclude_visibility parameter
This was originally added in a97b642289 as
part of https://git.pleroma.social/pleroma/pleroma/-/merge_requests/1818
with the hope/intent of using it to hide DMs by default from timelines.

This never came to be with thisd parameter still being unused today in
al of akkoma-fe, pleroma-fe, Husky, pl-fe, Mangange, fedibird-fe and
masto-fe. Given thypically only a small percentage of posts are DMs,
as well as issues with the SQL function and index used to implement this
a removal likely won't bother anyone while allowing us to clean up
bugged code and improve actually used functions.

While unlikely, we don't have a way to ascertain for sure whether there
are still users so for now only drop it from API Spec which leads to
the parameter being stripped out before processing and keep the actual
logic. If any users exist and complain we can easily revert this, if not
we will follow up with a proper cleanup.
2025-11-27 00:00:00 +00:00
Oneric
aac6086ca6 db: convert indexes to partial ones where appropriate
This reduces both the size the indexes take on the disk
and the overhead of maintaining it since it now only
needs to be updated for some entries.

For the email index restriction queries needed to be updated,
the last_active_at index is used only by one query which already
also restricted by "local" and for the remaining restrictions
no query adaptations are needed.
2025-11-27 00:00:00 +00:00
078c73ee2c Merge pull request 'Redirect /users/:nickname.rss to /users/:nickname/feed.rss instead of .atom' (#1022) from mkljczk/akkoma:akkoma-feed-redirect into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1022
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-11-26 20:56:12 +00:00
8fd8e7153e Redirect /users/:nickname.rss to /users/:nickname/feed.rss instead of .atom
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-11-26 16:55:50 +01:00
90e18796cf Merge pull request 'Hide private keys and password hashes from logs by default' (#1021) from Oneric/akkoma:log-sanitisation into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1021
2025-11-25 21:13:50 +00:00
Oneric
6ad9f87a93 deps: upgrade http_signatures
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
The only change is hiding key material from logs
2025-11-25 00:00:00 +00:00
Oneric
6d241a18da Hide the most sensitive user data from logs
Else admins may accidentally leak password (hashes)
or expose their users emails when sharing logs for debugging
2025-11-25 00:00:00 +00:00
Oneric
d81b8a9e14 http/middleware/httpsig: drop opt-in privkey scrubbing
This was replaced by the always-on exclusion from the inspect protocol
implemented in the previous commit which is far more robus.

This partially reverts commit 2b4b68eba7;
the more detailed response for generic HTTP errors is retained.
2025-11-25 00:00:00 +00:00
Oneric
5d8cdd6416 Always hide key material of user signing keys
This is far more robst than trying to manually scrub this in all affected paths
2025-11-25 00:00:00 +00:00
f5d78b374c Merge pull request 'Fix ActivityPub fetch sanitisation' (#1018) from Oneric/akkoma:fix-fetch-serve-sanitisation into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1018
2025-11-24 00:35:24 +00:00
Oneric
272799da62 test: add more representation tests for perpare_outgoing
Some checks failed
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline failed
In particular this covers the case
e88f36f72b was meant to fix and
the case from #1017
2025-11-24 00:00:00 +00:00
Oneric
85171750f1 fed/fetch: use same sanitisation logic as when delivering to inboxes
Duped code just means double the chance to mess up. This would have
prevented the leak of confidential info more minimally fixed in
6a8b8a14999f3ed82fdaedf6a53f9a391280df2f and  now furthermore
fixes the representation of Update activites which _need_ to have their
object inlined, as well as better interop for follow Accept and Reject
activities and all other special cases already handled in Transmogrifier.
It also means we get more thorough tests for free.

This also already adds JSON-LD context and does not add bogus Note-only
fields as happened before due to this views misuse of prepare_object
for activities. The doc of prepare_object clearly states it is only
intended for creatable objects, i.e. (for us) Notes and Questions.
2025-11-24 00:00:00 +00:00
Oneric
eaad13e422 fed/out: ensure we never serve Updates for objects we deem static 2025-11-24 00:00:00 +00:00
Oneric
6ef13aef47 Add voters key to internal object fields
It is inlined and used to keep track of who already voted for a poll.
This is expected to be confidential information and must no be exposed
2025-11-24 00:00:00 +00:00
Oneric
ef029d23db fed/fetch: don't serve unsanitised object data for some activities
When the object associated with the activity was preloaded
(which happens automatically with Activity.normalize used in the
 controller) Object.normalize’s "id_only" option did not actually work.
This option and it’s usage were introduced to fix display of Undo
activities in e88f36f72b.
For "Undo"s (and "Delete"s) there is no object preloaded
(since it is already gone from the database) thus this appeared
to work and for the particular case considered there in fact did.
Create activities use different rendering logic and thus remained
unaffected too.

However, for all other types of Activities (yes, including Update
which really _should_ include a properly sanitised, full object)
this new attempt at including "just the id", lead to it instead
including the full, unsanitised data of the referenced object.

This is obviously bad and can get worse due to access restrictions
on the activity being solely performed based on the addressing
of the activity itself, not of the (unintentionally) embedded
object.

Starting with the obvious, this leaks all "internal" fields
but as already mentioned in 8243fc0ef4
all current "internal" fields from Constants.object_internal_fields
are already publicised via MastoAPI etc anyway. Assuming matching
addressing of the referenced object and activity this isn't problematic
with regard to confidentiality.
Except, the internal "voters" field recording who voted for a poll
is currently just omitted from Constants.object_internal_fields
and indeed confidential information (fix in subsequent commit).
Fortunately this list is for the poll as a whole and there are no
inlined lists for individual choices. While this thus leaks _who_
voted for a poll, it at least doesn't directly expose _what_ each voter
chose if there are multiple voters.

As alluded to before, the access restriction not being aware
of the misplaced object data into account makes the issue worse.
If the activity addressing is not a subset of the referenced object’s
addressing, this will leak private objects to unauthorised users.
This begs the question whether such mismatched addressing can occur.
For remote activities the answer is ofc a resounding YES,
but we only serve local ActivityPub objects and for the latter
it currently(!) seems like a "no".
For all intended interactions, the user interacting must already have
access to the object of interest and our ActivityPub Builder
already uses a subset of the original posts addressing for
posts not publicly accessible. This addressing creation logic
was last touched six years ago predating the introduction of this
exposure blunder.
The rather big caveat her being, until it was fixed just yesterday in
dff532ac72 it was indeed possible to
interact with posts one is not allowed to actually see. Combined, this
allowed unauthorised access to private posts. (The API ID of such
private posts can be obtained e.g. from replies one _is_ allowed to see)

During the time when ActivityPub C2S was supported there might have been
more ways to create activities with mismatched addressing and sneak a
peek on private posts. (The AP id can be obtained in an analogous way)

Replaces and fixes e88f36f72b.
Since there never were any users of the
bugged "id_only" option it is removed.

This was reported by silverpill <silverpill@firemail.cc> as an
ActivityPub interop issue, since this blunder of course also
leads to invalid AP documents by adding an additional layer
in form of the "data" key and directly exposing the internal
Pleroma representation which is not always identical to valid AP.

Fixes: #1017
2025-11-24 00:00:00 +00:00
8fd2fb995f Merge pull request 'test: raise default assert_receive timeout' (#1016) from Oneric/akkoma:tmp into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1016
2025-11-23 15:34:02 +00:00
a5683966a8 Merge pull request 'Add banner.png back' (#1015) from mkljczk/akkoma:banner-png into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1015
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-11-23 12:18:21 +00:00
Henry Jameson
798beec97b config: add pleroma’s pleroma-fe to frontends available by default
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2025-11-23 00:00:00 +00:00
Oneric
e6ce7751a9 test: raise default assert_receive timeout
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
In our CI we sometimes fail assert_receive statmenets even in retry
making CI results unreliabl'ish. The default is 100ms, now it is 1s.

See e.g: https://ci.akkoma.dev/repos/1/pipeline/504/5
2025-11-23 00:00:00 +00:00
0b049c3621 Add banner.png back
Some checks failed
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline failed
It was mistakenly removed as part of the bundled frontend in
82fa766ed7 but actually it
is used as the default value for user profile banners.

Mastodon API typespecs define the relevant field as non-nullable in
585545d0d5/app/javascript/mastodon/api_types/accounts.ts (L30)
and clients do in fact rely on it being non-null, meaning we can't just
omit the value if a user didn't setup a bespoke banner.

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-11-23 00:00:00 +00:00
Oneric
7d480c67d1 frontend: print warning for third-party frontends
For future use. Mark all current frontends as first-party.
The key is named 'blind_trust' instead of 'first_party' to (hopefully)
increase the chances someone notices if some random, malicous frontend
adds the key into their install instructions
2025-11-23 00:00:00 +00:00
Oneric
8352c1f49d frontend: mark functions without external users as private 2025-11-23 00:00:00 +00:00
c7d75ca0d3 Merge pull request 'api: ensure only visible posts are interactable' (#1014) from Oneric/akkoma:can-you-see-it-too into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1014
2025-11-22 22:47:12 +00:00
e3dd94813c Merge pull request 'Fix mentioning complex usernames' (#1012) from Oneric/akkoma:fix-nonalphanum-mentions into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1012
2025-11-22 21:21:51 +00:00
bc68761b1d add doc, change IO to shell_info
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2025-11-22 17:42:42 +00:00
c144bc118d Merge branch 'develop' into rewrite-media-urls 2025-11-22 17:31:08 +00:00
b9e70c29ef Merge pull request 'Adjust rss/atom PR' (#1007) from akkoma-hashtag-feeds-restricted into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1007
2025-11-22 17:24:03 +00:00
Oneric
dff532ac72 api: ensure only visible posts are interactable
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
It doesn't make sense to like, react, reply, etc to something you cannot
see and is unexpected for the author of the interacted with post and
might make them believe the reacting user actually _can_ see the post.

Wrt to fav, reblog, reaction indexes the missing visibility check was
also leaking some (presumably/hopefully) low-severity data.

Add full-API test for all modes of interactions with private posts.
2025-11-22 00:00:00 +00:00
Oneric
810e3b1201 Fix mentioning complex usernames
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
The updated linkify is much more liberal about usernames in mentions.

Fixes: #1011
2025-11-19 00:00:00 +00:00
5e4475d61e Merge pull request 'Purge broken, unused and/or useless features' (#1008) from Oneric/akkoma:purge-broken into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1008
2025-11-18 22:08:04 +00:00
d96c6f438d Merge pull request 'Fix generic type and alt text for incoming federated attachments' (#1010) from Oneric/akkoma:fedin-attachment-fixes into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1010
2025-11-17 16:29:42 +00:00
Oneric
9d19dbab99 app: probe if any users of thread containment exist
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
If "thread containment" isn’t skipped the API will only return posts
whose entire ancestor chain is also visible to the current user.
For example if this contianment is active and the current user
follows A but not B and A replies to a followers-only post of B
the current user will not be able to see A’s post eventhough
per ActivityPub-semantics (an behaviour of other implementations)
the current user was addressed and has read permissions to A’s post.
(Though this semantics frequently surprise some users.)

There is a user-level option to control whether or not to perform
this kind of filtering and a server-wide config option under :instance.
If this containment is _disabled_ (i.e. skip_thread_containment: true)
server-wide, user-level options are ignored an filtering never takes
place.

This is cheked via the database function "thread_visibility" which
recursively calls itself on the ancestor of the currently inspected post
and for each post performs additional queries to check the follow
relationship between author and current user.
While this implementation introduced in
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/971
performs better than the previous elixir-side iteration due to
less elixir-database roundtrips the perf impact is still ridiculously
large and when fetching and entire conversation / context at once there
are many redundnat checks and queries.
Due to this an option to dis/enable the "containment" was added and
promptly defaulted to disabling "containment" in
593b8b1e6a six years ago.
This default remained unchanged since and the implementation wasn’t
overhauled for improved performance either. Essentially this means
the feature has already been entirely disabled oout-of-the box
without too much discoverability for the last six years. It is thus
not too unlikely that no actual users of it exist today.

The user-level setting also didn’t made its way into any known clients.
Surveying current versions of akkoma-fe, husky, pleroma-fe, pl-fe,
Mangane and just to be sure also admin-fe, fedibird-fe and masto-fe
none of them appears to expose a control for the user-level setting.
pl-fe’s pl-api acknowledges the existance of the setting in the API
definition but the parameter appears unused in any actual logic.
Similarly Mangane and pl-fe have a few matches for
"skip_thread_visibility" in test samples of user setting responses
but again no actual uses in active code.

While the idea behind the feature is sensible (though care must be taken
to not mislead users into believing _all_ software would apply the same
restrictions!), the current implementation is very much not sensible.
With the added code complexity and apparent lack of users it is unclear
whether keeping the feature around and attempting to overhaul the
implementation is even worth it.
Thus start pritning a big fat warning for any potentially existing users
prompting for feedback. If there are no responses two releases from now
on it will presumably be safe to just entirely drop it.
2025-11-17 00:00:00 +00:00
Oneric
ffeb70f787 Drop counter_cache stubbing out /api/v1/pleroma/admin/stats
It only served for a niche, admin nice-to-have informational stat
without too much value but was unreasonably costly to maintain
adding overhead with multiple queries added to all modifications
to the fairly busy activities table.

The database schema of the counter table and the activity_visibility function
used for counter updates also did not know about "local" visibility (nor the
recently removed "list" visibility) and misattributed them to the "direct" counter.

On my small instance this nearly halved the average
insert time for activiteis from 0.926 ms to 0.465 ms.
2025-11-17 00:00:00 +00:00
Oneric
865cfabf88 Drop conversation addressing
No known client ever used this. Currently among akkoma-fe, pleroma-fe,
Husky, Mangane and pl-fe only the latter acknowledes the existence of
the in_reply_to_conversation_id paramter in its API definitions,
but even pl-fe does never actually use the parameter anywhere.

Since the API parameter already was converted to DMs internally,
we do not need to make special considerations for already existing
old conversation-addressed posts. Since they share the context they
should also continue to show up in the intended thread anyway.

The pleroma.participants subkey mentioned in docs did already not exist
prior to this commit. Instead the accounts key doesn’t automatically update
and this affects conversations retrieved from the Mastodon API endpoint too
(which may be considered a pre-existing bug).

If desired clients can already avoid unintended participant additions
by using the explicit-addressing feature originally introduced in
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/1239.
With the above-mentioned feature/bug of conversation participants
not updating automatically it can replace almost everything
conversation addressing was able to do. The sole exception being
creating new non-reply posts in the same context.
Neither conversation addressing nor explicit addressing
achieves robust, federated group chats though.

Resolves: #812
2025-11-17 00:00:00 +00:00
Oneric
271110c1a5 Drop broken list addressing feature
This feature was both conceptually broken and through bitrotting
the implementation was also buggy with the handling of certain
list-post interactions just crashing.

Remote servers had no way to know who belongs to a list and thus
posts basically showed just up as weird DM threads with different
participants on each instance. And while on the local instance
addition and removal from a listed grated and revoked post
access retroactively, it never acted retroactively on remotes.

Notably our "activity_visibility" database function also didn’t
know about "list visibility" instead treating them as direct messages.

Furthermore no known client actualy allows creating such messages
and the lack of complaints about the accumulutaed bugs supports
the absence of any users.

Given this there seems no point in fixing the implementation.
To reduce complexity of visibility handling it will be dropped instead.
Note, a similar effect with less federation weirdness can already be achieved
client-side using the explicit-addressing feature originally introduced in
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/1239.

Ref: #812
2025-11-17 00:00:00 +00:00
Oneric
180a6ba962 api/views/status: prefer 'summary' for attachment alt texts
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
GtS started exclusively using it and it already worked with Mastodon.
See: https://codeberg.org/superseriousbusiness/gotosocial/issues/4524

Since we used to (implicitly) strip the summary field
this will not take effect retroactively.
2025-11-16 00:00:00 +00:00
Oneric
9bbebab1a2 api/views/status: fallback to generic type when deducing attachment type
While *oma, *key, GtS and even Mastodon federate a full media type for attachments,
posts from Bridgy only contain a generic type and the URLs also appear to never end
with a file exstension. This lead to our old type detection always classifying them
as "unknown" and it showing up like a generic document attachment in frontends.
We can (for vanilla Masto API clients) avoid this by falling back to the
federated generic type.
(Note: all other software mentioned at the start appears to always use "Document"
for the generic type of attachments regardless of the also federated actual full type)

For clients relying on the full mime type provided by an *oma extension,
like currently akkoma-fe, this in itself does not fix the display
but it is a necessary prerequisite to handling this more gracefully.
2025-11-16 00:00:00 +00:00
Oneric
33dbca5b3a api/views/status: fallback to binary MIME type instead of invalid 'image' type
A MIME type MUST always contain both the type and subtype part.
Also, we already add this binary type for new incoming attachments
without a pre-existing MIME type entry anyway.
2025-11-16 00:00:00 +00:00
c2e9af76a5 Merge branch 'develop' into akkoma-hashtag-feeds-restricted
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2025-11-13 11:35:16 +00:00
703db7eaef use verified paths
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-11-13 11:34:18 +00:00
0140643761 Merge pull request 'reverse_proxy: don't rely on header for body size' (#989) from Oneric/akkoma:revproxy-content-size into develop
All checks were successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #989
2025-11-13 10:44:25 +00:00
d4a86697d9 Merge pull request 'upgrade all deps' (#1002) from Oneric/akkoma:dep-update into develop
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
Reviewed-on: #1002
2025-11-09 14:38:07 +00:00
Oneric
6b0d4296d9 ci/publish: actually select arm64 releaser image
Some checks failed
ci/woodpecker/pr/test/1 Pipeline is pending
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/4 Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline was successful
ci/woodpecker/push/publish/2 Pipeline was successful
2025-11-09 00:00:00 +00:00
Oneric
6f971f10cf test/meilisearch: maybe fix flakyness
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
CI sometimes failed due to Mock already being started,
though I couldn’t reproduce it locally. Using non-global
mocks hopefully avoids this
2025-11-09 00:00:00 +00:00
Oneric
1bff36b990 ci/publish: fix syntax 2025-11-09 00:00:00 +00:00
Oneric
7a5c28a12a mix/deps: upgrade phoenix_ecto 2025-11-09 00:00:00 +00:00
Oneric
631f0e817b Revert "ci: allow docs to build on all runners"
Some checks failed
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/push/publish/4 Pipeline failed
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/publish/1 Pipeline failed
ci/woodpecker/push/publish/2 Pipeline failed
This reverts commit 9f05b19b6b.
We download a amd64 bild of the scaleway CLI.
2025-11-09 00:00:00 +00:00
949d641715 Merge pull request 'ci: try to parallelise test jobs' (#1003) from Oneric/akkoma:ci-parallel-testing into develop
Some checks failed
ci/woodpecker/push/publish/2 Pipeline is pending
ci/woodpecker/push/docs Pipeline failed
ci/woodpecker/push/publish/4 Pipeline failed
ci/woodpecker/push/publish/1 Pipeline failed
Reviewed-on: #1003
2025-11-09 13:09:31 +00:00
Oneric
9b99a7f902 cachex: reduce default user and object cache lifetime
This caches query results from our own database, but does not respect
transaction boundaries or syncs to transaction success/failure. Long
lifetimes increase the chance of such desync occuring and being written
back to the database, see: #956

Until 1d02a9a35d recently fixed it
this used a 3 second lifetime anyway, so this won’t result in
performance degradations but hopefully prevents a rise in desyncs.
2025-11-09 00:00:00 +00:00
Oneric
9f05b19b6b ci: allow docs to build on all runners
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
The docker image already offers variants for all our runner arches
2025-11-09 00:00:00 +00:00
Oneric
74cfb2e0db cosmetic/app: use appropriate timer function instead of scaling up lower res units 2025-11-09 00:00:00 +00:00
Oneric
dcd664ffbc ci: dedupe build+release job definitions
If releasr images provide amd64 and arm64 in the same tag
this can be slightly simplified further.
2025-11-09 00:00:00 +00:00
Oneric
534124cae2 mix/deps: upgrade cachex to 4.x 2025-11-09 00:00:00 +00:00
Oneric
c3195b2011 ci: move one test job to arm64 to allow parallel execution 2025-11-09 00:00:00 +00:00
Oneric
d1050dab76 Fix cachex TTL options
For some reason most caches were never updated to
the new setting format introduced in the 3.0 release.
2025-11-09 00:00:00 +00:00
Oneric
dc95f95738 mix/deps: upgrade timex
Unlocked by the gettext upgrade
2025-11-09 00:00:00 +00:00
Oneric
086d0a052b mix/deps: upgrade to new gettext API
This supposedly improves compile times
and also unlocks a minor timex upgrade.
1.0.0 was released without API changes after the 0.26 series.
2025-11-09 00:00:00 +00:00
Oneric
54fd8379ad web/gettext: split Gettext Backend and additional utility functions
This avoids the importing the heavy Gettext backend in some places
and makes it clearer what’s actually used in the project and what’s
used by the Gettext library.
With the to-be-pulled-in Gettext API change this split
will be even more helpful for code clarity.

As a bonus documentation is improved and
the unused locale_or_default function removed.
2025-11-09 00:00:00 +00:00
Oneric
b344c80ad2 cosmetic/app: dedupe always added task chhildren
As a side effect this gets rid of a compiler warning
about the prior task_children(:test) function clause
being dead code in non-test builds
2025-11-09 00:00:00 +00:00
Oneric
264202c7b3 mix/deps: upgrade dialyxir patch version 2025-11-09 00:00:00 +00:00
Oneric
4e321f4f47 mix/deps: upgrade elixir_argon2 to 4.x series
Only the default parameters changed from 3.x to 4.x.
It now matches the proposed defaults suggested in the RFC
for constrained environments.
The prior defaults have worse latency, but probably slightly better
security while spawning fewer threads, so let’s stick with them.

By setting the defaults in the config instance owners
can (continue to) tweak these for the specific setup.
2025-11-09 00:00:00 +00:00
Oneric
be8846bd89 mix/deps: upgrade telemetry_metrics to 1.x series
The 0.x series was promoted to 1.x without API changes
to indicate stability of the interface.
2025-11-09 00:00:00 +00:00
Oneric
b1397e1670 mix/deps: force minor updates not happening automatically
earmark is intentionally excluded due to a bug in current releases
starting with 1.4.47 affecting our tests. Admittedly it was also bugged
before but in a different way.

See: https://github.com/pragdave/earmark/issues/361#issuecomment-3494355774
2025-11-09 00:00:00 +00:00
Oneric
0afe1ab4b0 Resolve Phoenix 1.8 deprecations 2025-11-09 00:00:00 +00:00
Oneric
57dc812b70 mix/deps: upgrade phoenix family 2025-11-09 00:00:00 +00:00
Oneric
e91d7c3291 mix/deps: follow branches of git repos
To allow easy updates via  later on.
The only actual new changes pulled in in this commit are
build tweaks to pleroma’s captcha library
2025-11-09 00:00:00 +00:00
Oneric
bf5e2f205e mix/deps: allow ueberauth updates again
e2f749b5b0 pinned the version to avoid
a partiuclar broken release, but the issue has since been fixed.
See: https://github.com/ueberauth/ueberauth/issues/194
2025-11-09 00:00:00 +00:00
Oneric
53f866b583 mix/deps: upgrade everything to compatible newer versions
Or at least they were supposed to be compatible.
Due to an ecto optimisation change it is now illegal to use
replace_all_except if the union of conflict_targets and the fields
exempted from updating are equal to _all_ fields of this table.
See: https://github.com/elixir-ecto/ecto/issues/4633
2025-11-09 00:00:00 +00:00
467e75e3b1 Merge pull request 'api: prefer duration param for mute expiration' (#1004) from Oneric/akkoma:mute-expiry-duration into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #1004
2025-11-08 13:39:55 +00:00
8532f789ac api: prefer duration param for mute expiration
Some checks failed
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/pr/test/2 Pipeline was successful
Mastodon 3.3 added support for temproary mutes but uses "duration"
instead of our older "expires_in". Even Husky only sets "duration"
nowadays.

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>

Cherry-picked-from: 5d3d6a58f7
2025-11-08 00:00:00 +00:00
679c4e1403 Merge pull request 'api: return error when replying to already deleted post' (#1001) from Oneric/akkoma:replying-to-a-ghost into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #1001
2025-11-06 16:46:57 +00:00
Oneric
d635a39141 api: return error when replying to already deleted post
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
Of course the aprent post might still be deleted after the reply was
already created, but in this case the reply will still show up as a
reply and be federated as a reply with a reference to the parent post.
If the parent was already deleted before the reply gets created however
it used to be indistinguishable from a root post both in Masto API and
ActivityPub.

From a UX perspective, users likely will like to know if the post
they’re replying to no longer exists by the time they finished writing.
The natural language error will show up in akkoma-fe without clearing
the post form, meaning users can decide to discard the reply or copy it
to post as a new root post. It seems sensibly to for other clients to
behave like this too, but so far no more clients were actually tested.

Furthermore, this used to allow replying to all sorts of activities not
just posts which was rather non-sensical (and after all processsing
steps turned into a reply to the object referenced by the activity).
In particular this allowed replying to an user object by specifying the
db ID of a follow request activity (if the latter was somehow obtained).

Note: empty-string in_reply_to parameters are explicitly ignored since
45ebc8dd9a to workaround one buggy client;
see: https://git.pleroma.social/pleroma/pleroma/-/issues/355.
It’s not clear if this workaround is still necessary,
but it is preserved by this commit.

Resolves: #522
2025-11-06 15:58:40 +01:00
8da0828b4a Merge pull request 'reload emoji asynchronously and optimise emoji updates' (#998) from Oneric/akkoma:async-emoji-reload into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #998
2025-11-06 14:55:56 +00:00
ccde26725f Merge pull request 'api_spec/cast: iteratively retry to clean all offending parameters' (#995) from Oneric/akkoma:apispec-cast-multitolerance into develop
Some checks failed
ci/woodpecker/push/build-amd64 Pipeline failed
ci/woodpecker/push/docs unknown status
ci/woodpecker/push/build-arm64 Pipeline failed
Reviewed-on: #995
2025-11-06 14:55:38 +00:00
Oneric
7e6efb2356 api_spec/cast: iteratively retry to clean all offending parameters
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
While the function signature allows returning many errors at once,
OpenApiSpex.cast_and_validate currently only ever returns the first
invalid field it encounters. Thus we need to retry multiple times to
clean up all offenders.

Fixes: #992 (comment)
2025-11-05 00:00:00 +00:00
Oneric
bd6dda2cd0 docs: fix multi-paragraph list items
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Markdown requires an indentation of 4 for a following paragraph to
continue a list item. Previously, the continuing paragraphs were only
indented by 2 spaces, leading to the list being interrupted and
numbering restarted each time.
2025-11-02 00:00:00 +00:00
Oneric
e7d76bb194 emoji: reload asynchronously
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
No caller of `reload` actually uses the result in any way
so there’s no need to wait for a response and risk running
into a timeout (by default 5 seconds).

Discovered-by: sn0w <me@sn0w.re>
Based-on: 1fb54d5c2c
2025-10-30 00:00:00 +00:00
Oneric
318ee6ee17 emoji: avoid full reloads when possible
Reloading the entire emoji set from disk, reparsing all pack JSON files,
etc is unnecessarily costly for large emoji sets. We already know which
single or few changes we want to apply, so do just that instead.
2025-10-29 00:00:00 +00:00
Oneric
f86a88ca19 emoji: store in unordered set
No caller cares about the order
(and although, rare with concurrent reads at same time like a write
the table might return unordered results anyway).
Unordered sets have a constant read time,
ordered sets logarithmic times, but there’s no benfit for us
2025-10-29 00:00:00 +00:00
Oneric
d38ca268c4 cosmetic/emoji: fix misleading docs and var names 2025-10-29 00:00:00 +00:00
Oneric
0cb2807667 emoji/pack: fix newly created pack having nil name
At the next reload the name was already set to the directory name,
but if using the created pack directly issues arose.
2025-10-29 00:00:00 +00:00
862fba5ac5 Merge pull request 'Do not try to redirect to post display URLs for non-Create activities' (#997) from Oneric/akkoma:fix-non-create-html-redirect into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #997
2025-10-26 12:45:22 +00:00
Oneric
47ac4ee817 Do not try to redirect to post display URLs for non-Create activities
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
Display will fail for all but Create and Announce anyway since
0c9bb0594a. We exclude Announce
activities from redirects here since they are not identical
with the announced post and akkoma-fe stripping the repeat header
on he /notice/ page might lead to confusion about which is which.

In particular those redirects exiting breaks the assumptions from
the above commit’s commit message and made it possible to obtain
database IDs for activities other than one’s own likes allowing
slightly more mischief with the rendering bug it fixed.

Note: while 0c9bb0594a speculated about
public likes also leaking IDs to other users, the public like endpoint
is actually paginated by post id/date not like id/date like the private
endpoint. Thus it does not allow getting database IDs of others’ likes.
2025-10-26 00:00:00 +00:00
9d12c7c00c Merge pull request 'Preserve mastodon-style quote-fallback marker' (#977) from mastodon-quotes into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #977
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-10-24 21:51:49 +00:00
Oneric
b7107a9e33 docs: adjust for include_types deprecation
Some checks failed
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
And replace an overlooked usage in tests.
Fixes omissions in b3a0833d30
2025-10-24 00:00:00 +00:00
8857c98eaf Merge pull request 'Use types for filtering notifications' (#993) from mkljczk/akkoma:akkoma-notification-types into develop
Some checks failed
ci/woodpecker/push/build-amd64 Pipeline is pending
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/docs unknown status
Reviewed-on: #993
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-10-24 19:05:27 +00:00
c3dd582659 Allow mastodon-style quotes
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
2025-10-24 00:00:00 +00:00
b3a0833d30 Use types for filtering notifications
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-10-15 09:06:43 +02:00
300302d432 Merge pull request 'Treat known quotes and replies as such even if parent unavailable' (#991) from Oneric/akkoma:replies-unknown into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #991
2025-10-13 12:24:27 +00:00
Oneric
0907521971 Treat known quotes and replies as such even if parent unavailable
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
Happens commonly for e.g. replies to follower-only posts
if no one one your instance follows the replied-to account
or replies/quotes of deleted posts.
Before this change Masto API response would treat those
replies as root posts, making it hard to automatically or
mentally filter them out.

With this change replies already show up sensibly as
recognisable  replies in akkoma-fe.
Quotes of unavailable posts however still show up as if they
weren’t quotes at all, but this can only be improved client-side.

Fixes: #715
2025-10-13 10:26:57 +00:00
Weblate
4744ae4328 Translated using Weblate (Chinese (Simplified Han script))
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Currently translated at 99.0% (106 of 107 strings)

Co-authored-by: Poesty Li <poesty7450@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/akkoma-backend-errors/zh_Hans/
Translation: Pleroma fe/Akkoma Backend (Errors)
2025-10-13 10:01:37 +00:00
Weblate
2b076e59c1 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (1004 of 1004 strings)

Co-authored-by: Poesty Li <poesty7450@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/akkoma-backend-config-descriptions/zh_Hans/
Translation: Pleroma fe/Akkoma Backend (Config Descriptions)
2025-10-13 10:01:37 +00:00
40ef08d46c bump version
Some checks failed
ci/woodpecker/push/build-amd64 Pipeline is pending
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/tag/build-arm64 Pipeline was successful
ci/woodpecker/tag/build-amd64 Pipeline was successful
ci/woodpecker/push/docs unknown status
2025-10-13 11:01:10 +01:00
Oneric
01a728464f changelog: add missing entries
Some checks failed
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
2025-10-12 00:00:00 +00:00
feef5f7f6f Merge pull request 'Default to HTTP1 again and no pool options for individual requests' (#988) from Oneric/akkoma:no-http2-4u into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #988
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-10-10 20:44:54 +00:00
62856efb5c Merge pull request 'Delete more unused or useless bits' (#987) from Oneric/akkoma:delete-unused into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #987
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-10-10 16:18:13 +00:00
Oneric
6878e4de60 reverse_proxy: don't trust header about body size
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
Except of course for HEAD requests
2025-10-10 00:00:00 +00:00
Oneric
ed5d609ba4 http: do not add adapter pool options to individual requests
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
They do nothing. As documented[1] only three specific
options regarding timeouts are parsed for individual request
and none of them is set by AdapterHelper, only pool-specific options.

In particular this means we always relied on Mint’s default CA cert
verification based on queries to the CAStore package (which we include).

[1]: https://hexdocs.pm/finch/Finch.html#request/3-options
2025-10-10 00:00:00 +00:00
Oneric
c94a3b10ee Delete barely used logger mock
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
It required a bunch of and even call-specific boilerplate
and is not necessary since we can just capture the real logger
as laready done in other tests.
2025-10-10 00:00:00 +00:00
Oneric
203f5a89a2 config: revert to HTTP1-only for outgoing requests
Due to bugs in Finch discussed in
#978
and #980
allowing both HTTP versions ends up breaking
some requests if they have a body.

Fixes: #978
2025-10-10 00:00:00 +00:00
Oneric
f4e188af0a Delete useless, custom JobQueueMonitor
While its data was included in healthcheck responses,
it was not used to determine the healthy status
and for informational purposes Prometheus metrics,
ObanWeb dashboard or the Phoenix live dashboard are all better fits.
In particular, the data shown in healtcheck responses had no temporal
information, but there’s quite a difference between X failures scattered
across many days of uptime and X failures within a couple minutes.
2025-10-10 00:00:00 +00:00
6dc546eda7 Merge pull request 'api: order follow requests by date of request' (#984) from Oneric/akkoma:followreq-order into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #984
2025-10-09 23:55:09 +00:00
6fbc8330db Merge pull request 'Fix some typos and remove unused code' (#985) from mkljczk/akkoma:akkoma-typos into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #985
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-10-09 21:53:03 +00:00
9d8583314b Repesct :restrict_unauthenticated for hashtag rss/atom feeds
Some checks failed
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline failed
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-10-09 15:29:26 +02:00
794b2cde45 Fix some typos and remove unused code
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-10-09 15:26:35 +02:00
Oneric
0c9bb0594a Restrict Masto statuses API to Create and Announce activities
Some checks failed
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/pr/test/2 Pipeline was successful
If the id of another activity type was used
it would show the post referenced by the activity
but wrongly attributing it to the activity actor
instead of the actual author.

E.g. ids of like activities can be obtained from
pagiantion info of the favourites endpoint.
For all other activity types the id would need to be guessed
which is considered practically infeasible for Flake UUIDs.

This should’ve been mostly harmless in practice, since:
  - since the activity has the same context as the original post,
    both the original and misattributed duplicate will show up in the
    same thread
  - only posts liked by a user can be misattributed to them,
    presumably making it hard/impossible to associate someone with
    content they disagree with
  - by default only the liking user themself can view their like history
    and therefore obtain IDs for their like activities.
    Notably though, there is a user seting to allow anyone to browse
    ones like history and therefore obtain like IDs. However, since
    akkoma-fe has no support for actually displaying those, there might
    be no actual users of this features.
2025-10-09 00:00:00 +00:00
Oneric
06a0cf4278 api: order follow requests by date of request
Some checks failed
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline failed
This is more intuitive for users.
On the flip side, this makes the API more confusing
since now min_id/max_id no longer correspond to ids returned in the
response and only link headers can be used to traverse all response
pages. However, Mastodon already does this according to its
documentation, so clients should already handle this well.

The only other usage of get_follow_requests_query is only interested
in the total count of requests (from active users), thus changing its
select part is safe.
Also gets rid of (outside tests unused) User.get_follow_requests.

Fixes: #380
2025-10-09 00:00:00 +00:00
Oneric
521dfa4670 Use keyed lists for pagination with foreign id
The old approach required adding a special virtual field
to any table potentially needing such foreign-id pagination and
also still required manually sorting according to pagiantion settings
since the pagination helper does not know whether
this virtual field was set or not.

Using lists with each entry containing the pagination id and the actual
entry insterad allows any table to use this mechanism unchanged and
does not require manually sorting.

Since it was unused, this also drops the pagination mode paramter from
fetch_favourited_with_fav_id.

Furthermore, as a side effect of this change a bug in the favourite
benchmark is fixed. It used to incorrectly attempt to use IDs of
the liked objects for pagination instead of the like IDs as advertised
in Link headers.
2025-10-09 00:00:00 +00:00
24d828d9a6 Merge pull request 'telemetry: expose count of currently pending/scheduled jobs per queue' (#982) from Oneric/akkoma:telemetry-job-queue-pending into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #982
2025-10-04 22:44:50 +00:00
2190f3bede Merge pull request 'Do not federate undo->block activities' (#958) from undo-block-federation into develop
Some checks failed
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline failed
ci/woodpecker/push/docs unknown status
Reviewed-on: #958
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-10-04 22:43:50 +00:00
8c33eed93e Merge pull request 'Renew HTTP signatures when following redirects' (#973) from Oneric/akkoma:httpsig_redirect_resign into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #973
2025-10-04 16:25:49 +00:00
1c74fcb35c Merge pull request 'optimize follow_request_count for own account view' (#981) from mkljczk/akkoma:optimize-follow-request-count into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #981
2025-10-04 10:48:12 +00:00
Oneric
43d4716b5a telemetry: expose count of currently pending jobs per queue
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
Split into scheduled (intentionally delayed until a later trigger date)
and available (eligible for immediate processing but did not yet start).
This will help in diagnosing overloaded instances or too-low queue
limits as well as expose configuration mishaps like
#924.
(The latter by violently crashing the telemetry poller process while
attempting put_in for a non-configured queue creating well visible logs)
2025-10-03 00:00:00 +00:00
545a83a5f1 optimize follow_request_count for own account view
Some checks failed
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/pr/test/2 Pipeline was successful
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-09-28 23:59:24 +02:00
Oneric
b1e5dda26a telemetry: reduce polling frequency for periodic measurements
Instancce stats are cached only renewed every 5 minutes anyway
and IO stats are cumulative over the entire runtime so no info
is lost.
Polling those every 10s is wasteful and the next commit will add a
periodic measurement which is (comparetively) more costly to compute.
2025-09-21 00:00:00 +00:00
Oneric
155c939070 mix/database: exempt hashtag cleanup from timeouts
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
As other prune queries already do. While this one is usually rather
quick, it can still run into the default limit.

Reported by ivy on IRC
2025-09-20 11:39:29 +00:00
36ac91b25d Merge pull request 'Update nginx config for HTTP/3 support' (#976) from norm/akkoma:nginx-http3 into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #976
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-09-19 19:10:29 +00:00
da340fd46c Update nginx config for HTTP/3 support
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
Overall fairly minor changes, but most importantly the Host header passed to the backend is set to `$host` instead of `$http_host` as HTTP/3 no longer uses the Host header, leaving it unset. `$host` will fallback to the `server_name` value in that situation while `$http_host` doesn't.

Ref: https://community.nginx.org/t/proxy-params-by-default-blocks-reverse-proxy-for-http-3/6792
2025-09-19 09:54:57 -04:00
Oneric
b9f79f333f changelog: document changes wrt to http option config keys
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
2025-09-07 00:00:00 +00:00
Oneric
cb19d3285a Drop superfluous RequestBuilder
It’s only used in one place and there not even all of
its functionality is needed. It’s not only simpler and shorter,
but easier to understand if Tesla’s keyword list is just inlined.

The only useful bit which is now migrated to Pleroma.HTTP is
addition of the user-agent header (except, sometimes, in tests)
2025-09-07 00:00:00 +00:00
Oneric
c607387b4a http: do not mix and duplicate Tesla opts into adapter opts 2025-09-07 00:00:00 +00:00
Oneric
271d7d14d4 media_proxy: use :head atom instead of binary
It automatically uses correct capitalisation and is the preferred form.
2025-09-07 00:00:00 +00:00
Oneric
7f9e898781 reverse_proxy: delete unused dynamic client
Since 364b6969eb the reverse proxy
is fixed to use the default HTTP module and all these modules
have been unused since
2025-09-07 00:00:00 +00:00
Oneric
882d8e0320 http/tzdata: ignore unsupported opts
Tzdata assumes Hackney opt names and only uses it to
enable following redirects which we already do anyway.
2025-09-07 00:00:00 +00:00
Oneric
a95b0a5d61 http/webpush: ignore opts due to incompatible format
The web_push_encryption lib assumes HTTPoison semantics
which is why we also need to convert the header format.
Inspecting the libraries source shows that Tesla won’t
understand the options anyway and its only used to enable TLS/SSL.
2025-09-07 00:00:00 +00:00
Oneric
5d59cb7ac3 rel_me: drop unsupported http option
Enforcing a hard response body limit is currently not possible with
Finch. Presumably a leftover from when multiple backends were supported.
2025-09-07 00:00:00 +00:00
Oneric
d34f6ebcdd rich_media/helpers: drop unsupported http opts
When this was ported from Pleroma in
5da9cbd8a5
we did not take into acount that Akkoma’s and Pleroma’s
HTTP backend take different options.
There’s no need for the :pool option
and enforcing a body limit on download
is currently not possible with Finch
2025-09-07 00:00:00 +00:00
Oneric
6d54bd95bc changelog: add entry for re-sign on redirect 2025-09-07 00:00:00 +00:00
Oneric
2b4b68eba7 Ensure private keys are not logged
Ideally we’d use a single common HTTP request error format handling
for _all_ HTTP requests (including non-ActivityPub requests, e.g. NodeInfo).
But for the purpose of this commit this would create too much noise
and it is significant effort to go through all error pattern matches etc
too ensure it is still all correct or update as needed.
2025-09-07 00:00:00 +00:00
Oneric
ff46e448c8 refactor: move creation of date strings for signatures into plug
The Signature module now handles interaction with the HTTPSignature library
and the plug everything related to HTTP itself. It now also no longer needs to be public.
2025-09-06 00:00:00 +00:00
Oneric
4c4982d611 Re-sign requests when following redirects
To achieve this signatures are now generated by a custom
Tesla Middleware placed after the FollowRedirects Middleware.
Any requests which should be signed needs
to pass the signing key via opts.

This also unifies the associated header logic between fetching and
publishing, notably resolving a divergence wrt the "host" header.
Relevant spec demands the host header shall include a port
identification if not using the protocols standard port.

Fixes: #731
2025-09-06 00:00:00 +00:00
23dfbd491e Merge pull request 'mix: resync inlined data' (#964) from Oneric/akkoma:resync_inlined_copies into develop
All checks were successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #964
2025-08-30 19:39:14 +00:00
Oneric
f07d6f3602 changelog: add inlined cache and remote emoji changes
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
2025-08-30 00:00:00 +00:00
Oneric
86988e71f0 mix/database/resync_inlined_caches: also resync reactions
Relies on the fixups from preceding commits being applied.
2025-08-30 00:00:00 +00:00
Oneric
7a77e7fbd1 db/migration: tighten prefiltering in emoji fixup 20250806
While the previous version was already plenty fast for smaller instances
there seems to be a more-than-linear slowdown for large instances.
These prefilters should (hopefully) not exclude anything in need of
fixing, but seem to already cut down significantly on the overall
processing time.
2025-08-30 00:00:00 +00:00
Oneric
89801abad5 federation/in: drop remote part from received emoji reactions
The remote part is included in federated emoji names by e.g.
Iceshrimp.NET ever since remote emoji support was added in
4d21aa1670
and as of writing it still continues to do so.
It adds no value for us though; we add the remote part automatically
based on the URL and it makes it more difficult to correctly coalesce
the original reaction (from a user for whom the moji was local)
and the subsequent reactions with the identical emoji from users of
other instances. Additionally the remote part can cause issues when
later used with our REST API.

For non-reactions this is unproblematic and thus
there’s no need to change anything there.

Use a migration to fix up existing activities.
This will cause some (further) desync from the inlined reactions
array, but will be fixable with the resync mix task and avoids
issues when running the resync without first fixing existing activities.
2025-08-30 00:00:00 +00:00
Oneric
4765b79b49 Remove deprecated :warnings_as_errors from startup
This was already removed from mix.exs in
ea5a2a9f21
but as it turns out it was also re-set
during runtime.
Since we never set it outside of CI in
the first place there’s no need to
force-disable it here.
2025-08-30 00:00:00 +00:00
Oneric
16d0250c24 mix/database: by default fix replies count after object prune
Even if --keep-threads is used, replies of
pinned posts might still be pruned as documented
for this option.
Thus keep-threads is no reason to skip reply counter recalculation.
2025-08-30 00:00:00 +00:00
Oneric
f754feb67d federation: include required actor fields in minimal user fallback
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ActivityPub spec demands each actor has at least an inbox and outbox.
Furthermore, the current representation wouldn’t even be accepted by
ourselves, since our processing requires objects to be flagged with a
sensible type else we don't know what to do with it.
Including the nickname is just a peemptive measure.

There were no reports of this causing problems in real-world deployments
and at least for federation with other Akkoma instances we should have
never run into this, since we _always_ expose the full representation of
the instance actor and atm also always use the latter for fetching
remote content (which prevents us from fetching followers-only content).
Nonetheless, serving something which violates spec and we wouldn’t even
accept ourselves seems obviously bad, so fix it and add tests to prevent
this from reoccuring.

Fixes bug introduced in 8f322456a0
2025-08-27 00:00:00 +00:00
Oneric
fcf4867ddf mix/database: add task to resync inlined array duplicates
Presumably those inlined copies were added to avoid the need for queries
each time the info is needed. However, they tend to desync from the actual
activities for not yet fully understood reasons; see:
#956

As a workaround until the root cause is identified and fixed and/or
we no longer rely on the inliend copies add a mix task to regenerate
the inlined "cache" from the authorative activity data.

Does not yet deal with inlined emoji reactions
since its format is a pain to deal with.
2025-08-27 00:00:00 +00:00
Oneric
97e1eccf89 mix/database: add task to empty inlined replies lists
Those arrays are only used on first post receipt in side effect processing
and but an useless waste of space and misleading afterwards.
2025-08-27 00:00:00 +00:00
Oneric
ce73239e08 Fix private remote replies changing reply counter
In the ActivityPub module counter changes are already limited to
only publicly-visible replies. Apply the same limitiation here.
2025-08-27 00:00:00 +00:00
Oneric
e8b8941e40 docs: add missing image
Some checks failed
ci/woodpecker/pr/test/2 Pipeline is pending
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
Fixes omission in 1924ec08c0
2025-08-24 00:00:00 +00:00
f5b2569b4f Merge pull request 'Adjust telemtry buckets for phoeix router and db metrics' (#970) from Oneric/akkoma:telemetry-router-buckets into develop
Some checks are pending
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #970
2025-08-24 11:44:33 +00:00
Oneric
fda5b6551a changelog: add missing entries
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
2025-08-24 00:00:00 +00:00
Oneric
48c8ec10d8 ci: drop unused conditions 2025-08-24 00:00:00 +00:00
Oneric
157b7e1d97 Fix CI runs on push/merge to develop and stable
This emulates the previous effective behaviour of only
running tests on pull requests and skipping straight
to building artefacts and docs after merge.
Pull requests which do not pass tests shouldn’t be merged in the first place.
2025-08-24 00:00:00 +00:00
Oneric
7f9823258a metrics: adjust router and db buckets
Most HTTPS requests actually fall into the single-digit millisecond
range or below on average. Even the more costly endpoints almost always
average around the lower third of the millisecond magnitude.
Only endpoints doing synchronous remote HTTP fetches (e.g. for signing
keys) occasionally spike into the order of seconds.
As is, the bucket resolution is completely unfit to reason about
anything and even just averages are better indications.

Most database queries take less than a millisecond and even in total
almost all take less than 50ms for me. Decode time is but a tiny
fraction of that and queue time usually only takes a small part of total
time too (but may spike on high load).

Shift the buckets down to be able to
give insight into all relevant cases.
In particular this allows to determine whether high averages
are the result of generally high processing times or just a few
outliers lifting the whole average up (e.g. slow network fetches).

Exact numbers are biased towards my setup for lack of other comparison
data, but at least the order of magnitude should be ok everywhere.
2025-08-24 00:00:00 +00:00
b8207d929d fix CI conditions
Some checks failed
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/push/test/1 Pipeline failed
ci/woodpecker/push/test/2 Pipeline failed
ci/woodpecker/push/build-amd64 unknown status
ci/woodpecker/push/docs unknown status
2025-08-23 22:27:45 +01:00
5a7c773ca1 Update .woodpecker/test.yml 2025-08-23 21:23:24 +00:00
20a77b404e Update .woodpecker/test.yml 2025-08-23 21:23:12 +00:00
7c1a08913f Merge pull request 'Provide reference Grafana dashboard and improve docs related to monitoring+perf' (#966) from Oneric/akkoma:grafana_ref into develop
Reviewed-on: #966
2025-08-23 16:27:18 +00:00
be2e014c60 Merge pull request 'Allow HTTP2 for outgoing connections and untangle the adapter opt mess' (#969) from Oneric/akkoma:untangle_adapter_opts into develop
Reviewed-on: #969
2025-08-23 15:54:43 +00:00
ca15f8f6c0 Merge pull request 'Don’t retry delivery to explicitly deleted inboxes' (#968) from Oneric/akkoma:delivery_to_gone into develop
Reviewed-on: #968
2025-08-23 15:52:28 +00:00
Oneric
c62a476289 docs/cli/database/prune_objects: add note about --limit and --prune-pinned interaction
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
2025-08-23 00:00:00 +00:00
Oneric
acc05ca02f http: avoid failures connecting to HTTP2 servers supporting server push
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
2025-08-23 00:00:00 +00:00
Oneric
4d008c6bfd docs: add general optimisation and performance advice
And recommend a default config for remote pruning.
Also rewrite misleading note about vacuuming.
2025-08-23 00:00:00 +00:00
Oneric
0dc4b843e7 http: print stacktrace when exceptions occur during fetch
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
This log shows up very rarely in my history,
but if it does happen it is best to get the full context.
2025-08-23 00:00:00 +00:00
Oneric
7a49dd6c59 installation/nginx: allow incoming http2 connections
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
2025-08-20 00:00:00 +00:00
Oneric
c94d01a0ab Refactor AdapterHelper and default Finch opts
The old code was unnecessarily complicated, full of unused and/or
duplicated functions making it hard to understand what will actually
happen and for whom at runtime.
Since we only support a single HTTP backend this can be greatly simplified.

Now everything gets default options from a single place and only
functions to modify parts actually difffering across calls are exposed.
2025-08-20 00:00:00 +00:00
Oneric
cd7bc96bc6 web/endpoint: drop unused function load_from_system_env
It’s not called anywhere in out code and
also doesn’t appear to be part of Phoenix.Endpoint’s interface
2025-08-20 00:00:00 +00:00
Oneric
c3c5277e05 Allow both HTTP1 and HTTP2 for outgoing connections
No HTTP3/QUIC support yet.
Note, allowing both here means we don't actually profit from HTTP2 multiplexing
due to Finch(? or maybe a dependency of Finch?) limitations. But it means we can
now interact with HTTP2-only instances (if such exist) and still may get minor
gains from header compression etc

Adventurous admins can change the config to allow only HTTP2,
thus profiting from multiplexing (but breaking federation with
HTTP1-only instances which are in fact observed to exist).
2025-08-20 00:00:00 +00:00
Oneric
9bcee957c5 federation/out: don't retry deliveries to known-deleted actors
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
2025-08-19 00:00:00 +00:00
Oneric
da4d642945 telemetry: log which states get mapped to 'unknown' 2025-08-19 00:00:00 +00:00
2b388523c7 docs/client: add Pachli
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
It explicitly intends to keep v1 filters around.
2025-08-18 00:00:00 +00:00
54b561ee2c docs/clients: Tusky is dropping v1-filter support
The next Tusky release is going to remove support for the v1 filters API,
see: https://codeberg.org/tusky/Tusky/pulls/5215.

Since Akkoma doesn't support the v2 API this
could cause significant issues for Akkoma users.
2025-08-18 00:00:00 +00:00
Oneric
1924ec08c0 Provide reference Grafana dashboard
And improve monitoring documentation in particular
more detailed instructions for setting up Prometheus
metric scraping and the reference Grafana dashboard.
2025-08-17 00:00:00 +00:00
Oneric
06dac6e7b5 docs: drop exact version pins on python dependencies
These old package versions cause issues in modern Python environments.
2025-08-17 00:00:00 +00:00
290171d006 don't care about the type as long as it has an attachment
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-08-04 18:29:46 +01:00
4cfbef3b09 fix from_url
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-08-04 18:20:33 +01:00
27eaddaa05 inspect the whole data on dry run
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-08-04 18:07:07 +01:00
31e25efbfb include previously missed formats
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-08-04 18:02:58 +01:00
Weblate
c2f8d36206 Translated using Weblate (Turkish)
Currently translated at 0.1% (2 of 1004 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (0 of 0 strings)

Added translation using Weblate (Turkish)

Co-authored-by: Anonymous <noreply@weblate.org>
Co-authored-by: Hasan Yıldız <hasanyildiz0@yaani.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/akkoma-backend-config-descriptions/tr/
Translation: Pleroma fe/Akkoma Backend (Config Descriptions)
2025-08-04 00:25:54 +00:00
c588c3f674 remove inspect
Some checks failed
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/pr/test/1 Pipeline failed
2025-08-03 23:18:40 +01:00
b5e17f131a correct pipeline 2025-08-03 23:17:55 +01:00
2c34bb32ca rewrite media domains mix task 2025-08-03 23:06:41 +01:00
eca7ed572b Do not federate undo->block activities
All checks were successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
the :do_not_federate checks were omitted from the undo pipeline,
which could lead to them federating.

this commit enforces :outgoing_blocks on undos as well - and
any existing value of :do_not_federate is preserved, if one exists

Fixes #957
2025-08-02 09:47:32 +01:00
5beb286bff Merge pull request 'config/description: hint at Swoosh defaulting to SSL' (#955) from Oneric/akkoma:confdesc-swoosh-ssl into develop
Reviewed-on: #955
2025-07-29 19:18:39 +00:00
Oneric
af84dcb28f config/description: hint at Swoosh defaulting to SSL
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Fixes: #953
2025-07-29 19:02:17 +00:00
23a4d5a15f Merge pull request 'federation/in: fix inlined featured collections' (#949) from Oneric/akkoma:fix-inline-featured into develop
Reviewed-on: #949
2025-07-24 18:55:59 +00:00
Oneric
deb8689eba federation/in: fix inlined featured collections
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
Resolves interop issue with a (reverted but possibly returning) bridgy change
as was reported in the comments of
#831.
This won't change anything for the problem originally reported there.

Notably we now always fetch the full collection (up to the configured
item count limit) instead of only using the first page if its link was
inlined.
2025-07-21 17:45:20 +00:00
e2987402b3 Merge pull request 'Optimise CI runs' (#938) from Oneric/akkoma:ci-tweaks into develop
Reviewed-on: #938
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-07-11 22:23:29 +00:00
Oneric
ea5a2a9f21 mix: replace deprecated warnings_as_errors option
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2025-06-22 17:36:56 +02:00
Oneric
5a5d4cb86f ci: drop variables from files not using them at all 2025-06-22 17:36:55 +02:00
Oneric
c7b46e3799 ci: make pipelines conditional
If only steps are conditional the whole CI workflow
will be held up waiting until a slot is available to start them
just to then not do anything at all.

This allows us to drop "when" condition from individual steps
whenever it is now redundant with the top-level condition.
2025-06-22 17:36:55 +02:00
Oneric
25da959772 ci: merge lint and test pipeline
The lint pipeline spent ~7 minutes downloading and compiling
and only a few seconds actually checking the style.
The former is fully redundandt with what’s done during test anyway.
2025-06-22 17:36:55 +02:00
Oneric
d63292561b ci/test: remove superfluous matrix combinations
When include is used only the specified combinations
are executed and the full list above is ignored
2025-06-22 17:36:55 +02:00
16d7d612ff Merge pull request 'misc: missing changelog entries + drop accepts_chat_messages + dedupe htmlMfm test payloads' (#943) from Oneric/akkoma:misc_chat+changelog+dedupehtmlMfmTest into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #943
2025-06-22 15:10:04 +00:00
Oneric
1c2407c129 test/federator: deduplicate html_mfm test payloads
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
2025-06-22 17:09:07 +02:00
Oneric
81285d06be db: drop accepts_chat_messages from users
Another leftover of chats wasting space.
All uses were purged in 0f132b802d.
2025-06-22 17:09:02 +02:00
Oneric
94207c425d changelog: add missing entries
Everything relevant since 6e0b6f2915
which wasn’t listed yet
2025-06-22 16:32:36 +02:00
f2c2ec5e27 Merge pull request 'Add htmlMfm key when relevant' (#878) from ilja/akkoma:add_fep-c16b_discovery_mechanism_to_not_always_reparse_mfm into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #878
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-06-22 14:31:32 +00:00
ilja space
d200c7e11c Add extra tests + fix storing htmlMfm in database when federated
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
- This adds extra tests to be sure that scrubbing still happens.
- When doing this I notices that the htmlMfm key wasn't stored in the database when comming through the federator. This has been now been fixed too.
- We also test that values true, false or no attribute all work for incomming messages.
2025-06-21 11:32:22 +02:00
7f6ebcb12e Merge pull request 'federation/in: improve reply on requests from blocked domains' (#940) from Oneric/akkoma:httpsig-mrf-reply into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #940
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-06-10 19:17:19 +00:00
Oneric
0a9e7d4712 federation/in: improve reply on requests from blocked domains
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Previously all such requests led to '401 Unauthorized'
whih might have triggered retries.
Now, to not leak any MRF info, we just indicate an
accept for POST requests without actually processing the object
and indiscriminately return "not found" for GET requests.

Notably this change also now causes all signed fetch requests from
blocked domains to be rejected even if authorized_fetch isn’t enabled.

Fixes: #929
2025-06-10 20:43:33 +02:00
42022d5f48 Merge pull request 'Allow fine-grained announce visibilities' (#941) from Oneric/akkoma:announce-visibility into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #941
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-06-10 18:33:59 +00:00
Oneric
954f6f7de0 Allow fine-grained announce visibilities
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Mastodon supports all standard visibilities except direct here,
but until now we artificially limited this to either fully public
or followers-only.
2025-06-09 20:58:42 +02:00
Oneric
f452430acc Remove non-local recipients from local post addressing
They won’t receive local-only posts anyway
so it makes no sense to list them as recipients.
2025-06-09 20:32:34 +02:00
Oneric
2cdc4acce9 common_api/utils: break up get_to_and_cc
To make it usable in scenarios without a draft.
The next commit adds a user for the new function.

This does technically change behaviour a bit, since
"private" relies to "direct" messages no longer implicitly
address the parent post’s actor, but this seems like a contrived
scenario and was likely never intended to actually occur anyway
as cocorroborated by the absence of tests for it.
2025-06-09 20:31:35 +02:00
242e798054 Merge pull request 'Fix Finch timeout config options' (#939) from Oneric/akkoma:finch-timeouts into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #939
2025-06-08 11:11:12 +00:00
Oneric
80a65be38f config: raise Finch pool timeout
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
A pool timeout shorter than the receive timeout
makes race conditions leading to active connections
being killed more likely and laso just doesn’t make
much sense in general.

See: https://github.com/sneako/finch/pull/292
2025-06-08 12:37:13 +02:00
Oneric
07abbd8de5 config: drop unused duplicate finch pool timeout config
This was added in a924e117fd
with its name mirroring Finch’s own config option, but with
pool_timeout such a setting already existed since
2fe1484ed3 and the new one
was never actually used.
2025-06-08 12:21:33 +02:00
3bc583d14f Merge pull request 'Don’t crash due to broken JSON on emoji reload' (#933) from Oneric/akkoma:emoji-reload-no-crash into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #933
2025-06-07 20:01:48 +00:00
401883b230 Merge pull request 'provide full replies collection in ActivityPub objects' (#904) from Oneric/akkoma:ap_replies_collection into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #904
2025-06-07 19:33:40 +00:00
Oneric
489b17a60d test/emoji: clean up after failure
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Since the cleanup is only registered after everything succeeded,
no cleanup was done on failure permanently breaking the test
2025-06-07 21:22:37 +02:00
Oneric
98762992fb emoji: avoid crashing whole server on broken JSON
It may still crash due to a race condition between checking for file
existence and opening/streaming, but File.stream! has no safe version
we can use to avoid this completely.
Just not deleting such files during a reload is easy enough.
2025-06-07 21:22:37 +02:00
Oneric
b41a13df56 federation/out: add full replies collection to objects
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Until now only a limited number of self-replies were inlined as an
anonymous, unordered ActivityPub collection. Notably the advertised
replies might be private posts.

However, providing all (non-private) replies allows for better thread
consistency across instances if the remote server cooperates.
The collection existing as a stndalone object has two advantages
for this. For one, if it was still anonymous, _all_ replies would need
to be inlined, which might be too bloated in pathological cases.
Secondly, it allows remote servers to update the thread by traversing
the reply collection independent of the original post. (If the remote
part knows about chronological ordering, it can in theory
even efficiently resume from where it previously stopped)
2025-06-07 21:02:31 +02:00
Oneric
c55654876f federation/in: handle ordered 'replies' collections
An OrderedCollection uses orderedItems instead of the items key.
So far inlined orderedCollections thus failed to be processed.
Ordered replies collections are used e.g. by IceShrimp.NET and Sharkey,
while Mastodon uses a partially inlined plain Collection.
2025-06-07 21:02:31 +02:00
Oneric
77749bf107 pagination: prevent path params from turning query params
Not all endpoints use OpenAPISpex’ string-to-atom mapping
and they’ll end up with path params being promoted to
query params in pagination next/prev links.
Fix this by never including path params in the first place
2025-06-07 21:02:31 +02:00
Oneric
d1cd3de282 ap/views: factor out common keyset collection bits
The enxt commit will add another user of the new function.
2025-06-07 21:02:31 +02:00
Oneric
80e8c29e64 cosmetic/web/ap/view: split out collection helper functions
And use more precise name.
2025-06-07 21:02:31 +02:00
Oneric
138b1c5165 pagination: fix custom id_type when used with string keys
Ecto.cast is will convert valid string keys to atoms, but can
only deal with inputs which use either string keys everywhere
or atom keys everywhere.
Since :id_type is used before the case it must be an atom,
thus it was impossible to use it with string paramteres before.
2025-06-07 21:02:31 +02:00
Oneric
1ae7d03f5d pagination: support ascending/chronolgical ordering
Up until now queries were always forced into descending ID order
(reverse chronological order with our ID schemes).
Now it’s possible to request the reverse by passing `oder_asc: true`.
2025-06-07 21:02:31 +02:00
Oneric
5c79ff8503 queries: drop unused query function 2025-06-07 21:02:31 +02:00
Oneric
89678f92d9 ap/collection: don't advertise next page if no more entries
And off-by-one error caused the last page
to always advertise one more page eventhough
the absence of further items is known
2025-06-07 21:02:31 +02:00
5987dd43d4 Merge pull request 'Rework HTTPSignatures and fix bridgy interop' (#874) from Oneric/akkoma:httpsig_rework into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #874
2025-06-07 19:00:01 +00:00
Oneric
61918d39d2 changelog: summarise user-visible parts of http signature rework
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
2025-06-07 20:27:58 +02:00
Oneric
09d8de648f mix: point to AkkomaGang repo
The patches are now merged
2025-06-07 20:27:58 +02:00
Oneric
511e49ffa3 Lower load messages for individual emoji packs to debug
The initial info message listing all found packs ought to be sufficient
and with many packs installed thiscan create multiple pages of log
messages on each emoji reload or server start.
Any errors or non-indexed packs are still logged to higher levels.
2025-06-07 20:27:58 +02:00
Oneric
2b885288fa ap: don't require explicit addressing of personal-inbox owners
This requirement was originally added together with splicing the
inbox owner into the non b* addressing fields to make bcc transports
work in https://git.pleroma.social/pleroma/pleroma/-/merge_requests/390.
Later on this was relaxed to always allow deliveries devoid of any
addressing at all in f6cb963df2
and always allow deliveries from actors the owner is following in
750b369d04 to fix interop issues with
Mastodon and Honk respectively.

The justification for both the filtering and splicing comes from
one sentence in AP spec’s inbox section:
> In general, the owner of an inbox is likely
> to be able to access all of their inbox contents.

While this may provide plausible justification for splicing the owner
into cc, it is less clear how this requires or justifies the set of
filtering rules employed here.
Surveying a few other implementations no similar
filtering or splicing appears to be employed.

Furthermore, spec-compliant servers will strip bto/bcc _before_
delivery to remote servers, meaning any compliant bcc transport
out there will NOT contain any explicit addressing of the inbox owner.
Thus the addressing requirement directly opposes
the goal of the original patch.

Currently the requirement for the owner to be addressed once again
is causing interop issues. It turns out to be the root cause of
a long-standing (2+ years) bug preventing meaningful federation.
Bridgy sends e.g. Follow activities and Accepts for Follows directly
to the affected user’s personal inbox while solely addressing
the public scope in the to field. Notably follow relations never
getting established prevented the "accept if followed" allow rule
to ever come into effect.

To make matters worse non-addressed messages simply lead to a
vague "internal server error" response being sent back
which likely slowed down locating the issue.
Furthermore additional issues wrt to signatures cropped up after
the 500-response issues wa first reported, but they seem to have
already been fixed in the meantime, possibly with the signature
handling overhaul in Akkoma.

Given it repeatedly caused issues, does not appear to align with common
practice in the wider fedi ecosystem and apparently contradicts its
original intention, simply remove the requirement.

This is confirmed to fix bridgy interop.

The addressing splicing actually should also add the inbox owner to bto
or bcc instead of cc, but for now this is not changed and in practice
bto/bcc delivery appears to be basically unused anyway.
2025-06-07 20:27:58 +02:00
Oneric
dbce9675e8 Distinguish targeted ratelimit and general unavailability in logs 2025-06-07 20:27:58 +02:00
Oneric
d7bb6551b1 http_signatures: ensure mandatory headers are set
Most headers are automatically checked by the library after this
upgrade. But since digest is only required for requests with a body
and body processing is handled outside the lib atm, we need to
explicity pass the presence or absence along or not get feedback
about creating broken signatures.

This makes bugs in our signatures more apparent
allowing faster discovery and fixing
2025-06-07 20:27:58 +02:00
Oneric
9e52496a20 http_signatures: only compute request-target aliases when needed
Activity db queries are not cached
and most request will not actually need these aliases
2025-06-07 20:27:58 +02:00
Oneric
69a2b4d149 http_signatures: short-circuit gracefully on MRF rejects
And adjust log details
2025-06-07 20:27:58 +02:00
Oneric
5218a7ca2f federation: fake success on Deletes signed with an unknown gone key 2025-06-07 20:27:58 +02:00
Oneric
6e7dee552a federation: let http_signatures library handle request aliases
This avoids spurious key refetches on each failing alias
2025-06-07 20:27:58 +02:00
Oneric
8dad70e8e7 instances: drop has_request_signatures
This property was introduced as a way to gauge whether and
how much enabling authfetch might break passive federation in
#312.

However, with the db field defaulting to false, there’s no distinction
between instances without valid signatures and those which just never
attempted to fetch anything from the local instance.
Furthermore, this was never exposed anywhere and required manually
checking the database or cachex state via a remote shell.

Given the above it appears this doesn't actually
provide anything useful, thus drop it.
2025-06-07 20:27:58 +02:00
Oneric
f2ca71f1ad Adapt to new http_signature API 2025-06-07 20:27:58 +02:00
Oneric
fefc884f22 Drop EnsureUserPublicKey plug
It is not needed since fetch_public_keys will already
initiate remote lookup if necessary
2025-06-07 20:27:58 +02:00
d53a779c35 Merge pull request 'NormalizeMarkup scrub contentMap' (#932) from Oneric/akkoma:normalize-markup_contentmap into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #932
2025-06-07 18:27:26 +00:00
1b7d9a0f76 Merge pull request 'More federation backoff tweaks' (#934) from Oneric/akkoma:federation_backoff_tweaks into develop
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline failed
ci/woodpecker/push/docs unknown status
Reviewed-on: #934
2025-06-07 18:24:26 +00:00
ilja space
487e1082be Merge branch 'develop' of https://akkoma.dev/AkkomaGang/akkoma into add_fep-c16b_discovery_mechanism_to_not_always_reparse_mfm 2025-05-29 08:25:02 +02:00
Oneric
258841c310 federation/in: space out receiver retries more
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
The most common permanent receiver error arises for likes/boosts
when we don’t yet know the rlevant object and can't fetch it
due to the remote being overwhelmed or otherwise down.

Before this changes all retries were rather rapid
thus not giving the remote enough time to recover
and usually all failing. Now the remote has about 20
minutes to recover before we give up.

Transient errors from race conditions and (presumably)
weird database-cache interactions also occur regularly.
However, they resolve within the first one or two retries
and those intial retries still happen relatively quickly.
2025-05-18 14:24:09 +02:00
Oneric
50afbc63e4 federation/out: raise publisher retries by one
We now tolerate a whole day of downtime by default
instead of only about three hours.
2025-05-18 14:24:08 +02:00
Oneric
782a222efd common_api: make inserted attachment links scrubber-compliant
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
2025-05-16 21:30:26 +02:00
Oneric
2eadc4b513 mrf/normalize_markup: also scrub contentMap
Only scrubbing "content" leads to differences between
"content" and "contentMap" eventhough the latter should
ideally match the former exactly for the primary language’s entry.

While ideally, for locally generated posts there should be no difference
between applying the scrubber or not, as it turns out automatically
generated attachment links didn't match the form expected by our default
scrubber.

Currently Akkoma never uses nor exposes the value of contentMap entries,
thus this oversight was harmless wrt to safety and at most pertubed
the language detection for our posts perfomed by remote servers.

Fixes: #928
2025-05-16 21:30:26 +02:00
3791b695f4 Merge pull request 'fix some elixir 1.18 deprecation warnings' (#930) from Oneric/akkoma:build_deprecation-warnings into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #930
2025-05-16 09:39:24 +00:00
Oneric
c749df62a1 cosmetic: replace deprecated Tuple.append
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Everytime a tuple is append a new one is allocated and all data copied
over. Keeping it a list until all entries are converted avoids this.
2025-05-15 23:40:57 +02:00
Oneric
88a6a9d964 cosmetic: replace deprecated comment syntax in eex
The replacement <!-- --> is available since
elixir 1.14.0 which matches our minimal version.
2025-05-15 23:07:43 +02:00
771d3c3103 Merge pull request 'api/masto/instance: use WebFinger domain for URI' (#927) from Oneric/akkoma:mastoapi_instance-uri into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #927
2025-05-15 19:45:08 +00:00
Oneric
40fef8e632 api/masto/instance: use WebFinger domain for URI
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Despite its name this property is not supposed to be a full URI,
but just a bare domain witout protocol. Furthermore, it’s supposed
to be the WebFinger domain used in userhandles and NOT the domain used
for API and ActivityPub objects (which every caller will already know
anyway).

Not following this caused issues for Pachli and Tusky.

Reported-by: nikclayton
2025-05-15 21:10:17 +02:00
6f17eae3f9 Merge pull request 'api/masto/instance: add short_description field' (#926) from Oneric/akkoma:mastoapi_short-description into develop
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/docs unknown status
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline failed
Reviewed-on: #926
2025-05-15 19:10:02 +00:00
Oneric
295e4a4da3 api/masto/instance: add short_description field
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Added in Mastodon 2.9.2 (June 2019) this is plain-text-only and supposed
to be shorter compared to the older description field.
Some clients were reported to require this field to properly function.

Reported-by: https://akkoma.dev/paulyd
2025-05-15 20:41:55 +02:00
5e091f44ff Merge pull request 'Properly register digest_emails queue' (#925) from Oneric/akkoma:fix_digest into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #925
2025-05-12 12:52:40 +00:00
Oneric
d837a390d9 Properly register digest_emails queue
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
The queue was not actually registered leading to
jobs getting scheduled each week but never processed
forever lingering in 'available' state.

Fixes omission in: a4f834a687
2025-05-11 23:07:29 +02:00
30b1684e28 Merge pull request 'docs: fix spelling and grammar' (#923) from Oneric/akkoma:solidsanek_doc-tweaks into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Port of: #525
2025-05-10 15:28:30 +00:00
solidsanek
23ee94c0d8 docs: use highlight blocks where appropriate
Some checks failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/build-arm64 unknown status
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/pr/build-amd64 unknown status
ci/woodpecker/pr/docs unknown status
ci/woodpecker/pr/test/2 Pipeline failed
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
2025-05-10 17:14:36 +02:00
solidsanek
303f0931de docs: fix spelling and grammar 2025-05-10 17:00:55 +02:00
solidsanek
8b05f8bd84 docs: consistenly capitalise Caddy
When not referring to the command
2025-05-10 15:15:54 +02:00
solidsanek
4766e4bfce docs: consistently cpaitlaise Apache 2025-05-10 15:14:23 +02:00
solidsanek
11e82ea508 docs: change FE names to be more consistent
Preferring the spelling used in their repository
2025-05-10 15:10:57 +02:00
Oneric
3c3134f87c docs: exactly match spelling of distro package names
And use the project’s preferred spelling when
not referring to specific distro package.

Spelling of RedHat packages was left as is
as I can’t access RedHat’s package repository.
2025-05-10 15:01:09 +02:00
solidsanek
d86ae26092 docs: consistently spell ejabberd using lowercase
This matches the project’s own spelling
2025-05-10 14:50:54 +02:00
solidsanek
873f57690a docs: consistenly spell nginx using lowercase
This matches the spelling used by the nginx project
(which differs from the spelling used by the NGINX corporation)
2025-05-10 14:49:38 +02:00
Oneric
6e0b6f2915 changelog: add missing entries since 3.15.2
Some checks reported warnings
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was rejected
ci/woodpecker/pr/build-arm64 Pipeline was rejected
ci/woodpecker/pr/docs Pipeline was rejected
ci/woodpecker/pr/lint Pipeline was rejected
ci/woodpecker/pr/test/1 Pipeline was rejected
ci/woodpecker/pr/test/2 Pipeline was rejected
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
2025-05-09 23:43:08 +02:00
Oneric
76bfc41d78 changelog: fix header levels 2025-05-09 23:42:15 +02:00
7e5a5db63d Merge pull request 'dbprune: add --keep-followed and don't prune pinned posts by default' (#897) from Oneric/akkoma:mix-prune_newopts into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #897
2025-05-09 21:31:36 +00:00
Oneric
516827c356 mix/database: add keep-followed option for object pruning
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
This allows to retain posts and boosts of remote actors with local
follows regardless of age.
With the "full" setting this can be taken further treating such
followed actors just like local users even keeping all posts they
liked or reacated to.
2025-05-09 23:02:25 +02:00
Oneric
8576ec42ec mix/database: retain pinned objects by default
Pinned objects and their threads will be refetched
on user refresh which by default happens after a day
once a user is encountered again in any form including a mention.

We observed pruning pinned objects usually results in heavy load for
hours after a database prune due to a clogged up remote fetch queue as
pinned posts and their threads of many (most?) users get refetched.

Thus do not prune pinned posts by default.
Keeping closer to earlier behaviour this will still prune threads of
pinned posts regardless of --keep-threads if nothing else prevenets it.
2025-05-09 23:00:14 +02:00
Oneric
be5312228f cosmetic/mix/database: refactor log_message building
This is more concise and readable
2025-05-09 22:57:01 +02:00
Oneric
9846460702 cosmetic/mix/database: refactor object prune into subfunctions
Statmenets for keeping and breaking threads vastly differ
and the whole if block doesn't even fit on one screen.
Thus move each version out into its own function to
improve readability
2025-05-09 22:57:01 +02:00
6c3ea04078 Merge pull request 'worker/receiver: don’t retry unsupported actions' (#902) from Oneric/akkoma:receiver_ignore_unsupported_actions into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #902
2025-05-09 20:56:19 +00:00
Oneric
f576807f1b worker/receiver: don't retry unsupported actions
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Observed for e.g. user delete Undos and Bite activities
2025-05-09 22:29:49 +02:00
487473cd75 Merge pull request 'web/metadata: provide alternate link for ActivityPub' (#905) from Oneric/akkoma:metadata_aplink into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #905
2025-05-09 20:20:04 +00:00
c3d163d34d Merge pull request 'mediaproxy: proxy network-path references' (#903) from Oneric/akkoma:mediaproxy_networkpathref into develop
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline failed
ci/woodpecker/push/docs unknown status
Reviewed-on: #903
2025-05-09 20:13:55 +00:00
8cdfbf872d Merge pull request 'federation/out: tweak publish retry backoff' (#884) from Oneric/akkoma:publish_backoff into develop
Some checks failed
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test/1 unknown status
ci/woodpecker/push/test/2 unknown status
ci/woodpecker/push/build-arm64 unknown status
ci/woodpecker/push/build-amd64 unknown status
ci/woodpecker/push/docs unknown status
Reviewed-on: #884
2025-05-09 20:12:56 +00:00
13940a558a Merge pull request 'Expose stats about finally failed AP deliveries in prometheus' (#882) from Oneric/akkoma:telemetry-failed-deliveries into develop
Some checks failed
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test/1 unknown status
ci/woodpecker/push/test/2 unknown status
ci/woodpecker/push/build-arm64 unknown status
ci/woodpecker/push/build-amd64 unknown status
ci/woodpecker/push/docs unknown status
Reviewed-on: #882
2025-05-09 20:12:01 +00:00
aac5493dd5 Merge pull request 'Don’t pretend internal actors have follow(er|ing) collections' (#856) from Oneric/akkoma:fetch-actor-follow-collections into develop
Some checks failed
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test/1 Pipeline is pending
ci/woodpecker/push/test/2 Pipeline is pending
ci/woodpecker/push/build-arm64 unknown status
ci/woodpecker/push/build-amd64 unknown status
ci/woodpecker/push/docs unknown status
Reviewed-on: #856
2025-05-09 20:10:41 +00:00
d6f5f4db18 Merge pull request 'receiver_worker: prevent duplicate jobs' (#886) from Oneric/akkoma:receive_dedupe into develop
Some checks failed
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test/1 unknown status
ci/woodpecker/push/test/2 unknown status
ci/woodpecker/push/build-arm64 unknown status
ci/woodpecker/push/build-amd64 unknown status
ci/woodpecker/push/docs unknown status
Reviewed-on: #886
2025-05-09 19:13:14 +00:00
fffac8bc7c Merge pull request 'Always prefer shared inbox' (#881) from Oneric/akkoma:shared-inbox into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #881
2025-05-09 16:54:19 +00:00
9a46685e64 Merge pull request 'Set cleanup_attachments to true by default' (#910) from norm/akkoma:cleanup-attachments-default-true into develop
Reviewed-on: #910
Reviewed-by: Oneric <oneric@noreply.akkoma>
2025-05-09 16:49:49 +00:00
8712e06d27 Set cleanup_attachments to true by default
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Since bcfbfbcff5 (part of
<#789>), the overhead for
cleaning up orphaned attachments has been drattically reduced.

Most admins are unaware of this option even existing, but may notice an
increase in the size of the uploads directory (or S3 bucket size if used
instead) even if auto-expiring posts are used. This should hopefully
make this problem more manageable.

For those that still encounter performance issues, the setting can still
be disabled if needed.
2025-05-08 18:12:56 -04:00
Oneric
a80444041c federation: always prefer the shared inbox
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
In theory a pedantic reading of the spec indeed suggests
DMs must only be delivered to personal inboxes. However,
in practice the normative force of real-world implementations
disagrees. Mastodon, Iceshrimp.NET and GtS (the latter notably has a
config option to never use sharedInboxes) all unconditionally prefer
sharedInbox for everything without ill effect. This saves on duplicate
deliveries on the sending and processing on the receiving end.
(Typically the receiving side ends up rejecting
 all but the first copy as duplicates)

Furthermore current determine_inbox logic also actually needs up
forcing personal inboxes for follower-only posts, unless they
additionally explicitly address at least one specific actor.
This is even much wasteful and directly contradicts
the explicit intent of the spec.

There’s one part where the use of sharedInbox falls apart,
namely spec-compliant bcc and bto addressing. AP spec requires
bcc/bto fields to be stripped before delivery and then implicitly
reconstructed by the receiver based on the addressed personal inbox.
In practice however, this addressing mode is almost unused. Neither of
the three implementations brought up above supports it and while *oma
does use bcc for list addressing, it does not use it in a spec-compliant
way and even copies same-host recipients into cc before delivery.
Messages with bcc addressing are handled in another function clause,
always force personal inboxes for every recipient and not affected by
this commit.
In theory it would be beneficial to use sharedInbox there too for all
but bcc recipients. But in practice list addressing has been broken for
quite some time already and is not actually exposed in any frontend,
as discussed in #812.
Therefore any changes here have virtually no effect anyway
and all code concerning it may just be outright removed.
2025-05-06 17:38:24 +02:00
Oneric
0d38385d6f publisher: don't mangle between string and atom
Oban jobs only can have string args and there’s no reason to insist on atoms here.

Plus this used unchecked string_to_atom
2025-05-06 17:38:18 +02:00
Oneric
6b97f085d8 Refresh mix.lock
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Fixes omission in 936be4edbb
2025-05-06 17:24:58 +02:00
818ddeca84 Merge pull request 'add instruction to make asdf work when logging into it with sudo' (#894) from shadowjonathan/akkoma:add-sudo-asdf into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #894
2025-05-05 20:45:50 +00:00
f0653efe13 Merge pull request 'Fix Pleroma’s unlisted posts' (#885) from Oneric/akkoma:pleroma_unlisted into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #885
2025-05-02 22:26:59 +00:00
cb51d69108 Merge pull request 'deps: upgrade flake_id to fix crash' (#906) from Oneric/akkoma:fix_flake_crash into develop
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline failed
ci/woodpecker/push/docs unknown status
Reviewed-on: #906
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-05-02 22:26:41 +00:00
Oneric
936be4edbb deps: upgrade flake_id to fix crash
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Currently FlakeId.flake_id crashes if receiving non-UTF-8 binaries,
but we use it e.g. in the /:nick_or_id path used in akkoma-fe user
profiles.
With the upgrade such invalid binaries simply fail the id check.

Reported-in: https://meta.akkoma.dev/t/frontend-unicodeconversionerror/847
2025-05-02 21:46:04 +02:00
ilja space
39d768af82 Fix grammatical errors after code review
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-04-30 11:52:07 +02:00
Oneric
ed03eaade9 web/metadata: provide alternate link for ActivityPub
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
This allows discovering a page represents an ActivityPub object
and also where to find the underlying representation.
Other servers already implement this and some tools
came to rely or profit from it.

The alternate link is provided both with the "application/activity+json"
format as used by Mastodon and the standard-compliant media type.

Just like the feed provider, ActivityPub links are always enabled
unless access to local posts is restricted and not configurable.

The commit is based on earlier work by Charlotte 🦝 Deleńkec
but with fixes and some tweaks.

Co-authored-by: Charlotte 🦝 Deleńkec <lotte@chir.rs>
2025-04-27 00:35:02 +02:00
Jonathan de Jong
bb50e9050b rearrange shims
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
2025-04-26 16:17:31 +02:00
Oneric
bbf974adc8 mediaproxy: proxy network-path references
Some checks failed
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline is pending
ci/woodpecker/pull_request_closed/test/1 Pipeline is pending
ci/woodpecker/pull_request_closed/test/2 Pipeline is pending
ci/woodpecker/pull_request_closed/build-arm64 unknown status
ci/woodpecker/pr/docs unknown status
ci/woodpecker/pull_request_closed/build-amd64 unknown status
ci/woodpecker/pull_request_closed/docs unknown status
Discovered-by: snow
Fixes: #900
2025-04-18 01:50:27 +02:00
Oneric
1f6f5edf85 telemetry: expose stats about failed deliveries
Some checks failed
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline is pending
ci/woodpecker/pull_request_closed/test/1 unknown status
ci/woodpecker/pull_request_closed/test/2 unknown status
ci/woodpecker/pull_request_closed/build-arm64 unknown status
ci/woodpecker/pull_request_closed/build-amd64 unknown status
ci/woodpecker/pull_request_closed/docs unknown status
And also log about it which we so far didn't do
2025-04-15 19:41:12 +02:00
Oneric
2fee79e1f5 Use apropriate cancellation type for oban jobs
:discard marks jobs as "discarded", i.e. jobs which permanently failed
due to e.g. exhausting all retries or explicitly being discared due to a
fatal error.
:cancel marks jobs as "cancelled" which does not imply failure.

While neither method counts as a job "exception" in the set of
telemetries we currently export via Prometheus, the different state
is visible in the (not-exported) metadata of oban job telemetry.
We can use handlers of those events to build bespoke statistics.

Ideally we'd like to distinguish in the receiver worker between
"invalid" and "already present or delete of unknown" documents,
but this is cumbersome to get get right with a list of
free-form, human-readable descriptions oof the violated constraints.
For now, just count both as an fatal error.
        # but that is cumbersome to get right with a list of string error descriptions
2025-04-15 19:40:26 +02:00
6a6d4254d5 Merge pull request 'api/statuses: allow expires_in to override user-level status_ttl_default' (#899) from Oneric/akkoma:expires_in_overriding_default_status_ttl into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #899
2025-04-09 12:24:26 +00:00
Oneric
984e5a121a api/statuses: allow expires_in to override user-level status_ttl_default
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Fixes: #898
2025-04-08 23:43:59 +02:00
ilja space
c9a36e4340 Support htmlMfm term key for FEP-c16b compliance
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
We now add the htmlMfm key when relevant, store this in the database, and we see it when fetching using e.g.

    curl -L -H 'Accept: application/activity+json' "$ap_id"

The `@context` of the Activity Pub message now also contains `htmlMfm: https://w3id.org/fep/c16b#htmlMfm`.

When an incomming post has `htmlMfm: true`, we will not re-parse the content.

FEDERATION.md is adapted to show the `htmlMfm` term is used.
2025-04-06 19:56:56 +02:00
Jonathan de Jong
64e7f25252 add instruction to make asdf work when logging into it with sudo
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-03-31 13:27:25 +02:00
ff3aaa73ee Merge pull request 'exiftool/strip: hide warnings from log' (#883) from Oneric/akkoma:exiftool-hide-warning into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #883
2025-03-31 10:28:55 +00:00
3d032493eb Merge pull request 'fix: docs: arch linux split erlang package' (#879) from a/akkoma:develop into develop
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline failed
ci/woodpecker/push/docs unknown status
Reviewed-on: #879
2025-03-31 10:27:26 +00:00
Oneric
caf6b4606f Fix representaton of internal actors
Some checks failed
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline is pending
ci/woodpecker/pull_request_closed/test/1 unknown status
ci/woodpecker/pull_request_closed/test/2 unknown status
ci/woodpecker/pull_request_closed/build-arm64 unknown status
ci/woodpecker/pull_request_closed/build-amd64 unknown status
ci/woodpecker/pull_request_closed/docs unknown status
CUrrently internal actors are supposed to be identified in the database
by either a NULL nickname or a nickname prefixed by "internal.". For old
installations this is true, but only if they were created over five
years ago before 70410dfafd.
Newer installations will use "relay" as the nickname of the realy actor
causing ii to be treated as a regular user.

In particular this means all installations in the last five years never
made use of the reduced endpoint case, thus it is dropped.

Simplify this distinction by properly marking internal actors asa an
Application type in the database. This was already implemented before by
ilja in #457 but accidentally
reverted during a translation update in
eba3cce77b. This commit effectively
restores this patch together with further changes.

Also service actors unconditionally expose follow* collections atm,
eventhough the internal fetch actor doesn't actually implement them.
Since they are optional per spec and with Mastodon omitting them too
for its instance actor proving the practical viability, we should just
omit them. The relay actor however should continue to expose such
collections and they are properly implemented here.
Here too we now just use the values or their absence in the database.

We do not have any other internal.* actors besides fetch atm.

Fixes: #855

Co-authored-by: ilja space <git@ilja.space>
2025-03-26 17:14:28 +01:00
Oneric
b58b6af3ba cosmetic: adapt software name in internal actor descriptions 2025-03-26 05:03:18 +01:00
a
ab9a4ce0d5 remove specific split packages, refer only to erlang-headless or erlang
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
2025-03-19 20:15:57 +00:00
a
699c051101 erlang-headless now exists
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-03-19 03:15:07 +00:00
Oneric
195042bdc9 receiver_worker: prevent duplicate jobs
Some checks failed
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline is pending
ci/woodpecker/pull_request_closed/test/1 unknown status
ci/woodpecker/pull_request_closed/test/2 unknown status
ci/woodpecker/pr/docs unknown status
ci/woodpecker/pull_request_closed/build-arm64 unknown status
ci/woodpecker/pull_request_closed/build-amd64 unknown status
ci/woodpecker/pull_request_closed/docs unknown status
E.g. \*oma federates (most) follower-only posts multiple times
to each personal inbox. This commonly leads to race conditions
with jobs of several copies running at the same time and getting
past the initial "already known" check but then later all but
one will crash with an exception from the unique db index.

Since the only special thing we do with copies anyway is to discard them,
just don't create such duplicate jobs in the first place.
For the same reason and since failed jobs don't count towards
duplicates, this should have virtually no effect on federation.
2025-03-18 03:46:33 +01:00
Oneric
7ffbe2ad26 upload/filter/exiftool/strip: hide warnings from log
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
2025-03-18 01:01:47 +01:00
Oneric
0abe01be2e federation/in: always copy object addressing into its Create activity
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
Since we later only consider the Create activity for
access permission checks, but the semantically more
sensible set of fields are the object’s.

Changing the check itself to use the object may have unintended
consequences on already existing legacy posts as the old code
which processed it when it arrived may have never considered
effects on the objects addressing fields.
2025-03-17 23:08:27 +01:00
Oneric
cdf576b951 federation/in: fix activity addressing of Pleroma unlisted
While the object itself has the expected adressing for an
"unlisted" post, we always use the Create activity’s
adressing fields for permission checks.

To avoid unintended effects on legacy objects
we will continue to use the activity for access perm checks,
but fix its addressing fields based on its object data.

Ref: https://git.pleroma.social/pleroma/pleroma/-/issues/3323
2025-03-17 23:06:16 +01:00
Oneric
4011d20dbe federation/out: tweak publish retry backoff
Some checks failed
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline is pending
ci/woodpecker/pull_request_closed/test/1 Pipeline is pending
ci/woodpecker/pull_request_closed/test/2 Pipeline is pending
ci/woodpecker/pull_request_closed/build-arm64 unknown status
ci/woodpecker/pr/docs unknown status
ci/woodpecker/pull_request_closed/build-amd64 unknown status
ci/woodpecker/pull_request_closed/docs unknown status
With the current strategy the individual
and cumulative backoff looks like this
(the + part denotes max extra random delay):

attempt  backoff_single   cumulative
   1      16+30                16+30
   2      47+60                63+90
   3     243+90  ≈ 4min       321+180
   4    1024+120 ≈17min      1360+300  ≈23+5min
   5    3125+150 ≈20min      4500+450  ≈75+8min
   6    7776+180 ≈ 2.1h    12291+630   ≈3.4h
   7   16807+210 ≈ 4.6h    29113+840   ≈8h
   8   32768+240 ≈ 9.1h    61896+1080  ≈17h
   9   59049+270 ≈16.4h   120960+1350  ≈33h
  10  100000+300 ≈27.7h   220975+1650  ≈61h

We default to 5 retries meaning the least backoff runs with attempt=4.
Therefore outgoing activiities might already be permanently dropped by a
downtime of only 23 minutes which doesn't seem too implausible to occur.
Furthermore it seems excessive to retry this quickly this often at the
beginning.
At the same time, we’d like to have at least one quick'ish retry to deal
with transient issues and maintain reasonable federation responsiveness.

If an admin wants to tolerate one -day downtime of remotes,
retries need to be almost doubled.

The new backoff strategy implemented in this commit instead
switches to an exponetial after a few initial attempts:

attempt  backoff_single   cumulative
   1      16+30              16+30
   2     143+60             159+90
   3    2202+90  ≈37min    2361+180 ≈40min
   4    8160+120 ≈ 2.3h   10521+300 ≈ 3h
   5   77393+150 ≈21.5h   87914+450 ≈24h

Initial retries are still fast, but the same amount of retries
now allows a remote downtime of at least 40 minutes. Customising
the retry count to 5 allows for whole-day downtimes.
2025-03-17 19:37:54 +01:00
a
dcfae9bfbf erlang-os_mon as well
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-03-12 20:27:27 +00:00
a
efb901bdb5 fix: docs: arch linux split erlang package
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
2025-03-12 20:15:34 +00:00
74182abb5b bump version
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
2025-03-11 20:48:27 +00:00
0a9cf8fa8b Merge pull request 'Test lowest and highest language versions, elixir 1.18 support' (#875) from ci-testing-all-versions into develop
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline failed
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/docs unknown status
Reviewed-on: #875
2025-03-11 20:47:54 +00:00
Oneric
066d5b48ed Fix Content-Type sanitisation for emoji and local uploads
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline failed
ci/woodpecker/push/docs unknown status
This was accidentally broken in c8e0f7848b
due to a one-letter mistake in the plug option name and an absence of
tests. Therefore it was once again possible to serve e.g. Javascript or
CSS payloads via uploads and emoji.
However due to other protections it was still NOT possible for anyone to
serve any payload with an ActivityPub Content-Type. With the CSP policy
hardening from previous JS payload exloits predating the Content-Type
sanitisation, there is currently no known way of abusing this weakened
Content-Type sanitisation, but should be fixed regardless.

This commit fixes the option name and adds tests to ensure
such a regression doesn't occur again in the future.

Reported-by: Lain Soykaf <lain@lain.com>
2025-03-10 19:45:26 +01:00
4a05b2d643 we do actually want to start oban-met...
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pull_request_closed/lint Pipeline was successful
ci/woodpecker/pull_request_closed/test/1 Pipeline was successful
ci/woodpecker/pull_request_closed/test/2 Pipeline was successful
ci/woodpecker/pull_request_closed/build-arm64 Pipeline was successful
ci/woodpecker/pull_request_closed/build-amd64 Pipeline was successful
ci/woodpecker/pull_request_closed/docs Pipeline was successful
2025-03-02 13:36:52 +00:00
93200a8073 use latest ASDF instructions
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/test/1 unknown status
ci/woodpecker/pr/test/2 unknown status
ci/woodpecker/pr/build-arm64 unknown status
ci/woodpecker/pr/build-amd64 unknown status
ci/woodpecker/pr/docs unknown status
ci/woodpecker/pr/lint Pipeline failed
2025-03-02 13:36:14 +00:00
41a4ed1db5 specify correct version
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test/1 unknown status
ci/woodpecker/pr/test/2 unknown status
ci/woodpecker/pr/build-arm64 unknown status
ci/woodpecker/pr/build-amd64 unknown status
ci/woodpecker/pr/docs unknown status
2025-03-02 13:17:52 +00:00
8e789c6236 1.14.1 min version
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
2025-03-02 13:07:03 +00:00
184c62359f drop back to 1.14/OTP25
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test/1 unknown status
ci/woodpecker/pr/test/2 unknown status
ci/woodpecker/pr/build-arm64 unknown status
ci/woodpecker/pr/build-amd64 unknown status
ci/woodpecker/pr/docs unknown status
2025-03-02 13:04:10 +00:00
829af03042 we don't support otp24, bump to 25
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/build-arm64 Pipeline was successful
ci/woodpecker/pr/build-amd64 Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
2025-03-02 12:19:14 +00:00
842414b927 run the lint task on the latest version
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline failed
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/build-arm64 unknown status
ci/woodpecker/pr/build-amd64 unknown status
ci/woodpecker/pr/docs unknown status
2025-03-02 11:56:15 +00:00
f176294d6d elixir 1.18 formatting
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test/1 unknown status
ci/woodpecker/pr/test/2 unknown status
ci/woodpecker/pr/build-amd64 unknown status
ci/woodpecker/pr/build-arm64 unknown status
ci/woodpecker/pr/docs unknown status
2025-03-02 11:54:00 +00:00
b1c0b9e01a test lowest and highest supported versions on PR
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
2025-03-02 11:49:41 +00:00
fc2c740008 dependency upgrade
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
2025-03-02 11:34:09 +00:00
9da2cb881e upgrade oban migrations to v12
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/docs unknown status
ci/woodpecker/push/build-arm64 Pipeline failed
ci/woodpecker/push/build-amd64 Pipeline failed
2025-03-02 11:32:40 +00:00
522a168af6 force signatures for pinned posts
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
2025-03-01 17:27:45 +00:00
427 changed files with 23290 additions and 9078 deletions

View file

@ -1,121 +0,0 @@
labels:
platform: linux/amd64
depends_on:
- test
variables:
- &scw-secrets
SCW_ACCESS_KEY:
from_secret: SCW_ACCESS_KEY
SCW_SECRET_KEY:
from_secret: SCW_SECRET_KEY
SCW_DEFAULT_ORGANIZATION_ID:
from_secret: SCW_DEFAULT_ORGANIZATION_ID
- &setup-hex "mix local.hex --force && mix local.rebar --force"
- &on-release
when:
event:
- push
- tag
branch:
- develop
- stable
- &on-stable
when:
event:
- push
- tag
branch:
- stable
- &on-pr-open
when:
event:
- pull_request
- &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG"
- &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)"
- &mix-clean "mix deps.clean --all && mix clean"
steps:
# Canonical amd64
debian-bookworm:
image: hexpm/elixir:1.15.4-erlang-26.0.2-debian-bookworm-20230612
<<: *on-release
environment:
MIX_ENV: prod
DEBIAN_FRONTEND: noninteractive
commands:
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget
- *clean
- echo "import Config" > config/prod.secret.exs
- *setup-hex
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-amd64.zip -r release
release-debian-bookworm:
image: akkoma/releaser
<<: *on-release
environment: *scw-secrets
commands:
- export SOURCE=akkoma-amd64.zip
# AMD64
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64.zip
- /bin/sh /entrypoint.sh
# Ubuntu jammy (currently compatible)
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-ubuntu-jammy.zip
- /bin/sh /entrypoint.sh
debian-bullseye:
image: hexpm/elixir:1.15.4-erlang-26.0.2-debian-bullseye-20230612
<<: *on-release
environment:
MIX_ENV: prod
DEBIAN_FRONTEND: noninteractive
commands:
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget
- *clean
- echo "import Config" > config/prod.secret.exs
- *setup-hex
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-amd64-debian-bullseye.zip -r release
release-debian-bullseye:
image: akkoma/releaser
<<: *on-release
environment: *scw-secrets
commands:
- export SOURCE=akkoma-amd64-debian-bullseye.zip
# AMD64
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-debian-bullseye.zip
- /bin/sh /entrypoint.sh
# Canonical amd64-musl
musl:
image: hexpm/elixir:1.15.4-erlang-26.0.2-alpine-3.18.2
<<: *on-stable
environment:
MIX_ENV: prod
commands:
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
- *clean
- *setup-hex
- *mix-clean
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-amd64-musl.zip -r release
release-musl:
image: akkoma/releaser
<<: *on-stable
environment: *scw-secrets
commands:
- export SOURCE=akkoma-amd64-musl.zip
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-musl.zip
- /bin/sh /entrypoint.sh

View file

@ -1,93 +0,0 @@
labels:
platform: linux/arm64
depends_on:
- test
variables:
- &scw-secrets
SCW_ACCESS_KEY:
from_secret: SCW_ACCESS_KEY
SCW_SECRET_KEY:
from_secret: SCW_SECRET_KEY
SCW_DEFAULT_ORGANIZATION_ID:
from_secret: SCW_DEFAULT_ORGANIZATION_ID
- &setup-hex "mix local.hex --force && mix local.rebar --force"
- &on-release
when:
event:
- push
- tag
branch:
- stable
- develop
- &on-stable
when:
event:
- push
- tag
branch:
- stable
- &on-pr-open
when:
event:
- pull_request
- &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG"
- &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)"
- &mix-clean "mix deps.clean --all && mix clean"
steps:
# Canonical arm64
debian-bookworm:
image: hexpm/elixir:1.15.4-erlang-26.0.2-debian-bookworm-20230612
<<: *on-release
environment:
MIX_ENV: prod
DEBIAN_FRONTEND: noninteractive
commands:
- apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget
- *clean
- echo "import Config" > config/prod.secret.exs
- *setup-hex
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-arm64.zip -r release
release-debian-bookworm:
image: akkoma/releaser:arm64
<<: *on-release
environment: *scw-secrets
commands:
- export SOURCE=akkoma-arm64.zip
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-arm64-ubuntu-jammy.zip
- /bin/sh /entrypoint.sh
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-arm64.zip
- /bin/sh /entrypoint.sh
# Canonical arm64-musl
musl:
image: hexpm/elixir:1.15.4-erlang-26.0.2-alpine-3.18.2
<<: *on-stable
environment:
MIX_ENV: prod
commands:
- apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
- *clean
- *setup-hex
- *mix-clean
- *tag-build
- mix deps.get --only prod
- mix release --path release
- zip akkoma-arm64-musl.zip -r release
release-musl:
image: akkoma/releaser:arm64
<<: *on-stable
environment: *scw-secrets
commands:
- export SOURCE=akkoma-arm64-musl.zip
- export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-arm64-musl.zip
- /bin/sh /entrypoint.sh

View file

@ -1,50 +1,15 @@
labels:
platform: linux/amd64
depends_on:
- test
- build-amd64
variables:
- &setup-hex "mix local.hex --force && mix local.rebar --force"
- &on-release
when:
event:
- push
- tag
branch:
- develop
- stable
- refs/tags/v*
- refs/tags/stable-*
- &on-stable
when:
event:
- push
- tag
branch:
- stable
- refs/tags/stable-*
- &on-point-release
when:
event:
- push
branch:
- develop
- stable
- &on-pr-open
when:
event:
- pull_request
- &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG"
- &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)"
- &mix-clean "mix deps.clean --all && mix clean"
when:
event:
- push
branch:
- develop
- stable
steps:
docs:
<<: *on-point-release
environment:
CI: "true"
SCW_ACCESS_KEY:

View file

@ -1,52 +0,0 @@
labels:
platform: linux/amd64
variables:
- &setup-hex "mix local.hex --force && mix local.rebar --force"
- &on-release
when:
event:
- push
- tag
branch:
- develop
- stable
- refs/tags/v*
- refs/tags/stable-*
- &on-stable
when:
event:
- push
- tag
branch:
- stable
- refs/tags/stable-*
- &on-point-release
when:
event:
- push
branch:
- develop
- stable
- &on-pr-open
when:
event:
- pull_request
- &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG"
- &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)"
- &mix-clean "mix deps.clean --all && mix clean"
steps:
lint:
image: akkoma/ci-base:1.16-otp26
<<: *on-pr-open
environment:
MIX_ENV: test
commands:
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix compile
- mix format --check-formatted

104
.woodpecker/publish.yml Normal file
View file

@ -0,0 +1,104 @@
when:
event:
- push
- tag
branch:
- develop
- stable
evaluate: 'SKIP_DEVELOP != "YES" || CI_COMMIT_BRANCH != "develop"'
matrix:
include:
# Canonical amd64
- ARCH: amd64
SUFFIX:
IMG_VAR: debian-bookworm-20230612
UBUNTU_EXPORT: YES
# old debian variant of amd64
- ARCH: amd64
SUFFIX: -debian-bullseye
IMG_VAR: debian-bullseye-20230612
# Canonical amd64-musl
- ARCH: amd64
SUFFIX: -musl
IMG_VAR: alpine-3.18.2
SKIP_DEVELOP: YES
# Canonical arm64
- ARCH: arm64
SUFFIX:
RELEASER_TAG: :arm64
IMG_VAR: debian-bookworm-20230612
UBUNTU_EXPORT: YES
# Canonical arm64-musl
- ARCH: arm64
SUFFIX: -musl
RELEASER_TAG: :arm64
IMG_VAR: alpine-3.18.2
SKIP_DEVELOP: YES
labels:
platform: linux/${ARCH}
steps:
# Canonical amd64
build:
image: hexpm/elixir:1.15.4-erlang-26.0.2-${IMG_VAR}
environment:
MIX_ENV: prod
DEBIAN_FRONTEND: noninteractive
commands: |
# install deps
case "${IMG_VAR}" in
debian*)
apt-get update && apt-get install -y \
cmake libmagic-dev rclone zip git wget \
build-essential g++ imagemagick libmagic-dev
;;
alpine*)
apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick
;;
*)
echo "No package manager defined for ${BASE_IMG}!"
exit 1
esac
# clean leftovers
rm -rf release
rm -rf _build
rm -rf /root/.mix
# setup
echo "import Config" > config/prod.secret.exs
mix local.hex --force
mix local.rebar --force
export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"}
export PLEROMA_BUILD_BRANCH=$BUILD_TAG
# actually build and zip up
mix deps.get --only prod
mix release --path release
zip akkoma-${ARCH}${SUFFIX}.zip -r release
release:
image: akkoma/releaser${RELEASER_TAG}
environment:
SCW_ACCESS_KEY:
from_secret: SCW_ACCESS_KEY
SCW_SECRET_KEY:
from_secret: SCW_SECRET_KEY
SCW_DEFAULT_ORGANIZATION_ID:
from_secret: SCW_DEFAULT_ORGANIZATION_ID
commands: |
export SOURCE=akkoma-${ARCH}${SUFFIX}.zip
export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/$${SOURCE}
/bin/sh /entrypoint.sh
if [ "${UBUNTU_EXPORT}" = "YES" ] ; then
# Ubuntu jammy (currently compatible with our default debian builds)
export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-${ARCH}-ubuntu-jammy.zip
/bin/sh /entrypoint.sh
fi

View file

@ -1,64 +1,24 @@
labels:
platform: linux/amd64
depends_on:
- lint
when:
- event: pull_request
matrix:
ELIXIR_VERSION:
- 1.14
- 1.15
- 1.16
OTP_VERSION:
- 25
- 26
# test the lowest and highest versions
include:
- ELIXIR_VERSION: 1.16
OTP_VERSION: 26
- ELIXIR_VERSION: 1.15
OTP_VERSION: 25
LINT: NO
PLATFORM: linux/amd64
- ELIXIR_VERSION: 1.19
OTP_VERSION: 28
LINT: YES
PLATFORM: linux/arm64
variables:
- &setup-hex "mix local.hex --force && mix local.rebar --force"
- &on-release
when:
event:
- push
- tag
branch:
- develop
- stable
- refs/tags/v*
- refs/tags/stable-*
- &on-stable
when:
event:
- push
- tag
branch:
- stable
- refs/tags/stable-*
- &on-point-release
when:
event:
- push
branch:
- develop
- stable
- &on-pr-open
when:
event:
- pull_request
- &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG"
- &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)"
- &mix-clean "mix deps.clean --all && mix clean"
labels:
platform: ${PLATFORM}
services:
postgres:
image: postgres:15
when:
event:
- pull_request
environment:
POSTGRES_DB: pleroma_test_${ELIXIR_VERSION}_${OTP_VERSION}
POSTGRES_USER: postgres
@ -67,18 +27,20 @@ services:
steps:
test:
image: akkoma/ci-base:${ELIXIR_VERSION}-otp${OTP_VERSION}
<<: *on-pr-open
environment:
MIX_ENV: test
POSTGRES_DB: pleroma_test_${ELIXIR_VERSION}_${OTP_VERSION}
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DB_HOST: postgres
LINT: ${LINT}
commands:
- sh -c 'uname -a && cat /etc/os-release || :'
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix compile
- test "${LINT}" = "NO" || mix format --check-formatted
- mix ecto.drop -f -q
- mix ecto.create
- mix ecto.migrate

View file

@ -4,20 +4,203 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased
## 2026.03
### BREAKING
- Elixir 1.14 is no longer suported, and it's EOL! Upgrade to Elixir 1.15+
- `account` entities in API responses now only contain a cut down version of their servers nodeinfo.
TEMPORARILY a config option is provided to serve the full nodeinfo data again.
HOWEVER this option WILL be removed soon. If you encounter any issues with third-party clients fixed
by using this setting, tell us so we can include all actually needed keys by default.
### REMOVED
### Added
- Mastodon-compatible translation endpoints are now supported too;
the older Akkoma endpoints are deprecated but no immediate plans for removal
- `GET pleroma/conversation/:id/statuses` now supports `with_muted`
- `POST /api/v1/statuses` accepts and now prefers the Mastodon-compatible `quoted_status_id` parameter for quoting a post
- `status` API entities now expose non-shallow quotes in a manner also compatible with Mastodon clients
- support for WebFinger backlinks in ActivityPub actors (FEP-2c59)
### Fixed
- pinning, muting or unmuting a status one is not allowed to access no longer leaks its content
- revoking a favourite on a post one lost access to no longer leaks its content
- user info updates again are actively federated to other servers;
this was accidentally broken in the previous release
- it is no longer possible to reference posts one cannot access when reporting another user
- streamed relationship updates no longer leak follow* counts for users who chose to hide their counts
- WebFinger data and user nicknames no longer allow non-consential associations
- Correctly setup custom WebFinger domains work again
- fix paths of emojis added or updated at runtime and remove emoji from runtime when deleting an entire pack without requiring a full emoji reload
- fix retraction of remote emoji reaction when id is not present or its domain differs from image host
- fix AP ids declared with the canonical type being ignored in XML WebFinger responses
- fix many, many bugs in the conversations API family
- notifications about muted entities are no longer streamed out
- non-UTF-8 usernames no longer lead to internal server errors in API endpoints
- when SimplePolicy rules are configured but the MRF not enabled, its rules no longer interfere with fetching
- fixed remote follow counter refresh on user (re)fetch
- remote users whose follow* counts are private are now actually shown as such in API instead of represeneting them with public zero counters
- fix local follow* collections counting and including AP IDs of deleted users
### Changed
- `PATCH /api/v1/pleroma/conversations/:id` now accepts update parameters via JSON body too
- it is now possible to quote local and ones own private posts provided a compatible scope is used
- on final activity failures the error log now includes the afected activity
- improved performance of `GET api/v1/custom_emoji`
- outgoing HTTP requests now accept compressed responses
- the system CA certificate store is now used by default
- when refreshing remote follow* stats all fetch-related erros are now treated as stats being private;
this avoids spurious error logs and better matches the intent of implementations serving fallback HTML responses on the AP collection endpoints
## 2025.12
### REMOVED
- DEPRECATE `/api/v1/timelines/direct`.
Technically this was already deprecated, given we extend mastodon 2.7.2 API
and Mastodon already deprecated it in 2.6.0 before removing it in 3.0.0.
But now we have concrete plans to remove this endpoint in a coming release.
The few remaining useres should switch to the conversations API.
- DEPRECATE `config :pleroma, :instance, skip_thread_containment: false`.
It is due to be removed in one of the next releases if no strong arguments for keeping it are brought up.
It is already semi-broken for large threads and conflicts with pending optimisation and cleanup work.
- support for `exclude_visibilities` in timeline and notification endpoints has been dropped
- support for list visibility / list addressing has been dropped due to lack of usage, maintenance burden and redundancy with the still supported explicit-addressing feature
- support for conversations addressing has been dropped due to lack of usage, maintenance burden and being mostly redundant with explicit addressing
- per-visibility status counters have been dropped from `/api/v1/pleroma/admin/stats`
due to unreasonably perf costs added on most database operations.
For now, the response still contains the fields, but with stubbed-out values.
### Added
- status responses include two new fields for ActivityPub cross-referencing: `akkoma.quote_apid` and `akkoma.in_reply_to_apid`
- attempting to reply to an already deleted post will return an error
(in akkoma-fe the error will be shown and your draft message retained so you can decide
for yourself whether to discard it or copy and repost as a, now intentional, new thread)
- the notification endpoint now supports the `types` parameter for filtering added in vanilla Mastodon
- the mute endpoint now supports the `duration` parameter added in vanilla Mastodon
(fixes temporary mutes created via e.g. Husky)
### Fixed
- replies and quotes to unresolvable posts now fill out IDs for replied to
status, user or quoted status with a 404-ing ID to make them recognisable as
replies/quotes instead of pretending theyre root posts
- querying a status using the ID of a non-post AP activity no longer displays
a duplicate of the post referenced by said activity with mangled author information
- fix users being able to interact (like, emoji react, ...) with posts they cannot access
- fix AP fetches of local non-Create, non-Undo activities exposing the raw, unsanitised content of the referenced object
- the above two combined allowed local users to gain access to private posts
of user they do not follow, but follow a follower of the author.
(remote users and other scenarios were to our knowledge not able to achieve this due to other restrictions)
- fix RSS and Atom feeds of hashtag timelines potentially exposing more information than Mastodon API when restricting unauthenticated API access
- fix mentioning and sending DMs to users with non-ASCII-alphanumerical usernames
- correctly hide and show inlined fallback links for quotes from Mastodon instances
- API requests with multiple unsupported parameters now will ignore all of them up to a certain limit.
If there are too many unsupported parameters this is indicated in the returned error message.
- expose generic type of attachment via Masto API if remote did not send a full MIME type but indicated a generic one
(the \*oma-specific full mime type field in the API response remains generic however, since we don't have this info)
- add back the default banner image we advertise in Masto API
- correctly redirect `/users/:nickname.rss` to the RSS instead of Atom feed
### Changed
- depreacted the `included_types` parameter in the notification endpoint; replaced by `types`
- depreacted the `expires_in` parameter in the mute endpoint; replaced by `duration`
- optimised emoji addition and removal
- emoji reloading now happens asynchronously so you won't run into timeout issues with many emoji and/or a slow disk
- upgraded all of our dependencies; this should reduce issues when running akoma with OTP28
- prefer "summary" over "name" for the attachment alt text of incoming ActivityPub documents;
this fixes alt text federation from GtS and Honk
- slightly improve index overhead for the users table
## 2025.10
### REMOVED
- Dropped `accepts_chat_messages` column from users table in database;
it has been unused for almost 3 years
- Healthcheck responses no longer contain job queue data;
it was useless anyway due to lacking any temporal information about failures
and more complete data can be obtained from Prometheus metrics.
### Added
- We mark our MFM posts as FEP-c16b compliant, and retain remote HTML representations for incoming posts marked as FEP-c16b-compliant. (Safety scrubbers are still applied)
- Prometheus stats now exposes failed ActivityPub deliveries
which failed all attempts and the failure reason
- status and user HTML pages now provide ActivityPub alternate links
- the `prune_objects` mix task no longer deletes pinned posts by default
- added `--prune-pinned` and `--keep-followed {posts,full,none}` options to the `prune_objects` mix task
- timestamps of incoming HTTP signatures are now verified.
By default up to two hour old signatures and a maximal clock skew
of 40 min for future timestamps or explicit expiry deadlines are accepted
- Added `short_description` field to `api/v1/instance` for Mastodon compatibility; the corresponding
new setting `:pleroma, :instance, :short_description` is also preferred for nodeinfo use
- Note AP objects now expose full `replies` collections and those collections can be accessed on their own;
previously only self-replies were inlined as an anonymous collection into the Note object
- Added a reference Grafana dashboard and improved documentation for Prometheus metrics
- New mix task `clean_inlined_replies` to delete some unused data from objects
- New mix task `resync_inlined_caches` to retroactively fix various issues with e.g. boosts, emoji reacts and likes
- It is now possible to allow outgoing requests to use HTTP2 via config option,
but due to bugs in the relevant backend this is not the default nor recommended.
- Prometheus metrics now expose count of scheduled and pending jobs per queue
### Fixed
- Internal actors no longer pretend to have unresolvable follow(er|ing) collections
- fixed user-level default post expiry duration overriding `expires_in` values explicitly passed during post creation
- fix crashes on non-UTF8 usernames for the API paths taking both nicknames and IDs
- fixed divergences in fields used to determine visibility;
this lead e.g. to unlisted replies from Pleroma instances being partially treated as private posts
- fixed our fetch actor advertising bogus follower and following collection ActivityPub IDs
- fix network-path references not being handled by media proxy
- federation with bridgy now works
- remote signing keys are no longer refreshed multiple times per incoming request
- fix digest emails never being sent and clogging the job queue even if not enabled
- `api/v1/instance`s `uri` field now correctly shows the bare WebFinger domain
- fixed bug leading to `content` and the `contentMap` entry of the primary language to sometimes diverge
- reloading emoji with a broken `pack.json` file being on disk no longer crashes the whole server
- fixed blocked servers being able to access local objects when authorized fetch isnt enabled
even when the remote server identifies itselfs
- fixed handling of inlined "featured" collections
- fixed user endpoint serving invalid ActivityPub for minimal, authfetch-fallback responses
- remote emoji reacts from IceShrimp.NET instances are now handled consistently and always merged with identical other emoji reactions
- ActivityPub requests signatures are now renewed when following redirects making sure path and host actually match the final URL
- private replies no longer increase the publicly visible reply counter
- unblock activities are no longer federated when block federation is disabled (the default)
- fix like activity database IDs rendering as misattributed posts
### Changed
- Internal and relay actors are now again represented with type "Application"
- `cleanup_attachments` is now enabled by default
- shared inboxes are now generally preferred over personal inboxes, cutting down on duplicate publishing churn
- instance actors are now really of type `Service`
- ActivityPub delivery attempts are spaced out more and increased by one
now giving up after 24h instead of ~20min by default before
- inboxes now fake a succcess reply on incoming Delete documents whose signing key is unknown but gone;
this prevents older Mastodon from repeatedly trying to deliver Deletes of actors we never knew anyway
- The config option `config :pleroma, :http, :pool_max_idle_time` was removed; it never actually
did anything and was redundant with `config :pleroma, :http, :pool_timeout` which actually works.
- repeated attempt to process incoming ActivityPub objects are spaced out more, allowing unreachable remotes
more time to come back up when e.g. processing repeats of a post not yet locally known
- `/api/v1/statuses/:id/reblog` now honours all possible visibilities except `list` and `conversation`
instead of mapping them down to a boolean private/public
- we no longer repeatedly try to deliver to explicitly deleted inboxes
- Config option `Pleroma.Web.MediaProxy.Invalidation.Http, :options` and
the `:http` subkey of `:media_proxy, :proxy_opts` now only accept
adapter-related settings inside the `:adapter` subkey, no longer on the top-level
- follow requests are now ordered reverse chronologically
## 2025.03
## Added
### Added
- Oban (worker) dashboard at `/akkoma/oban`
## Fixed
### Fixed
- fixed some holes in SigningKey verification potentially allowing they key-user mapping to be poisoned
- frontend ZIP files can no longer traverse to paths outside their install dir
- fixed user updates trying but failing to renew signing key information
- fixed signing key refresh on key rotation
## Changed
### Changed
- Dropped obsolete `ap_enabled` indicator from user table and associated buggy logic
- The remote user count in prometheus metrics is now an estimate instead of an exact number
since the latter proved unreasonably costly to obtain for a merely nice-to-have statistic
@ -31,12 +214,12 @@ Hotfix: Federation could break if a null value found its way into `should_federa
## 2025.01
## Added
### Added
- New config option `:instance, :cleanup_attachments_delay`
- It is now possible to display custom source URLs in akkoma-fe;
the settings are part of the frontend configuration
## Fixed
### Fixed
- Media proxy no longer attempts to proxy embedded images
- Fix significant uneccessary overhead of attachment cleanup;
it no longer attempts to cleanup attachments of deleted remote posts
@ -45,24 +228,24 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- ObjectAge policy no longer leaks belated DMs and follower-only posts
- the NodeINfo endpoint now uses the correct content type
## Changed
### Changed
- Anonymous objects now federate completely without an id
adopting a proposed AP spec errata and restoring federation
with e.g. IceShrimp.NET and fedify-based implementations
## 3.13.3
## BREAKING
### BREAKING
- Minimum PostgreSQL version is raised to 12
- Swagger UI moved from `/akkoma/swaggerui/` to `/pleroma/swaggerui/`
## Added
### Added
- Implement [FEP-67ff](https://codeberg.org/fediverse/fep/src/branch/main/fep/67ff/fep-67ff.md) (federation documentation)
- Meilisearch: it is now possible to use separate keys for search and admin actions
- New standalone `prune_orphaned_activities` mix task with configurable batch limit
- The `prune_objects` mix task now accepts a `--limit` parameter for initial object pruning
## Fixed
### Fixed
- Meilisearch: order of results returned from our REST API now actually matches how Meilisearch ranks results
- Emoji are now federated as anonymous objects, fixing issues with
some strict servers e.g. rejecting e.g. remote emoji reactions
@ -70,25 +253,25 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- Single-selection polls no longer expose the voter_count; MastoAPI demands it be null
and this confused some clients leading to vote distributions >100%
## Changed
### Changed
- Refactored Rich Media to cache the content in the database. Fetching operations that could block status rendering have been eliminated.
## 2024.04.1 (Security)
## Fixed
### Fixed
- Issue allowing non-owners to use media objects in posts
- Issue allowing use of non-media objects as attachments and crashing timeline rendering
- Issue allowing webfinger spoofing in certain situations
## 2024.04
## Added
### Added
- Support for [FEP-fffd](https://codeberg.org/fediverse/fep/src/branch/main/fep/fffd/fep-fffd.md) (proxy objects)
- Verified support for elixir 1.16
- Uploadfilter `Pleroma.Upload.Filter.Exiftool.ReadDescription` returns description values to the FE so they can pre fill the image description field
NOTE: this filter MUST be placed before `Exiftool.StripMetadata` to work
## Changed
### Changed
- Inbound pipeline error handing was modified somewhat, which should lead to less incomprehensible log spam. Hopefully.
- Uploadfilter `Pleroma.Upload.Filter.Exiftool` was replaced by `Pleroma.Upload.Filter.Exiftool.StripMetadata`;
the latter strips all non-essential metadata by default but can be configured.
@ -97,7 +280,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- MRF.InlineQuotePolicy now prefers to insert display URLs instead of ActivityPub IDs
- Old accounts are no longer listed in WebFinger as aliases; this was breaking spec
## Fixed
### Fixed
- Issue preventing fetching anything from IPv6-only instances
- Issue allowing post content to leak via opengraph tags despite :estrict\_unauthenticated being set
- Move activities no longer operate on stale user data
@ -113,17 +296,17 @@ Hotfix: Federation could break if a null value found its way into `should_federa
JSON-LD-compacted forms of public scope; affected e.g. federation with bovine
- Ratelimits encountered when fetching objects are now respected; 429 responses will cause a backoff when we get one.
## Removed
### Removed
- ActivityPub Client-To-Server write API endpoints have been disabled;
read endpoints are planned to be removed next release unless a clear need is demonstrated
## 2024.03
## Added
### Added
- CLI tasks best-effort checking for past abuse of the recent spoofing exploit
- new `:mrf_steal_emoji, :download_unknown_size` option; defaults to `false`
## Changed
### Changed
- `Pleroma.Upload, :base_url` now MUST be configured explicitly if used;
use of the same domain as the instance is **strongly** discouraged
- `:media_proxy, :base_url` now MUST be configured explicitly if used;
@ -139,7 +322,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- Uploads, emoji and media proxy now restrict Content-Type headers to a safe subset
- Akkoma will no longer fetch and parse objects hosted on the same domain
## Fixed
### Fixed
- Critical security issue allowing Akkoma to be used as a vector for
(depending on configuration) impersonation of other users or creation
of bogus users and posts on the upload domain
@ -152,7 +335,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- our litepub JSON-LD schema is now served with the correct content type
- remote APNG attachments are now recognised as images
## Upgrade Notes
### Upgrade Notes
- As mentioned in "Changed", `Pleroma.Upload, :base_url` **MUST** be configured. Uploads will fail without it.
- Akkoma will refuse to start if this is not set.
@ -160,20 +343,20 @@ Hotfix: Federation could break if a null value found its way into `should_federa
## 2024.02
## Added
### Added
- Full compatibility with Erlang OTP26
- handling of GET /api/v1/preferences
- Akkoma API is now documented
- ability to auto-approve follow requests from users you are already following
- The SimplePolicy MRF can now strip user backgrounds from selected remote hosts
## Changed
### Changed
- OTP builds are now built on erlang OTP26
- The base Phoenix framework is now updated to 1.7
- An `outbox` field has been added to actor profiles to comply with AP spec
- User profile backgrounds do now federate with other Akkoma instances and Sharkey
## Fixed
### Fixed
- Documentation issue in which a non-existing nginx file was referenced
- Issue where a bad inbox URL could break federation
- Issue where hashtag rel values would be scrubbed
@ -181,7 +364,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
## 2023.08
## Added
### Added
- Added a new configuration option to the MediaProxy feature that allows the blocking of specific domains from using the media proxy or being explicitly allowed by the Content-Security-Policy.
- Please make sure instances you wanted to block media from are not in the MediaProxy `whitelist`, and instead use `blocklist`.
@ -194,7 +377,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- OTP26 is currently "unsupported". It will probably work, but due to the way
it handles map ordering, the test suite will not pass for it as yet.
## Changed
### Changed
- Alpine OTP builds are now from alpine 3.18, which is OpenSSLv3 compatible.
If you use alpine OTP builds you will have to update your local system.
@ -205,19 +388,19 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- Blocks/Mutes now return from max ID to min ID, in line with mastodon.
- The AnonymizeFilename filter is now enabled by default.
## Fixed
### Fixed
- Deactivated users can no longer show up in the emoji reaction list
- Embedded posts can no longer bypass `:restrict\_unauthenticated`
- GET/HEAD requests will now work when requesting AWS-based instances.
## Security
### Security
- Add `no_new_privs` hardening to OpenRC and systemd service files
- XML parsers cannot load any entities (thanks @Mae@is.badat.dev!)
- Reduced permissions of config files and directories, distros requiring greater permissions like group-read need to pre-create the directories
## Removed
### Removed
- Builds for debian oldstable (bullseye)
- If you are on oldstable you should NOT attempt to update OTP builds without
@ -225,7 +408,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
## 2023.05
## Added
### Added
- Custom options for users to accept/reject private messages
- options: everybody, nobody, people\_i\_follow
- MRF to reject notes from accounts newer than a given age
@ -233,16 +416,16 @@ Hotfix: Federation could break if a null value found its way into `should_federa
post gets boosted outside of your local bubble and people your instance
does not know about reply to it.
## Fixed
### Fixed
- Support for `streams` public key URIs
- Bookmarks are cleaned up on DB prune now
## Security
### Security
- Fixed mediaproxy being a bit of a silly billy
## 2023.04
## Added
### Added
- Nodeinfo keys for unauthenticated timeline visibility
- Option to disable federated timeline
- Option to make the bubble timeline publicly accessible
@ -256,7 +439,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
## 2023.03
## Fixed
### Fixed
- Allowed contentMap to be updated on edit
- Filter creation now accepts expires\_at
@ -316,7 +499,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
## 2022.12
## Added
### Added
- Config: HTTP timeout options, :pool\_timeout and :receive\_timeout
- Added statistic gathering about instances which do/don't have signed fetches when they request from us
- Ability to set a default post expiry time, after which the post will be deleted. If used in concert with ActivityExpiration MRF, the expiry which comes _sooner_ will be applied.
@ -326,7 +509,7 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- Option to extend `reject` in MRF-Simple to apply to entire threads, where the originating instance is rejected
- Extra information to failed HTTP requests
## Changed
### Changed
- MastoAPI: Accept BooleanLike input on `/api/v1/accounts/:id/follow` (fixes follows with mastodon.py)
- Relays from akkoma are now off by default
- NormalizeMarkup MRF is now on by default
@ -335,30 +518,30 @@ Hotfix: Federation could break if a null value found its way into `should_federa
- Overhauled static-fe view for logged-out users
- Blocked instances will now not be sent _any_ requests, even fetch ones that would get rejected by MRF anyhow
## Removed
### Removed
- FollowBotPolicy
- Passing of undo/block into MRF
## Upgrade Notes
### Upgrade Notes
- If you have an old instance, you will probably want to run `mix pleroma.database prune_task` in the foreground to catch it up with the history of your instance.
## 2022.11
## Added
### Added
- Officially supported docker release
- Ability to remove followers unilaterally without a block
- Scraping of nodeinfo from remote instances to display instance info
- `requested_by` in relationships when the user has requested to follow you
## Changed
### Changed
- Follows no longer override domain blocks, a domain block is final
- Deletes are now the lowest priority to publish and will be handled after creates
- Domain blocks are now subdomain-matches by default
## Fixed
### Fixed
- Registrations via ldap are now compatible with the latest OTP24
## Update notes
### Update notes
- If you use LDAP and run from source, please update your elixir/erlang
to the latest. The changes in OTP24.3 are breaking.
- You can now remove the leading `*.` from domain blocks, but you do not have to.
@ -1678,7 +1861,7 @@ curl -Lo ./bin/pleroma_ctl 'https://git.pleroma.social/pleroma/pleroma/raw/devel
- User-Agent is now sent correctly for all HTTP requests.
- MRF: Simple policy now properly delists imported or relayed statuses
## Removed
### Removed
- Configuration: `config :pleroma, :fe` in favor of the more flexible `config :pleroma, :frontend_configurations`
## [0.9.99999] - 2019-05-31

View file

@ -10,6 +10,7 @@
## Supported FEPs
- [FEP-67ff: FEDERATION](https://codeberg.org/fediverse/fep/src/branch/main/fep/67ff/fep-67ff.md)
- [FEP-2c59: Discovery of a Webfinger address from an ActivityPub actor](https://codeberg.org/fediverse/fep/src/branch/main/fep/2c59/fep-2c59.md)
- [FEP-dc88: Formatting Mathematics](https://codeberg.org/fediverse/fep/src/branch/main/fep/dc88/fep-dc88.md)
- [FEP-f1d5: NodeInfo in Fediverse Software](https://codeberg.org/fediverse/fep/src/branch/main/fep/f1d5/fep-f1d5.md)
- [FEP-fffd: Proxy Objects](https://codeberg.org/fediverse/fep/src/branch/main/fep/fffd/fep-fffd.md)
@ -34,7 +35,23 @@ Depending on instance configuration the same may be true for GET requests.
### FEP-c16b: Formatting MFM functions
The optional extension term `htmlMfm` is currently not used.
We set the optional extension term `htmlMfm: true` when using content type "text/x.misskeymarkdown".
Incoming messages containing `htmlMfm: true` will not have their content re-parsed.
## WebFinger
Akkoma requires WebFinger implmentations to respond to queries about a given user both when
`acct:user@domain` or the canonical ActivityPub id of the actor is passed as the `resource`.
Akkoma strongly encourages ActivityPub implementations to include
a FEP-2c59-compliant WebFinger backlink in their actor documents.
Without FEP-2c59 and if different domains are used for ActivityPub and the Webfinger subject,
Akkoma relies on the presence of an host-meta LRDD template on the ActivityPub domain
or a HTTP redirect from the ActivityPub domains `/.well-known/webfinger` to an equivalent endpoint
on the domain used in the `subject` to discover and validate the domain association.
Without FEP-2c59 Akkoma may not become aware of changes to the
preferred WebFinger `subject` domain for already discovered users.
## Nodeinfo

View file

@ -53,7 +53,7 @@ defmodule Pleroma.LoadTesting.Fetcher do
fetch_public_timeline(user, :local)
fetch_public_timeline(user, :tag)
fetch_notifications(user)
fetch_favourites(user)
fetch_favourited_with_fav_id(user)
fetch_long_thread(user)
fetch_timelines_with_reply_filtering(user)
end
@ -378,21 +378,21 @@ defmodule Pleroma.LoadTesting.Fetcher do
end
defp fetch_favourites(user) do
first_page_last = ActivityPub.fetch_favourites(user) |> List.last()
first_page_last = ActivityPub.fetch_favourited_with_fav_id(user) |> List.last()
second_page_last =
ActivityPub.fetch_favourites(user, %{:max_id => first_page_last.id}) |> List.last()
ActivityPub.fetch_favourited_with_fav_id(user, %{:max_id => first_page_last.id}) |> List.last()
third_page_last =
ActivityPub.fetch_favourites(user, %{:max_id => second_page_last.id}) |> List.last()
ActivityPub.fetch_favourited_with_fav_id(user, %{:max_id => second_page_last.id}) |> List.last()
forth_page_last =
ActivityPub.fetch_favourites(user, %{:max_id => third_page_last.id}) |> List.last()
ActivityPub.fetch_favourited_with_fav_id(user, %{:max_id => third_page_last.id}) |> List.last()
Benchee.run(
%{
"Favourites" => fn opts ->
ActivityPub.fetch_favourites(user, opts)
ActivityPub.fetch_favourited_with_fav_id(user, opts)
end
},
inputs: %{
@ -465,7 +465,8 @@ defmodule Pleroma.LoadTesting.Fetcher do
notifications = MastodonAPI.get_notifications(user, opts)
favourites = ActivityPub.fetch_favourites(user)
favourites_keyed = ActivityPub.fetch_favourited_with_fav_id(user)
favourites = Pagiation.unwrap(favourites_keyed)
Benchee.run(
%{

View file

@ -1,7 +1,6 @@
FROM elixir:1.9.4
RUN apt-get update &&\
apt-get install -y libmagic-dev cmake libimage-exiftool-perl ffmpeg &&\
mix local.hex --force &&\
mix local.rebar --force
ARG TAG
FROM docker.io/hexpm/elixir:${TAG}
RUN apk update
RUN apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick ffmpeg perl-image-exiftool exiftool
RUN mkdir /src
WORKDIR /src

2
ci/build-all.sh Executable file
View file

@ -0,0 +1,2 @@
./build.sh 1.15-otp25 1.15.8-erlang-25.3.2.18-alpine-3.22.2
./build.sh 1.19-otp28 1.19-erlang-28.0-alpine-3.23.2

3
ci/build.sh Executable file
View file

@ -0,0 +1,3 @@
echo "Building $1 using image tag $2"
docker build -t docker.io/akkoma/ci-base:$1 --build-arg=version=$1 --build-arg=TAG=$2 .
docker push docker.io/akkoma/ci-base:$1

View file

@ -1 +0,0 @@
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t git.pleroma.social:5050/pleroma/pleroma/ci-base:latest --push .

View file

@ -74,8 +74,6 @@ rum_enabled = System.get_env("RUM_ENABLED") == "true"
config :pleroma, :database, rum_enabled: rum_enabled
IO.puts("RUM enabled: #{rum_enabled}")
config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
if File.exists?("./config/benchmark.secret.exs") do
import_config "benchmark.secret.exs"
else

View file

@ -51,6 +51,11 @@ config :pleroma, Pleroma.Repo,
queue_target: 20_000,
migration_lock: nil
# password hash strength
config :argon2_elixir,
t_cost: 8,
parallelism: 2
config :pleroma, Pleroma.Captcha,
enabled: true,
seconds_valid: 300,
@ -181,20 +186,22 @@ config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}
# Configures http settings, upstream proxy etc.
config :pleroma, :http,
pool_timeout: :timer.seconds(5),
pool_timeout: :timer.seconds(60),
receive_timeout: :timer.seconds(15),
proxy_url: nil,
protocols: [:http1],
user_agent: :default,
pool_size: 10,
adapter: [],
# see: https://hexdocs.pm/finch/Finch.html#start_link/1
pool_max_idle_time: :timer.seconds(30)
adapter: []
config :pleroma, :instance,
name: "Akkoma",
email: "example@example.com",
notify_email: "noreply@example.com",
# allowed to use HTML (if short_description is set)
description: "Akkoma: The cooler fediverse server",
# only plain text (defaults to description)
short_description: nil,
background_image: "/images/city.jpg",
instance_thumbnail: "/instance/thumbnail.jpeg",
limit: 5_000,
@ -242,6 +249,7 @@ config :pleroma, :instance,
remote_post_retention_days: 90,
skip_thread_containment: true,
limit_to_local_content: :unauthenticated,
filter_embedded_nodeinfo: true,
user_bio_length: 5000,
user_name_length: 100,
max_account_fields: 10,
@ -251,7 +259,7 @@ config :pleroma, :instance,
registration_reason_length: 500,
external_user_synchronization: true,
extended_nickname_format: true,
cleanup_attachments: false,
cleanup_attachments: true,
cleanup_attachments_delay: 1800,
multi_factor_authentication: [
totp: [
@ -578,6 +586,7 @@ config :pleroma, Oban,
remote_fetcher: 2,
attachments_cleanup: 1,
new_users_digest: 1,
digest_emails: 1,
mute_expire: 5,
search_indexing: 10,
nodeinfo_fetcher: 1,
@ -598,7 +607,7 @@ config :pleroma, Oban,
config :pleroma, :workers,
retries: [
federator_incoming: 5,
federator_outgoing: 5,
federator_outgoing: 6,
search_indexing: 2,
rich_media_backfill: 1
],
@ -773,7 +782,9 @@ config :pleroma, :frontends,
available: %{
"pleroma-fe" => %{
"name" => "pleroma-fe",
"git" => "https://akkoma.dev/AkkomaGang/pleroma-fe",
"blind_trust" => true,
"git" => "https://akkoma.dev/AkkomaGang/akkoma-fe",
"bugtracker" => "https://akkoma.dev/AkkomaGang/akkoma-fe/issues",
"build_url" =>
"https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/akkoma-fe.zip",
"ref" => "stable",
@ -782,7 +793,9 @@ config :pleroma, :frontends,
# Mastodon-Fe cannot be set as a primary - this is only here so we can update this seperately
"mastodon-fe" => %{
"name" => "mastodon-fe",
"blind_trust" => true,
"git" => "https://akkoma.dev/AkkomaGang/masto-fe",
"bugtracker" => "https://akkoma.dev/AkkomaGang/masto-fe/issues",
"build_url" =>
"https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/masto-fe.zip",
"build_dir" => "distribution",
@ -790,7 +803,9 @@ config :pleroma, :frontends,
},
"fedibird-fe" => %{
"name" => "fedibird-fe",
"blind_trust" => true,
"git" => "https://akkoma.dev/AkkomaGang/fedibird-fe",
"bugtracker" => "https://akkoma.dev/AkkomaGang/fedibird-fe/issues",
"build_url" =>
"https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/fedibird-fe.zip",
"build_dir" => "distribution",
@ -798,7 +813,9 @@ config :pleroma, :frontends,
},
"admin-fe" => %{
"name" => "admin-fe",
"blind_trust" => true,
"git" => "https://akkoma.dev/AkkomaGang/admin-fe",
"bugtracker" => "https://akkoma.dev/AkkomaGang/admin-fe/issues",
"build_url" =>
"https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/admin-fe.zip",
"ref" => "stable"
@ -806,10 +823,31 @@ config :pleroma, :frontends,
# For developers - enables a swagger frontend to view the openapi spec
"swagger-ui" => %{
"name" => "swagger-ui",
"blind_trust" => true,
"git" => "https://github.com/swagger-api/swagger-ui",
# API spec definitions are part of the backend (and the swagger-ui build outdated)
"bugtracker" => "https://akkoma.dev/AkkomaGang/akkoma/issues",
"build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/swagger-ui.zip",
"build_dir" => "dist",
"ref" => "stable"
},
# Third-party frontends
"pleroma-fe-vanilla" => %{
"name" => "pleroma-fe-vanilla",
"git" => "https://git.pleroma.social/pleroma/pleroma-fe/",
"build_url" =>
"https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
"ref" => "develop",
"build_dir" => "dist",
"bugtracker" => "https://git.pleroma.social/pleroma/pleroma-fe/-/issues"
},
"pl-fe" => %{
"name" => "pl-fe",
"git" => "https://codeberg.org/mkljczk/pl-fe",
"build_url" => "https://pl.mkljczk.pl/pl-fe.zip",
"ref" => "develop",
"build_dir" => ".",
"bugtracker" => "https://codeberg.org/mkljczk/pl-fe/issues"
}
}
@ -866,7 +904,11 @@ config :pleroma, ConcurrentLimiter, [
{Pleroma.Search, [max_running: 30, max_waiting: 50]}
]
config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
config :pleroma, Pleroma.Web.WebFinger,
domain: nil,
# this _forces_ a nickname rediscovery and validation, otherwise only updates when detecting a change
# TODO: default this to false after the fallout from recent WebFinger bugs is healed
update_nickname_on_user_fetch: true
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch

View file

@ -61,6 +61,18 @@ frontend_options = [
type: :string,
description: "The directory inside the zip file "
},
%{
key: "blind_trust",
label: "Blindly trust frontend devs?",
type: :boolean,
description: "Do NOT change this unless youre really sure"
},
%{
key: "bugtracker",
label: "Bug tracker",
type: :string,
description: "Where to report bugs (for third-party FEs)"
},
%{
key: "custom-http-headers",
label: "Custom HTTP headers",
@ -298,7 +310,7 @@ config :pleroma, :config_description, [
key: :ssl,
label: "Use SSL",
type: :boolean,
description: "Use Implicit SSL/TLS. e.g. port 465"
description: "Use Implicit SSL/TLS. e.g. port 465; default: true"
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
@ -566,7 +578,16 @@ config :pleroma, :config_description, [
key: :description,
type: :string,
description:
"The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
"The instance's description. It may use HTML and can be seen in `/api/v1/instance` and nodeifno if no short description is set",
suggestions: [
"Very cool instance"
]
},
%{
key: :short_description,
type: :string,
description:
"A brief instance description. It must be plain text and can be seen in `/api/v1/instance` and nodeinfo",
suggestions: [
"Very cool instance"
]
@ -3241,8 +3262,7 @@ config :pleroma, :config_description, [
suggestions: [
Pleroma.Web.Preload.Providers.Instance,
Pleroma.Web.Preload.Providers.User,
Pleroma.Web.Preload.Providers.Timelines,
Pleroma.Web.Preload.Providers.StatusNet
Pleroma.Web.Preload.Providers.Timelines
]
}
]
@ -3475,7 +3495,7 @@ config :pleroma, :config_description, [
key: :module,
type: :module,
description: "Translation module.",
suggestions: {:list_behaviour_implementations, Pleroma.Akkoma.Translator}
suggestions: {:list_behaviour_implementations, Pleroma.Akkoma.Translator.Provider}
}
]
},

View file

@ -129,9 +129,7 @@ config :pleroma, :cachex, provider: Pleroma.CachexMock
config :pleroma, Pleroma.Web.WebFinger, update_nickname_on_user_fetch: false
config :pleroma, :side_effects,
ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
logger: Pleroma.LoggerMock
config :pleroma, :side_effects, ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch

View file

@ -15,7 +15,7 @@ source venv/bin/activate
pip install -r requirements.txt
# Run an http server who rebuilds when files change
# Accessable on http://127.0.0.1:8000
# Accessible on http://127.0.0.1:8000
mkdocs serve
# Build the docs

View file

@ -1,4 +1,4 @@
# Transfering the config to/from the database
# Transferring the config to/from the database
{! administration/CLI_tasks/general_cli_task_info.include !}
@ -34,9 +34,9 @@
Options:
- `<path>` - where to save migrated config. E.g. `--path=/tmp`. If file saved into non standart folder, you must manually copy file into directory where Pleroma can read it. For OTP install path will be `PLEROMA_CONFIG_PATH` or `/etc/akkoma`. For installation from source - `config` directory in the akkoma folder.
- `<env>` - environment, for which is migrated config. By default is `prod`.
- To delete transferred settings from database optional flag `-d` can be used
- `<path>` - where to save migrated config. E.g. `--path=/tmp`. If the file was saved into a non-standard directory, you must manually copy it into a location where Pleroma can read it. For OTP the install path will be `PLEROMA_CONFIG_PATH` or `/etc/akkoma`. For installation from source its the `config` directory in the akkoma folder.
- `<env>` - environment, for which is migrated config. By default, its `prod`.
- To delete transferred settings from database the optional flag `-d` can be used
=== "OTP"
```sh
@ -48,7 +48,7 @@ Options:
mix pleroma.config migrate_from_db [--env=<env>] [-d] [--path=<path>]
```
## Dump all of the config settings defined in the database
## Dump all config settings defined in the database
=== "OTP"
@ -172,15 +172,16 @@ it may be easier to dump the values to JSON and then modify them in a text edito
=== "From Source"
```sh
mix pleroma.config dump_to_file group key path
mix pleroma.config dump_to_file group key path
# For example, to dump the MRF simple configuration:
mix pleroma.config dump_to_file pleroma mrf_simple /tmp/mrf_simple.json
```
## Loading specific configuration values from JSON
**Note:** This will overwrite any existing value in the database, and can
cause crashes if you do not have exactly the correct formatting.
!!!note
This will overwrite any existing value in the database, and can
cause crashes if you do not have exactly the correct formatting.
Once you have modified the JSON file, you can load it back into the database.
@ -200,6 +201,7 @@ Once you have modified the JSON file, you can load it back into the database.
mix pleroma.config load_from_file /tmp/mrf_simple.json
```
**NOTE** an instance reboot is needed for many changes to take effect,
you may want to visit `/api/v1/pleroma/admin/restart` on your instance
to soft-restart the instance.
!!! note
An instance reboot is needed for many changes to take effect,
you may want to visit `/api/v1/pleroma/admin/restart` on your instance
to soft-restart the instance.

View file

@ -7,7 +7,7 @@
## Replace embedded objects with their references
Replaces embedded objects with references to them in the `objects` table. Only needs to be ran once if the instance was created before Pleroma 1.0.5. The reason why this is not a migration is because it could significantly increase the database size after being ran, however after this `VACUUM FULL` will be able to reclaim about 20% (really depends on what is in the database, your mileage may vary) of the db size before the migration.
Replaces embedded objects with references to them in the `objects` table. Only needs to be ran once if the instance was created before Pleroma 1.0.5. The reason why this is not a migration is because it could significantly increase the database size after being ran, however after this `VACUUM FULL` will be able to reclaim about 20% (really depends on what is in the database, your mileage may vary) of the database size before the migration.
=== "OTP"
@ -26,13 +26,19 @@ Replaces embedded objects with references to them in the `objects` table. Only n
## Prune old remote posts from the database
This will prune remote posts older than 90 days (configurable with [`config :pleroma, :instance, remote_post_retention_days`](../../configuration/cheatsheet.md#instance)) from the database. Pruned posts may be refetched in some cases.
This will selectively prune remote posts older than 90 days (configurable with [`config :pleroma, :instance, remote_post_retention_days`](../../configuration/cheatsheet.md#instance)) from the database. Pruned posts may be refetched in some cases.
!!! note
The disk space will only be reclaimed after a proper vacuum. By default Postgresql does this for you on a regular basis, but if your instance has been running for a long time and there are many rows deleted, it may be advantageous to use `VACUUM FULL` (e.g. by using the `--vacuum` option).
The disk space used up by deleted rows only becomes usable for new data after a vaccum.
By default, Postgresql does this for you on a regular basis, but if you delete a lot at once
it might be advantageous to also manually kick off a vacuum and statistics update using `VACUUM ANALYZE`.
**However**, the freed up space is never returned to the operating system unless you run
the much more heavy `VACUUM FULL` operation. This epensive but comprehensive vacuum mode
can be schedlued using the `--vacuum` option.
!!! danger
You may run out of disk space during the execution of the task or vacuuming if you don't have about 1/3rds of the database size free. Vacuum causes a substantial increase in I/O traffic, and may lead to a degraded experience while it is running.
You may run out of disk space during the execution of the task or full vacuuming if you don't have about 1/3rds of the database size free. `VACUUM FULL` causes a substantial increase in I/O traffic, needs full table locks and thus renders the instance basically unusable while its running.
=== "OTP"
@ -48,10 +54,41 @@ This will prune remote posts older than 90 days (configurable with [`config :ple
### Options
- `--keep-threads` - Don't prune posts when they are part of a thread where at least one post has seen local interaction (e.g. one of the posts is a local post, or is favourited by a local user, or has been repeated by a local user...). It also wont delete posts when at least one of the posts in that thread is kept (e.g. because one of the posts has seen recent activity).
The recommended starting point and configuration for small and medium-sized instances is:
```sh
prune_objects --keep-followed posts --keep-threads --keep-non-public
# followed by
prune_orphaned_activities --no-singles
prune_orphaned_activities --no-arrays
# and finally, using psql to manually run:
# VACUUM ANALYZE;
# REINDEX TABLE objects;
# REINDEX TABLE activities;
```
This almost certainly wont delete stuff your interested in and
makes sure the database is immediately utilising the newly freed up space.
If you need more aggressive database size reductions or if this proves too costly to run for you
you can drop restrictions and/or use the `--limit` option.
In the opposite case if everything goes through quickly,
you can combine the three CLI tasks into one for future runs using `--prune-orphaned-activities`
and perhaps even using a full vacuum (which implies a reindex) using `--vacuum` too.
Full details below:
- `--no-fix-replies-count` - Skip recalculating replies count for posts.
When using multiple batches of prunes with `--limit`, all but the last batch
should set this option to avoid unnecessary overhead.
- `--keep-followed <mode>` - If set to `posts` all posts and boosts of users with local follows will be kept.
If set to `full` it will additionally keep any posts such users interacted with; this requires `--keep-threads`.
By default this is set to `none` and followed users are not treated special.
- `--keep-threads` - Don't prune posts when they are part of a thread where at least one post has seen local interaction (e.g. one of the posts is a local post, or is favourited by a local user, or has been repeated by a local user...). It also wont delete posts when at least one of the posts in the thread has seen recent activity or is kept due to `--keep-followed`.
- `--keep-non-public` - Keep non-public posts like DM's and followers-only, even if they are remote.
- `--limit` - limits how many remote posts get pruned. This limit does **not** apply to any of the follow up jobs. If wanting to keep the database load in check it is thus advisable to run the standalone `prune_orphaned_activities` task with a limit afterwards instead of passing `--prune-orphaned-activities` to this task.
See documentation of other options for futher hints.
- `--prune-orphaned-activities` - Also prune orphaned activities afterwards. Activities are things like Like, Create, Announce, Flag (aka reports)... They can significantly help reduce the database size.
- `--prune-pinned` - Also prune pinned posts; keeping pinned posts does not suffice to protect their threads from pruning, even when using `--keep-threads`.
Note, if using this option and pinned posts are pruned, they and their threads will just be refetched on the next user update. Therefore it usually doesn't bring much gain while incurring a heavy fetch load after pruning.
One exception to this is if you already need to use a relatively small `--limit` to keep downtime mangeable or even being able to run it without downtime. Retaining pinned posts adds a mostly constant overhead which will impact repeated runs with small limit much more than one full prune run.
- `--vacuum` - Run `VACUUM FULL` after the objects are pruned. This should not be used on a regular basis, but is useful if your instance has been running for a long time before pruning.
## Prune orphaned activities from the database
@ -130,7 +167,7 @@ Can be safely re-run
## Vacuum the database
!!! note
By default Postgresql has an autovacuum deamon running. While the tasks described here can help in some cases, they shouldn't be needed on a regular basis. See [the Postgresql docs on vacuuming](https://www.postgresql.org/docs/current/sql-vacuum.html) for more information on this.
By default, Postgresql has an autovacuum daemon running. While the tasks described here can help in some cases, they shouldn't be needed on a regular basis. See [the Postgresql docs on vacuuming](https://www.postgresql.org/docs/current/sql-vacuum.html) for more information on this.
### Analyze
@ -150,7 +187,7 @@ Running an `analyze` vacuum job can improve performance by updating statistics u
### Full
Running a `full` vacuum job rebuilds your entire database by reading all of the data and rewriting it into smaller
Running a `full` vacuum job rebuilds your entire database by reading all data and rewriting it into smaller
and more compact files with an optimized layout. This process will take a long time and use additional disk space as
it builds the files side-by-side the existing database files. It can make your database faster and use less disk space,
but should only be run if necessary. **It is safe to cancel this.**
@ -183,7 +220,7 @@ but should only be run if necessary. **It is safe to cancel this.**
## Change Text Search Configuration
Change `default_text_search_config` for database and (if necessary) text_search_config used in index, then rebuild index (it may take time).
Change `default_text_search_config` for database and (if necessary) text_search_config used in index, then rebuild index (it may take time).
=== "OTP"
@ -202,9 +239,9 @@ See [PostgreSQL documentation](https://www.postgresql.org/docs/current/textsearc
## Pruning old activities
Over time, transient `Delete` activities and `Tombstone` objects
can accumulate in your database, inflating its size. This is not ideal.
There is a periodic task to prune these transient objects,
but on first run this may take a while on older instances to catch up
can accumulate in your database, inflating its size. This is not ideal.
There is a periodic task to prune these transient objects,
but on the first run this may take a while on older instances to catch up
to the current day.
=== "OTP"
@ -218,3 +255,48 @@ to the current day.
```sh
mix pleroma.database prune_task
```
## Clean inlined replies lists
Those inlined arrays of replies AP IDs are not used (anymore).
Delete them to free up a little bit of space.
=== "OTP"
```sh
./bin/pleroma_ctl database clean_inlined_replies
```
=== "From Source"
```sh
mix pleroma.database clean_inlined_replies
```
## Resync data inlined into posts
For legacy and performance reasons some data, e.g. relating to likes and boosts,
is currently copied and inline references post objects. Occasionally this data
may desync from the actual authorative activity and object data stored in the
database which may lead to cosmetic but also functional issues.
For example a particular user may appear unable to like a post.
Run this task to detect and fix such desyncs.
=== "OTP"
```sh
./bin/pleroma_ctl database resync_inlined_caches
```
=== "From Source"
```sh
mix pleroma.database resync_inlined_caches
```
### Options
- `--no-announcements` - Skip fixing announcement counters and lists
- `--no-likes` - Skip fixing like counters and lists
- `--no-reactions` - Skip fixing inlined emoji reaction data
- `--no-replies-count` - Skip fixing replies counters (purely cosmetic)

View file

@ -26,5 +26,5 @@ from the perspective of another given user.
`./bin/pleroma_ctl diagnostics user_timeline <nickname> <viewing_nickname>`
=== "From Source"
`mix pleroma.diagnostics user_timeline <nickname> <viewing_nickname>`
`mix pleroma.diagnostics user_timeline <nickname> <viewing_nickname>`

View file

@ -16,7 +16,6 @@
mix pleroma.digest test <nickname> [since_date]
```
Example:
=== "OTP"
@ -30,4 +29,3 @@ Example:
```sh
mix pleroma.digest test donaldtheduck 2019-05-20
```

View file

@ -1,4 +1,4 @@
# EMail administration tasks
# Email administration tasks
{! administration/CLI_tasks/general_cli_task_info.include !}

View file

@ -14,9 +14,8 @@
mix pleroma.emoji ls-packs [option ...]
```
### Options
- `-m, --manifest PATH/URL` - path to a custom manifest, it can either be an URL starting with `http`, in that case the manifest will be fetched from that address, or a local path
- `-m, --manifest PATH/URL` - path to a custom manifest, it can either be a URL starting with `http`, in that case the manifest will be fetched from that address, or a local path
## Fetch, verify and install the specified packs from the manifest into `STATIC-DIR/emoji/PACK-NAME`

View file

@ -12,14 +12,14 @@
mix pleroma.frontend install <frontend> [--ref <ref>] [--file <file>] [--build-url <build-url>] [--path <path>] [--build-dir <build-dir>]
```
Frontend can be installed either from local zip file, or automatically downloaded from the web.
Frontend can be installed either from a local ZIP file, or automatically downloaded from the web.
You can give all the options directly on the command line, but missing information will be filled out by looking at the data configured under `frontends.available` in the config files.
Currently, known `<frontend>` values are:
- [admin-fe](https://akkoma.dev/AkkomaGang/admin-fe)
- [mastodon-fe](https://akkoma.dev/AkkomaGang/masto-fe)
- [masto-fe](https://akkoma.dev/AkkomaGang/masto-fe)
- [pleroma-fe](https://akkoma.dev/AkkomaGang/pleroma-fe)
You can still install frontends that are not configured, see below.
@ -42,7 +42,7 @@ For a frontend configured under the `available` key, it's enough to install it b
This will download the latest build for the pre-configured `ref` and install it. It can then be configured as the one of the served frontends in the config file (see `primary` or `admin`).
You can override any of the details. To install an Akkoma-FE build from a different URL, you could do this:
You can override any of the details. To install an akkoma-fe build from a different URL, you could do this:
=== "OTP"
@ -56,7 +56,7 @@ You can override any of the details. To install an Akkoma-FE build from a differ
mix pleroma.frontend install pleroma-fe --ref 2hu_edition --build-url https://example.org/raymoo.zip
```
Similarly, you can also install from a local zip file.
Similarly, you can also install from a local ZIP file.
=== "OTP"
@ -90,5 +90,4 @@ The installation process is the same, but you will have to give all the needed o
mix pleroma.frontend install gensokyo --ref master --build-url https://gensokyo.2hu/builds/marisa.zip
```
If you don't have a zip file but just want to install a frontend from a local path, you can simply copy the files over a folder of this template: `${instance_static}/frontends/${name}/${ref}`.
If you don't have a ZIP file but just want to install a frontend from a local path, you can simply copy the files over a folder of this template: `${instance_static}/frontends/${name}/${ref}`.

View file

@ -1,5 +1,5 @@
Every command should be ran as the `akkoma` user from it's home directory. For example if you are superuser, you would have to wrap the command in `su akkoma -s $SHELL -lc "$COMMAND"`.
Every command should be ran as the `akkoma` user from its home directory. For example if you are superuser, you would have to wrap the command in `su akkoma -s $SHELL -lc "$COMMAND"`.
??? note "From source note about `MIX_ENV`"
The `mix` command should be prefixed with the name of environment your Akkoma server is running in, usually it's `MIX_ENV=prod`
The `mix` command should be prefixed with the name of the environment your Akkoma server is running in, usually it's `MIX_ENV=prod`

View file

@ -15,7 +15,6 @@
mix pleroma.instance gen [option ...]
```
If any of the options are left unspecified, you will be prompted interactively.
### Options
@ -35,11 +34,11 @@ If any of the options are left unspecified, you will be prompted interactively.
- `--db-configurable <Y|N>` - Allow/disallow configuring instance from admin part
- `--uploads-dir <path>` - the directory uploads go in when using a local uploader
- `--static-dir <path>` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)
- `--listen-ip <ip>` - the ip the app should listen to, defaults to 127.0.0.1
- `--listen-ip <ip>` - the IP the app should listen to, defaults to 127.0.0.1
- `--listen-port <port>` - the port the app should listen to, defaults to 4000
- `--strip-uploads-metadata <Y|N>` - use ExifTool to strip uploads of metadata when possible
- `--read-uploads-description <Y|N>` - use ExifTool to read image descriptions from uploads
- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
- `--skip-release-env` - skip generation the release environment file
- `--skip-release-env` - skip generation of the release environment file
- `--release-env-file` - release environment file path

View file

@ -4,7 +4,7 @@
## Create trusted OAuth App.
Optional params:
Optional parameters:
* `-s SCOPES` - scopes for app, e.g. `read,write,follow,push`.
=== "OTP"
@ -17,4 +17,4 @@ Optional params:
```sh
mix pleroma.app create -n APP_NAME -r REDIRECT_URI
```
```

View file

@ -19,3 +19,26 @@
- `--delete` - delete local uploads after migrating them to the target uploader
A list of available uploaders can be seen in [Configuration Cheat Sheet](../../configuration/cheatsheet.md#pleromaupload)
## Rewriting old media URLs
After a migration has taken place, old URLs in your database will not have been changed. You
will want to run this task to update these URLs.
Use the full URL here. So if you moved from `media.example.com/media` to `media.another.com/data`, you'd run with arguments
`old_url = https://media.example.com/media` and `new_url = https://media.another.com/data`.
=== "OTP"
```sh
./bin/pleroma_ctl uploads rewrite_media_domain <old_url> <new_url>
```
=== "From Source"
```sh
mix pleroma.uploads rewrite_media_domain <old_url> <new_url>
```
### Options
- `--dry-run` - Do not action any update and simply print what _would_ happen

View file

@ -16,7 +16,6 @@
mix pleroma.user new <nickname> <email> [option ...]
```
### Options
- `--name <name>` - the user's display name
- `--bio <bio>` - the user's bio
@ -39,8 +38,7 @@
mix pleroma.user list
```
## Generate an invite link
## Generate an invitation link
=== "OTP"
@ -54,7 +52,6 @@
mix pleroma.user invite [option ...]
```
### Options
- `--expires-at DATE` - last day on which token is active (e.g. "2019-04-05")
- `--max-use NUMBER` - maximum numbers of token uses
@ -73,7 +70,6 @@
mix pleroma.user invites
```
## Revoke invite
=== "OTP"
@ -88,7 +84,6 @@
mix pleroma.user revoke_invite <token>
```
## Delete a user
=== "OTP"
@ -103,7 +98,6 @@
mix pleroma.user rm <nickname>
```
## Delete user's posts and interactions
=== "OTP"
@ -118,7 +112,6 @@
mix pleroma.user delete_activities <nickname>
```
## Sign user out from all applications (delete user's OAuth tokens and authorizations)
=== "OTP"
@ -161,7 +154,6 @@
mix pleroma.user deactivate NICKNAME
```
## Deactivate all accounts from an instance and unsubscribe local users on it
=== "OTP"
@ -176,7 +168,6 @@
mix pleroma.user deactivate_all_from_instance <instance>
```
## Create a password reset link for user
=== "OTP"
@ -191,8 +182,7 @@
mix pleroma.user reset_password <nickname>
```
## Disable Multi Factor Authentication (MFA/2FA) for a user
## Disable Multi-Factor Authentication (MFA/2FA) for a user
=== "OTP"
@ -206,7 +196,6 @@
mix pleroma.user reset_mfa <nickname>
```
## Set the value of the given user's settings
=== "OTP"
@ -241,7 +230,6 @@
mix pleroma.user tag <nickname> <tags>
```
## Delete tags from a user
=== "OTP"
@ -256,7 +244,6 @@
mix pleroma.user untag <nickname> <tags>
```
## Toggle confirmation status of the user
=== "OTP"
@ -304,7 +291,7 @@
## Fix following state
Sometimes the system can get into a situation where
it think you're already following someone and won't send a request
it thinks you're already following someone and won't send a request
to the remote instance, or won't let you unfollow someone. This
bug was fixed, but in case you encounter these weird states:
@ -324,4 +311,4 @@ The first argument is the local user's nickname - if you are `myuser@myinstance`
The second is the remote user, consisting of both nickname AND domain.
If you are a weird follow state situation and cannot resolve it with the above, you may need to co-operate with the remote admin to clear the state their side too - they should provide the arguments *backwards*, i.e `fix_follow_state remote local`.
If you are a weird follow state situation and cannot resolve it with the above, you may need to co-operate with the remote admin to clear the state their side too - they should provide the arguments *backwards*, i.e. `fix_follow_state remote local`.

View file

@ -9,30 +9,30 @@
5. Restart the Akkoma service.
[¹]: We assume the database name is "akkoma". If not, you can find the correct name in your configuration files.
[²]: If you have a from source installation, you need `config/prod.secret.exs` instead of `config/config.exs`. The `config/config.exs` file also exists, but in case of from source installations, it only contains the default values and it is tracked by Git, so you don't need to back it up.
[²]: If you have a from source installation, you need `config/prod.secret.exs` instead of `config/config.exs`. The `config/config.exs` file also exists, but in case of from source installations, it only contains the default values and it is tracked by Git, so you don't need to back it up.
## Restore/Move
1. Optionally reinstall Akkoma (either on the same server or on another server if you want to move servers).
2. Stop the Akkoma service.
3. Go to the working directory of Akkoma (default is `/opt/akkoma`)
4. Copy the above mentioned files back to their original position.
4. Copy the above-mentioned files back to their original position.
5. Drop the existing database and user[¹]. `sudo -Hu postgres psql -c 'DROP DATABASE akkoma;';` `sudo -Hu postgres psql -c 'DROP USER akkoma;'`
6. Restore the database schema and akkoma role[¹] (replace the password with the one you find in the configuration file), `sudo -Hu postgres psql -c "CREATE USER akkoma WITH ENCRYPTED PASSWORD '<database-password-wich-you-can-find-in-your-configuration-file>';"` `sudo -Hu postgres psql -c "CREATE DATABASE akkoma OWNER akkoma;"`.
6. Restore the database schema and akkoma role[¹] (replace the password with the one you find in the configuration file), `sudo -Hu postgres psql -c "CREATE USER akkoma WITH ENCRYPTED PASSWORD '<database-password-wich-you-can-find-in-your-configuration-file>';";` `sudo -Hu postgres psql -c "CREATE DATABASE akkoma OWNER akkoma;"`.
7. Now restore the Akkoma instance's data into the empty database schema[¹]: `sudo -Hu postgres pg_restore -d akkoma -v -1 </path/to/backup_location/akkoma.pgdump>`
8. If you installed a newer Akkoma version, you should run the database migrations `./bin/pleroma_ctl migrate`[²].
9. Restart the Akkoma service.
10. Run `sudo -Hu postgres vacuumdb --all --analyze-in-stages`. This will quickly generate the statistics so that postgres can properly plan queries.
11. If setting up on a new server, configure Nginx by using the `installation/nginx/akkoma.nginx` configuration sample or reference the Akkoma installation guide which contains the Nginx configuration instructions.
11. If setting up on a new server, configure nginx by using the `installation/nginx/akkoma.nginx` configuration sample or reference the Akkoma installation guide which contains the nginx configuration instructions.
[¹]: We assume the database name and user are both "akkoma". If not, you can find the correct name in your configuration files.
[²]: If you have a from source installation, the command is `MIX_ENV=prod mix ecto.migrate`. Note that we prefix with `MIX_ENV=prod` to use the `config/prod.secret.exs` configuration file.
## Remove
1. Optionally you can remove the users of your instance. This will trigger delete requests for their accounts and posts. Note that this is 'best effort' and doesn't mean that all traces of your instance will be gone from the fediverse.
* You can do this from the admin-FE where you can select all local users and delete the accounts using the *Moderate multiple users* dropdown.
* You can also list local users and delete them individually using the CLI tasks for [Managing users](./CLI_tasks/user.md).
1. Optionally, you can remove the users of your instance. This will trigger delete requests for their accounts and posts. Note that this is 'best effort' and doesn't mean that all traces of your instance will be gone from the fediverse.
* You can do this from the admin-fe where you can select all local users and delete the accounts using the *Moderate multiple users* dropdown.
* You can also list local users and delete them individually using the CLI tasks for [managing users](./CLI_tasks/user.md).
2. Stop the Akkoma service `systemctl stop akkoma`
3. Disable Akkoma from systemd `systemctl disable akkoma`
4. Remove the files and folders you created during installation (see installation guide). This includes the akkoma, nginx and systemd files and folders.

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

View file

@ -1,45 +1,317 @@
# Monitoring Akkoma
If you run akkoma, you may be inclined to collect metrics to ensure your instance is running smoothly,
and that there's nothing quietly failing in the background.
If you run Akkoma its a good idea to collect metrics to ensure your instance is running smoothly
without anything silently failing and to aid troubleshooting if something actually goes wrong.
To facilitate this, akkoma exposes a dashboard and prometheus metrics to be scraped.
To facilitate this, Akkoma exposes Prometheus metrics to be scraped for long-term 24/7 monitoring
as well as as two built-in dashboards with ephemeral info about just the current status.
Setting up Prometheus scraping is highly recommended.
## Prometheus
See: [export\_prometheus\_metrics](../../configuration/cheatsheet#instance)
This method gives a more or less complete overview and allows for 24/7 long-term monitoring.
To scrape prometheus metrics, we need an oauth2 token with the `admin:metrics` scope.
Prometheus metric export can be globally disabled if you really want to,
but it doesnt cause much overhead and is enabled by default: see the
[export\_prometheus\_metrics](../../configuration/cheatsheet#instance) config option.
consider using [constanze](https://akkoma.dev/AkkomaGang/constanze) to make this easier -
Akkoma only exposes the current state of all metrics; to make it actually useful
an external scraper needs to regularly fetch and store those values.
An overview of the necessary steps follows.
### Step 1: generate a token
Accessing prometheus metrics, requires an OAuth2 token with the `admin:metrics` (sub)scope.
An access token with only this subscope will be unable to do anything at all _except_ looking at the exported metrics.
Assuming your account has access to the `admin` scope category,
a suitable metrics-only token can be conveniently generated using
[constanze](https://akkoma.dev/AkkomaGang/constanze).
If you didnt already do so before, set up `constanze` by running `constanze configure`.
Now getting the token is as simple as running the below command and following its instructions:
```bash
constanze token --client-app --scopes "admin:metrics" --client-name "Prometheus"
```
or see `scripts/create_metrics_app.sh` in the source tree for the process to get this token.
Alternatively you may manually call into the token and app APIs;
check `scripts/create_metrics_app.sh` in the source tree for the process for this.
Once you have your token of the form `Bearer $ACCESS_TOKEN`, you can use that in your prometheus config:
The resulting token will have the form `Bearer $ACCESS_TOKEN`;
in the following replace occurrences of `$ACCESS_TOKEN` with the actual token string everywhere.
If you wish, you can now check the token works by manually using it to query the current metrics with `curl`:
```yaml
- job_name: akkoma
scheme: https
authorization:
credentials: $ACCESS_TOKEN # this should have the bearer prefix removed
metrics_path: /api/v1/akkoma/metrics
static_configs:
- targets:
- example.com
!!! note
After restarting the instance it may take a couple minutes for content to show up in the metric endpoint
```sh
curl -i -H 'Authorization: Bearer $ACCESS_TOKEN' https://myinstance.example/api/v1/akkoma/metrics | head -n 100
```
## Dashboard
### Step 2: set up a scraper
You may use the eponymous [Prometheus](https://prometheus.io/)
or anything compatible with it like e.g. [VictoriaMetrics](https://victoriametrics.com/).
The latter claims better performance and storage efficiency.
However, at the moment our reference dashboard only works with VictoriaMetrics,
thus if you wish to use use the reference as an easy dropin template you must
use VictoriaMetrics.
Patches to allow the dashboard to work with plain Prometheus are welcome though.
Both of them can usually be easily installed via distro-packages or docker.
Depending on your distro or installation method the preferred way to change the CLI arguments and the location of config files may differ; consult the documentation of your chosen method to find out.
Of special interest is the location of the prometheus scraping config file
and perhaps the maximal data retention period setting,
to manage used disk space and make sure you keep records long enough for your purposes.
It might also be a good idea to set up a minimal buffer of free disk space if youre tight on that;
with VictoriaMetrics this can be done via the `-storage.minFreeDiskSpaceBytes 1GiB` CLI flag.
Ideally the scraper runs on a different machine than Akkoma to be able to
distinguish Akkoma downtime from scraper downtime, but this is not strictly necessary.
Once youve installed one of them, its time to add a job for scraping Akkoma.
For Prometheus the `scrape_configs` section will usually be added to the main config file,
for VictoriaMetrics this will be in the file passed via `-promscrape.config file_path`.
In either case a `scrape_configs` with just one job for a single Akkoma instance will look like this:
```yaml
scrape_configs:
- job_name: 'akkoma_scrape_job'
scheme: https
metrics_path: /api/v1/akkoma/metrics
static_configs:
- targets: ['myinstance.example']
# reminder: no Bearer prefix here!
bearer_token: '$ACCESS_TOKEN'
# One minute should be frequent enough, but you can choose any value, or rely on the global default.
# However, for later use in Grafana you want to match this exactly, thus make note.
scrape_interval: '1m'
```
Now (re)start the scraper service, wait for a multiple of the scrape interval and check logs
to make sure no errors occur.
### Step 3: visualise the collected data
At last its time to actually get a look at the collected data.
There are many options working with Prometheus-compatible backends
and even software which can act as both the scraper _and_ visualiser in one service.
Here well just deal with Grafana, since we ship a reference Grafana dashboard you can just import.
There are again multiple options for [installing Grafana](https://grafana.com/docs/grafana/latest/setup-grafana/)
and detailing all of them is out of scope here, but its nothing too complicated if you already set up Akkoma.
Once youve got it running and are logged into Grafana,
you first need to tell it about the scraper which acts a the “data source”.
For this go to the “Connections” category and select “Data Sources”.
Here click the shiny button for adding a new data source,
select the “Prometheus” type and fill in the details
matching how you set up the scraper itself.
In particular, **use the same `Scrape Interval` value!**
Now youre ready to go to the “Dashboards” page.
Click the “New” button, select “Import” and upload or copy the contents of
the reference dashboard `installation/grafana_dashboard.json` from Akkomas source tree.
It will now ask you to select the data source you just configured,
as well as for the name of the job in your scraper config
and your instance domain+port identifier.
For the example settings from step 2 above
the latter two are `akkoma_scrape_job` and `myinstance.example:443`.
*(`443` is the default port for HTTPS)*
Thats it, youve got a fancy dashboard with long-term, 24/7 metrics now!
Updating the dashboard can be done by just repeating the import process.
Heres an example taken from a healthy, small instance where
nobody was logged in except for a few minutes
resulting in an (expected) spike in incoming requests:
![Full view of the reference dashboard as it looked at the time of writing](img/grafana_dashboard.webp)
!!! note
By default the dashboard does not count downtime of the data source, e.g. the scraper,
towards instance downtime, but a commented out alternative query is provided in the
panel edit menu. If you host the scraper on the same machine as Akkoma you likely want to swap this out.
### Remarks on interpreting the data
Whats kind of load and even error ratio is normal or irregular can depend on
the instance size, chosen configuration and federation partners.
*(E.g. when following relays, much more activities will be received and the received activities will in turn kick off more internal work and also external fetches raising the overall load)*
Here the 24/7 nature of the metric history helps out, since we can just
look at "known-good" time spans to get a feeling for whats normal and good.
If issues without an immediately clear origin crop up,
we can look for deviations from this known-good pattern.
Still there are some things to be aware of and some common guidelines.
#### Panel-specific time ranges
A select few panels, are set to use a custom time range
independent from what you chose for the dashboard as a whole.
This is indicated with blue text next to the panel title.
Those custom times only take precedence over _relative_ global time ranges.
If you choose fixed start and end dates in the global setting
*(for example to look at a long-term trend after a specific change)*
this will take precedence over custom panel times and everything follows the date range.
In the image above e.g. the uptime percent gauge thus considers the entire last week
while most other panels only display data for the last 6 hours.
#### Long-term trends
The lower section of the dashboard with 24h and 48h averages is particularly useful for observing long-term trends.
E.g. how a patch, version upgrade or database `VACCUUM`/`REINDEX` affects performance.
For small time ranges you can still look at them to make sure the values are at a reasonable level,
but the upper part is probably more interesting.
#### Processing times total
The actions counted by various “time per second” or “time per minute” stats are partially overlapping.
E.g. the time to conclude a HTTP response includes the time it took to run whatever
query was needed to fetch the necessary information from the database.
However not all database queries originate from HTTP requests.
But also, not all of the recorded time might have actually consumed CPU cycles.
Some jobs, e.g. `RemoteFetcherWorker`, will need to fetch data over the network
and often most of the time from job start to completion is just spent waiting
for a reply from the remote server to arrive.
Even a few HTTP endpoints will need to fetch remote data before completing;
e.g. `/inbox` needs to verify the signature of the submission, but if the signing key
wasnt encountered before it first needs to be fetched.
Getting deliveries from such unknown users happens more often than you might initially assume
due to e.g. Mastodon federating actor deletions to _every server it knows about_
regardless of whether there was ever any contact with the deleted user.
*(Meaning in the end the key lookup will just result in a `410 Gone` response and us dropping the superfluous `Delete`)*
Thus if you just add up all timing stats youll count some actions multiple times
and may end up consistently with more processing time being done than time elapsing on the wall clock
even though your server is neither overloaded nor subject to relative time dilation.
For keeping track of CPU and elixir-side(!) IO bottlenecks,
the corresponding BEAM VM gauges are much better indicators.
They should be zero most of the time and never exceed zero by much.
!!! note
The BEAM VM (running our elixir code) cannot know about
the databases IO activity or CPU cycle consumption,
thus this gauge is no indicator for database bottlenecks.
#### Job failures and federation
Most jobs are automatically retried and may fail (“exception”) due to no fault of your own instance
e.g. network issues or a remote server temporarily being overloaded.
Thus seeing some failures here is normal and nothing to be concerned about;
usually it will just resolve itself on the next retry.
Consistent and/or a relatively high success-to-failure ratio though
is worth looking into using logs.
Of particular importance are Publisher jobs;
they handle delivering your local content to its intended remote recipients.
Again some PublisherWorker exceptions are no cause for concern,
but if all retries for a delivery fail, this means a remote recipient never
received something they shouldve seen.
Due to its particular importance, such final delivery failures are
recorded again in a separate metric.
The reference dashboard shows it in the “AP delivery failures” panel.
Everything listed there exhausted all retries without success.
Ideally this will always be empty and for small instances this should be the
case most of the time.
However, whenever a remote instance which once interacted with
your local instance in the past is decommissioned, delivery failures will likely
eventually show up in your metrics. For example:
- a local user might be followed by an user from the dead instance
- a local posts was in the past fetched by the dead instance and this post is now deleted;
Akkoma will attempt to deliver the `Delete` to the dead instance even if theres no follow relationship
Delivery failures for such dead instances will typically list a reason like
`http_410`, `http_502`, `http_520`-`http_530` (cloudflared instances), `econnrefused`, `nxdomain` or just `timeout`.
If all deliveries to a given remote instance consistently fail for a longer time,
Akkoma will mark it as permanently unreachable and stop even attempting to deliver
to it meaning the errors should go away after a while.
*(If Akkoma sees activity from the presumed dead instance again it will resume deliveries for future content, but anything in the past will remain lost)*
Large instances with many users are more likely to have (had) some relationship to
such a recently decommissioned instances and thus might see failures here more often
even if nothing is wrong with the local Akkoma instance.
If this makes too much noise, consider filtering out telltale delivery failures.
On the opposite side of things, a `http_401` error for example is always worth looking into!
## Built-in Dashboard
Administrators can access a live dashboard under `/phoenix/live_dashboard`
giving an overview of uptime, software versions, database stats and more.
The dashboard also includes a variation of the prometheus metrics, however
they do not exactly match due to respective limitations of the dashboard
and the prometheus exporter.
Even more important, the dashboard collects metrics locally in the browser
only while the page is open and cannot give a view on their past history.
For proper monitoring it is recommended to set up prometheus.
This dashboard can also show a limited subset of Prometheus metrics,
however besides being limited it only starts collecting data when opening
the corresponding page in the browser and the history only exists in ephemeral browser memory.
When navigating away from the page, all history is gone.
However, this is not this dashboards main purpose anyway.
The usefulness of this built-in dashboard are the insights into the current state of
the BEAM VM running Akkomas code and statistics about the database and its performance
as well as database diagnostics.
BEAM VM stats include detailed memory consumption breakdowns
and a full list of running processes for example.
## Postgres Statements Statistics
The built-in dashboard can list the queries your instances spends the
most accumulative time on giving insight into potential bottlenecks
and what might be worth optimising.
This is the “Outliers” tab in “Ecto Stats”.
However for this to work you first need to enable a PostgreSQL extension
as follows:
Add the following two lines two your `postgresql.conf` (typically placed in your data dir):
```
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.track = all
```
Now restart PostgreSQL. Then connect to your akkoma database using `psql` and run:
```sql
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
```
Execution time statistics will now start to be gathered.
To get a representative sample of your instances workload you should wait a week or at least a day.
These statistics are never reset automatically, but with new Akkoma releases and
changes in the servers your instance federates with the workload will evolve.
Thus its a good idea to reset this occasionally using:
```sql
-- get user oid: SELECT oid FROM pg_roles WHERE rolname = 'akkoma';
-- get db oid: SELECT oid FROM pg_database WHERE datname = 'akkoma';
SELECT pg_stat_statements_reset('<akkoma user oid>'::regclass::oid, '<akkoma database oid>'::regclass::oid);
-- or alternatively, to just reset stats for all users and databases:
-- SELECT pg_stat_statements_reset();
```
## Oban Web
This too requires administrator rights to access and can be found under `/akkoma/oban` if enabled.
The exposed aggregate info is mostly redundant with job statistics already tracked in Prometheus,
but it additionally also:
- shows full argument and meta details for each job
- allows interactively deleting or manually retrying jobs
*(keep this in mind when granting people administrator rights!)*
However, there are two caveats:
1. Just as with the other built-in dashboard, data is not kept around
(although here a **short** backlog actually exists);
when you notice an issue during use and go here to check it likely is already too late.
Job details and history only exists while the jobs are still in the database;
by default failed and succeeded jobs will disappear after about a minute.
2. This dashboard comes with some seemingly constant-ish overhead.
For large instances this appears to be negligible, but small instances on weaker hardware might suffer.
Thus this dashboard can be disabled in the [config](../cheatsheet.md#oban-web).

View file

@ -33,8 +33,8 @@ su -s "$SHELL" akkoma
./bin/pleroma_ctl frontend install pleroma-fe --ref stable
```
If you selected an alternate flavour on installation,
you _may_ need to specify `--flavour`, in the same way as
If you selected an alternate flavour on installation,
you _may_ need to specify `--flavour`, in the same way as
[when installing](../../installation/otp_en#detecting-flavour).
## For from source installations (using git)
@ -62,6 +62,6 @@ mix ecto.migrate
# Start akkoma (replace with your system service manager's equivalent if different)
sudo systemctl start akkoma
# Update Akkoma-FE frontend to latest stable. For other Frontends see Frontend Configuration doc for more information.
# Update akkoma-fe frontend to latest stable. For other Frontends see Frontend Configuration doc for more information.
mix pleroma.frontend install pleroma-fe --ref stable
```

View file

@ -41,12 +41,24 @@ This is a list of clients that are known to work with Akkoma.
- Platforms: Android
- Features: MastoAPI, No Streaming, Emoji Reactions, Text Formatting, FE Stickers
### Pachli
- Homepage: <https://pachli.app/>
- Source Code: <https://github.com/pachli/pachli-android>
- Contact: [@pachli@mastodon.social](https://mastodon.social/users/pachli)
- Platforms: Android
- Features: MastoAPI, No Streaming
### Tusky
!!! warning
Versions after v30.0 do not support Akkoma-compatible filters.
Consider using another client if you use any filters.
- Homepage: <https://tuskyapp.github.io/>
- Source Code: <https://github.com/tuskyapp/Tusky>
- Contact: [@ConnyDuck@mastodon.social](https://mastodon.social/users/ConnyDuck)
- Platforms: Android
- Features: MastoAPI, No Streaming
- Features: MastoAPI, No Streaming, **No Filters (beyond v30.0)**
### Subway Tooter
- Source Code: <https://github.com/tateisu/SubwayTooter/>

View file

@ -2,9 +2,9 @@
This is a cheat sheet for Akkoma configuration file, any setting possible to configure should be listed here.
For OTP installations the configuration is typically stored in `/etc/akkoma/config.exs`.
For OTP installations, the configuration is typically stored in `/etc/akkoma/config.exs`.
For from source installations Akkoma configuration works by first importing the base config `config/config.exs`, then overriding it by the environment config `config/$MIX_ENV.exs` and then overriding it by user config `config/$MIX_ENV.secret.exs`. In from source installations you should always make the changes to the user config and NEVER to the base config to avoid breakages and merge conflicts. So for production you change/add configuration to `config/prod.secret.exs`.
For from source installations, Akkoma configuration works by first importing the base config `config/config.exs`, then overriding it by the environment config `config/$MIX_ENV.exs` and then overriding it by user config `config/$MIX_ENV.secret.exs`. In from source installations you should always make the changes to the user config and NEVER to the base config to avoid breakages and merge conflicts. I.e. for production you change/add configuration to `config/prod.secret.exs`.
To add configuration to your config file, you can copy it from the base config. The latest version of it can be viewed [here](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/config/config.exs). You can also use this file if you don't know how an option is supposed to be formatted.
@ -12,7 +12,12 @@ To add configuration to your config file, you can copy it from the base config.
* `name`: The instances name.
* `email`: Email used to reach an Administrator/Moderator of the instance.
* `notify_email`: Email used for notifications.
* `description`: The instances description, can be seen in nodeinfo and ``/api/v1/instance``.
* `short_description`: A brief, plain-text-only instance description.
Can be seen in nodeinfo and `/api/v1/instance`.
Defaults to `description` if unset
* `description`: The instances more detailed description.
This is allowed to use HTML if `short_description` is set.
Can be seen in `api/v1/instance`.
* `limit`: Posts character limit (CW/Subject included in the counter).
* `description_limit`: The character limit for image descriptions.
* `remote_limit`: Hard character limit beyond which remote posts will be dropped.
@ -33,12 +38,12 @@ To add configuration to your config file, you can copy it from the base config.
* `federation_incoming_replies_max_depth`: Max. depth of reply-to activities fetching on incoming federation, to prevent out-of-memory situations while fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes.
* `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.
* `allow_relay`: Permits remote instances to subscribe to all public posts of your instance. This may increase the visibility of your instance.
* `public`: Allows unauthenticated access to public resources on your instance. This is essentially used as the default value for `:restrict_unauthenticated`.
* `public`: Allows unauthenticated access to public resources on your instance. This is essentially used as the default value for `:restrict_unauthenticated`.
See `restrict_unauthenticated` for more details.
* `quarantined_instances`: *DEPRECATED* ActivityPub instances where activities will not be sent. They can still reach there via other means, we just won't send them.
* `quarantined_instances`: *DEPRECATED* ActivityPub instances where activities will not be sent. They can still see our activities via other means, we just won't send them.
* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML).
* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with
older software for theses nicknames.
* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes).
This will break federation with older software for theses nicknames.
* `max_pinned_statuses`: The maximum number of pinned statuses. `0` will disable the feature.
* `autofollowed_nicknames`: Set to nicknames of (local) users that every new user should automatically follow.
* `autofollowing_nicknames`: Set to nicknames of (local) users that automatically follows every newly registered user.
@ -46,10 +51,11 @@ To add configuration to your config file, you can copy it from the base config.
* `max_report_comment_size`: The maximum size of the report comment (Default: `1000`).
* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). Default: `false`.
* `healthcheck`: If set to true, system data will be shown on ``/api/v1/pleroma/healthcheck``.
* `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database.
* `remote_post_retention_days`: The default number of days to retain remote posts when pruning the database.
* `user_bio_length`: A user bio maximum length (default: `5000`).
* `user_name_length`: A user name maximum length (default: `100`).
* `skip_thread_containment`: Skip filter out broken threads. The default is `false`.
* `skip_thread_containment`: **DEPRECATED**, DO NOT CHANGE THE DEFAULT!
Skip filter out broken threads. The default is `false`.
* `limit_to_local_content`: Limit unauthenticated users to search for local statutes and users only. Possible values: `:unauthenticated`, `:all` and `false`. The default is `:unauthenticated`.
* `max_account_fields`: The maximum number of custom fields in the user profile (default: `10`).
* `max_remote_account_fields`: The maximum number of custom fields in the remote user profile (default: `20`).
@ -61,9 +67,9 @@ To add configuration to your config file, you can copy it from the base config.
* `cleanup_attachments_delay`: How many seconds to wait after post deletion before attempting to deletion; useful for “delete & redraft” functionality (default: `1800`)
* `show_reactions`: Let favourites and emoji reactions be viewed through the API (default: `true`).
* `password_reset_token_validity`: The time after which reset tokens aren't accepted anymore, in seconds (default: one day).
* `local_bubble`: Array of domains representing instances closely related to yours. Used to populate the `bubble` timeline. e.g `["example.com"]`, (default: `[]`)
* `languages`: List of Language Codes used by the instance. This is used to try and set a default language from the frontend. It will try and find the first match between the languages set here and the user's browser languages. It will default to the first language in this setting if there is no match.. (default `["en"]`)
* `export_prometheus_metrics`: Enable prometheus metrics, served at `/api/v1/akkoma/metrics`, requiring the `admin:metrics` oauth scope.
* `local_bubble`: Array of domains representing instances closely related to yours. Used to populate the `bubble` timeline. e.g. `["example.com"]`, (default: `[]`)
* `languages`: List of Language Codes used by the instance. This is used to try and set a default language from the frontend. It will try and find the first match between the languages set here and the user's browser languages. It will default to the first language in this setting if there is no match. (default `["en"]`)
* `export_prometheus_metrics`: Enable prometheus metrics, served at `/api/v1/akkoma/metrics`, requiring the `admin:metrics` OAuth scope.
* `privileged_staff`: Set to `true` to give moderators access to a few higher responsibility actions.
* `federated_timeline_available`: Set to `false` to remove access to the federated timeline for all users.
@ -76,15 +82,15 @@ To add configuration to your config file, you can copy it from the base config.
## Welcome
* `direct_message`: - welcome message sent as a direct message.
* `enabled`: Enables the send a direct message to a newly registered user. Defaults to `false`.
* `enabled`: Enables sending a direct message to a newly registered user. Defaults to `false`.
* `sender_nickname`: The nickname of the local user that sends the welcome message.
* `message`: A message that will be send to a newly registered users as a direct message.
* `message`: A message that will be sent to a newly registered users as a direct message.
* `email`: - welcome message sent as a email.
* `enabled`: Enables the send a welcome email to a newly registered user. Defaults to `false`.
* `enabled`: Enables sending a welcome email to newly registered users. Defaults to `false`.
* `sender`: The email address or tuple with `{nickname, email}` that will use as sender to the welcome email.
* `subject`: A subject of welcome email.
* `html`: A html that will be send to a newly registered users as a email.
* `text`: A text that will be send to a newly registered users as a email.
* `html`: A html that will be sent to newly registered users as an email.
* `text`: A text that will be sent to newly registered users as an email.
Example:
@ -135,7 +141,7 @@ To add configuration to your config file, you can copy it from the base config.
* `Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy`: Steals all eligible emoji encountered in posts from remote instances
(See [`:mrf_steal_emoji`](#mrf_steal_emoji))
* `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (See [`:mrf_subchain`](#mrf_subchain)).
* `Pleroma.Web.ActivityPub.MRF.TagPolicy`: Applies policies to individual users based on tags, which can be set using pleroma-fe/admin-fe/any other app that supports Pleroma Admin API. For example it allows marking posts from individual users nsfw (sensitive).
* `Pleroma.Web.ActivityPub.MRF.TagPolicy`: Applies policies to individual users based on tags, which can be set using pleroma-fe/admin-fe/any other app that supports Pleroma Admin API. For example, it allows marking posts from individual users nsfw (sensitive).
* `Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy`: Drops all posts except from users specified in a list.
(See [`:mrf_user_allowlist`](#mrf_user_allowlist))
* `Pleroma.Web.ActivityPub.MRF.VocabularyPolicy`: Restricts activities to a configured set of vocabulary. (See [`:mrf_vocabulary`](#mrf_vocabulary)).
@ -170,7 +176,7 @@ Additionally the following MRFs will *always* be aplied and cannot be disabled:
* `media_removal`: List of instances to strip media attachments from and the reason for doing so.
* `media_nsfw`: List of instances to tag all media as NSFW (sensitive) from and the reason for doing so.
* `federated_timeline_removal`: List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so.
* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so. Additionally prevents activities from being sent to that instance.
* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so. Additionally, prevents activities from being sent to that instance.
* `accept`: List of instances to only accept activities (except deletes) from and the reason for doing so.
* `followers_only`: Force posts from the given instances to be visible by followers only and the reason for doing so.
* `report_removal`: List of instances to reject reports from and the reason for doing so.
@ -203,8 +209,8 @@ config :pleroma, :mrf_subchain,
* `reject_threshold`: Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.
#### :mrf_keyword
* `reject`: A list of patterns which result in message being rejected, each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html).
* `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines (a.k.a unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html).
* `reject`: A list of patterns which result in a message being rejected, each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html).
* `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines (a.k.a. unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html).
* `replace`: A list of tuples containing `{pattern, replacement}`, `pattern` can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html).
#### :mrf_mention
@ -291,11 +297,11 @@ config :pleroma, :mrf_reject_newly_created_account_notes, age: 86400
### :frontend_configurations
This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [Akkoma-FE configuration and customization for instance administrators](https://docs-fe.akkoma.dev/stable/CONFIGURATION/#options).
This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [akkoma-fe configuration and customization for instance administrators](https://docs-fe.akkoma.dev/stable/CONFIGURATION/#options).
Frontends can access these settings at `/api/v1/pleroma/frontend_configurations`
To add your own configuration for Akkoma-FE, use it like this:
To add your own configuration for akkoma-fe, use it like this:
```elixir
config :pleroma, :frontend_configurations,
@ -340,7 +346,7 @@ config :pleroma, :frontends,
* `:primary` - The frontend that will be served at `/`
* `:admin` - The frontend that will be served at `/pleroma/admin`
* `:swagger` - Config for developers to act as an API reference to be served at `/pleroma/swaggerui/` (trailing slash _needed_). Disabled by default.
* `:mastodon` - The mastodon-fe configuration. This shouldn't need to be changed. This is served at `/web` when installed.
* `:mastodon` - The masto-fe configuration. This shouldn't need to be changed. This is served at `/web` when installed.
### :static\_fe
@ -352,20 +358,20 @@ Available options:
### :assets
This section configures assets to be used with various frontends. Currently the only option
relates to mascots on the mastodon frontend
This section configures assets to be used with various frontends.
Currently, the only option relates to mascots on masto-fe
* `mascots`: KeywordList of mascots, each element __MUST__ contain both a `url` and a
`mime_type` key.
* `default_mascot`: An element from `mascots` - This will be used as the default mascot
on MastoFE (default: `:pleroma_fox_tan`).
on masto-fe (default: `:pleroma_fox_tan`).
### :manifest
This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE.
This section describes PWA manifest instance-specific values. Currently this option relate only for masto-fe.
* `icons`: Describe the icons of the app, this a list of maps describing icons in the same way as the
[spec](https://www.w3.org/TR/appmanifest/#imageresource-and-its-members) describes it.
* `icons`: Describe the icons of the app, this is a list of maps describing icons as
detailed in its [spec](https://www.w3.org/TR/appmanifest/#imageresource-and-its-members).
Example:
@ -393,7 +399,7 @@ This section describe PWA manifest instance-specific values. Currently this opti
* `shortcode_globs`: Location of custom emoji files. `*` can be used as a wildcard. Example `["/emoji/custom/**/*.png"]`
* `pack_extensions`: A list of file extensions for emojis, when no emoji.txt for a pack is present. Example `[".png", ".gif"]`
* `groups`: Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname and the value the location or array of locations. `*` can be used as a wildcard. Example `[Custom: ["/emoji/*.png", "/emoji/custom/*.png"]]`
* `groups`: Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name and the value the location or array of locations. `*` can be used as a wildcard. Example `[Custom: ["/emoji/*.png", "/emoji/custom/*.png"]]`
* `default_manifest`: Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download. Currently only one manifest can be added (no arrays).
* `shared_pack_cache_seconds_per_file`: When an emoji pack is shared, the archive is created and cached in
memory for this amount of seconds multiplied by the number of files.
@ -404,14 +410,14 @@ This section describe PWA manifest instance-specific values. Currently this opti
* `base_url`: The base URL to access a user-uploaded file.
Using a (sub)domain distinct from the instance endpoint is **strongly** recommended.
* `proxy_opts`: All options defined in `Pleroma.ReverseProxy` documentation, defaults to `[max_body_length: (25*1_048_576)]`.
* `whitelist`: List of hosts with scheme to bypass the mediaproxy (e.g. `https://example.com`)
* `whitelist`: List of hosts with scheme to bypass the media proxy (e.g. `https://example.com`)
* `invalidation`: options for remove media from cache after delete object:
* `enabled`: Enables purge cache
* `provider`: Which one of the [purge cache strategy](#purge-cache-strategy) to use.
* `provider`: Which one of the [purge cache strategies](#purge-cache-strategy) to use.
## :media_preview_proxy
* `enabled`: Enables proxying of remote media preview to the instances proxy. Requires enabled media proxy (`media_proxy/enabled`).
* `enabled`: Enables proxying of remote media preview to the instances proxy. Requires media proxy to be enabled (`media_proxy/enabled`).
* `thumbnail_max_width`: Max width of preview thumbnail for images (video preview always has original dimensions).
* `thumbnail_max_height`: Max height of preview thumbnail for images (video preview always has original dimensions).
* `image_quality`: Quality of the output. Ranges from 0 (min quality) to 100 (max quality).
@ -421,8 +427,8 @@ This section describe PWA manifest instance-specific values. Currently this opti
#### Pleroma.Web.MediaProxy.Invalidation.Script
This strategy allow perform external shell script to purge cache.
Urls of attachments are passed to the script as arguments.
This strategy allows executing an external shell script to purge cache.
URLs of attachments are passed to the script as arguments.
* `script_path`: Path to the external script.
* `url_format`: Set to `:htcacheclean` if using Apache's htcacheclean utility.
@ -436,7 +442,7 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script,
#### Pleroma.Web.MediaProxy.Invalidation.Http
This strategy allow perform custom http request to purge cache.
This strategy allows performing a custom HTTP request to purge cache.
* `method`: http method. default is `purge`
* `headers`: http headers.
@ -456,12 +462,12 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
* `providers`: a list of metadata providers to enable. Providers available:
* `Pleroma.Web.Metadata.Providers.OpenGraph`
* `Pleroma.Web.Metadata.Providers.TwitterCard`
* `unfurl_nsfw`: If set to `true` nsfw attachments will be shown in previews.
* `unfurl_nsfw`: If set to `true` NSFW attachments will be shown in previews.
### :rich_media (consumer)
* `enabled`: if enabled the instance will parse metadata from attached links to generate link previews.
* `enabled`: if enabled, the instance will parse metadata from attached links to generate link previews.
* `ignore_hosts`: list of hosts which will be ignored by the metadata parser. For example `["accounts.google.com", "xss.website"]`, defaults to `[]`.
* `ignore_tld`: list TLDs (top-level domains) which will ignore for parse metadata. default is ["local", "localdomain", "lan"].
* `ignore_tld`: list of TLDs (top-level domains) which will ignore for parse metadata. The default is ["local", "localdomain", "lan"].
* `parsers`: list of Rich Media parsers.
* `failure_backoff`: Amount of milliseconds after request failure, during which the request will not be retried.
@ -472,12 +478,12 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
!!! note
`Phoenix` endpoint configuration, all configuration options can be viewed [here](https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#module-dynamic-configuration), only common options are listed here.
* `http` - a list containing http protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make akkoma accessible from other containers (such as your nginx server).
* `http` - a list containing HTTP protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using Docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make akkoma accessible from other containers (such as your nginx server).
- `ip` - a tuple consisting of 4 integers
- `port`
* `url` - a list containing the configuration for generating urls, accepts
* `url` - a list containing the configuration for generating URLs, accepts
- `host` - the host without the scheme and a post (e.g `example.com`, not `https://example.com:2020`)
- `scheme` - e.g `http`, `https`
- `scheme` - e.g. `http`, `https`
- `port`
- `path`
* `extra_cookie_attrs` - a list of `Key=Value` strings to be added as non-standard cookie attributes. Defaults to `["SameSite=Lax"]`. See the [SameSite article](https://www.owasp.org/index.php/SameSite) on OWASP for more info.
@ -492,14 +498,14 @@ config :pleroma, Pleroma.Web.Endpoint,
]
```
This will make Akkoma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020`
This will make Akkoma listen on `127.0.0.1` port `8080` and generate URLs starting with `https://example.com:2020`
### :http_security
* ``enabled``: Whether the managed content security policy is enabled.
* ``sts``: Whether to additionally send a `Strict-Transport-Security` header.
* ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent.
* ``referrer_policy``: The referrer policy to use, either `"same-origin"` or `"no-referrer"`.
* ``report_uri``: Adds the specified url to `report-uri` and `report-to` group in CSP header.
* ``report_uri``: Adds the specified URL to `report-uri` and `report-to` group in CSP header.
### Pleroma.Web.Plugs.RemoteIp
@ -515,11 +521,10 @@ Available options:
* `proxies` - A list of upstream proxy IP subnets in CIDR notation from which we will parse the content of `headers`. Defaults to `[]`. IPv4 entries without a bitmask will be assumed to be /32 and IPv6 /128.
* `reserved` - A list of reserved IP subnets in CIDR notation which should be ignored if found in `headers`. Defaults to `["127.0.0.0/8", "::1/128", "fc00::/7", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]`.
### :rate_limit
!!! note
If your instance is behind a reverse proxy ensure [`Pleroma.Web.Plugs.RemoteIp`](#pleroma-plugs-remoteip) is enabled (it is enabled by default).
If your instance is behind a reverse proxy, ensure [`Pleroma.Web.Plugs.RemoteIp`](#pleroma-plugs-remoteip) is enabled (it is enabled by default).
A keyword list of rate limiters where a key is a limiter name and value is the limiter configuration. The basic configuration is a tuple where:
@ -539,18 +544,18 @@ config :pleroma, :rate_limit,
Means that:
1. In 60 seconds, 15 authentication attempts can be performed from the same IP address.
2. In 1 second, 10 search requests can be performed from the same IP adress by unauthenticated users, while authenticated users can perform 30 search requests per second.
2. In 1 second, 10 search requests can be performed from the same IP address by unauthenticated users, while authenticated users can perform 30 search requests per second.
Supported rate limiters:
* `:search` - Account/Status search.
* `:timeline` - Timeline requests (each timeline has it's own limiter).
* `:timeline` - Timeline requests (each timeline has its own limiter).
* `:app_account_creation` - Account registration from the API.
* `:relations_actions` - Following/Unfollowing in general.
* `:relation_id_action` - Following/Unfollowing for a specific user.
* `:statuses_actions` - Status actions such as: (un)repeating, (un)favouriting, creating, deleting.
* `:status_id_action` - (un)Repeating/(un)Favouriting a particular status.
* `:authentication` - Authentication actions, i.e getting an OAuth token.
* `:authentication` - Authentication actions, i.e. getting an OAuth token.
* `:password_reset` - Requesting password reset emails.
* `:account_confirmation_resend` - Requesting resending account confirmation emails.
* `:ap_routes` - Requesting statuses via ActivityPub.
@ -570,6 +575,8 @@ Available caches:
* `receive_timeout`: the amount of time, in ms, to wait for a remote server to respond to a request. (default: `15000`)
* `pool_timeout`: the amount of time, in ms, to wait to check out an HTTP connection from the pool. This likely does not need changing unless your instance is _very_ busy with outbound requests. (default `5000`)
* `protocols`: array of acceptable protocols for outgoing requests; by default both HTTP1 and HTTP2 are supported.
Due to Finch limitations multiplexing cam only be used when this is set to exclusively HTTP2, but this will break federation with HTTP1-only instances.
* `proxy_url`: an upstream proxy to fetch posts and/or media with, (default: `nil`); for example `http://127.0.0.1:3192`. Does not support SOCKS5 proxy, only http(s).
* `send_user_agent`: should we include a user agent with HTTP requests? (default: `true`)
* `user_agent`: what user agent should we use? (default: `:default`), must be string or `:default`
@ -603,7 +610,7 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th
* `uploader`: Which one of the [uploaders](#uploaders) to use.
* `filters`: List of [upload filters](#upload-filters) to use.
* `link_name`: When enabled Akkoma will add a `name` parameter to the url of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers
* `link_name`: When enabled Akkoma will add a `name` parameter to the URL of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers
* `base_url`: The base URL to access a user-uploaded file; MUST be configured explicitly.
Using a (sub)domain distinct from the instance endpoint is **strongly** recommended. A good value might be `https://media.myakkoma.instance/media/`.
* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation.
@ -616,7 +623,7 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th
#### Pleroma.Uploaders.Local
* `uploads`: Which directory to store the user-uploads in, relative to pleromas working directory.
* `uploads`: Which directory to store the user-uploads in, relative to akkomas working directory.
#### Pleroma.Uploaders.S3
@ -658,7 +665,7 @@ This filter replaces the declared filename (not the path) of an upload.
#### Pleroma.Upload.Filter.Exiftool.StripMetadata
This filter strips metadata with Exiftool leaving color profiles and orientation intact.
This filter strips metadata with ExifTool leaving color profiles and orientation intact.
* `purge`: List of Exiftool tag names or tag group names to purge
* `preserve`: List of Exiftool tag names or tag group names to preserve even if they occur in the purge list
@ -678,16 +685,16 @@ No specific configuration.
#### Pleroma.Upload.Filter.Mogrify
* `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`.
* `args`: List of actions for the `mogrify` command, like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`.
## Email
### Pleroma.Emails.Mailer
* `adapter`: one of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters), or `Swoosh.Adapters.Local` for in-memory mailbox.
* `api_key` / `password` and / or other adapter-specific settings, per the above documentation.
* `enabled`: Allows enable/disable send emails. Default: `false`.
* `enabled`: whether your instance is allowed to send emails. Default: `false`.
An example for Sendgrid adapter:
An example for SendGrid adapter:
```elixir
config :pleroma, Pleroma.Emails.Mailer,
@ -729,7 +736,7 @@ Email notifications settings.
### Pleroma.Emails.NewUsersDigestEmail
- `:enabled` - a boolean, enables new users admin digest email when `true`. Defaults to `false`.
- `:enabled` - a boolean, enables admin-digest email about new users when `true`. Defaults to `false`.
## Background jobs
@ -824,7 +831,7 @@ config :logger, :ex_syslogger,
level: :warn
```
Another example, keeping console output and adding the pid to syslog output:
Another example, keeping console output and adding the PID to syslog output:
```elixir
config :logger,
backends: [:console, {ExSyslogger, :ex_syslogger}]
@ -871,7 +878,7 @@ This will probably take a long time.
### :admin_token
Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the `admin_token` parameter or `x-admin-token` HTTP header. Example:
Allows to set a token that can be used to authenticate with the admin API without using an actual user by giving it as the `admin_token` parameter or `x-admin-token` HTTP header. Example:
```elixir
config :pleroma, :admin_token, "somerandomtoken"
@ -889,7 +896,8 @@ or
curl -H "X-Admin-Token: somerandomtoken" "http://localhost:4000/api/v1/pleroma/admin/users/invites"
```
Warning: it's discouraged to use this feature because of the associated security risk: static / rarely changed instance-wide token is much weaker compared to email-password pair of a real admin user; consider using HTTP Basic Auth or OAuth-based authentication instead.
!!! warning
It's discouraged to use this feature because of the associated security risk: static / rarely changed instance-wide token is much weaker compared to email-password pair of a real admin user; consider using HTTP Basic Auth or OAuth-based authentication instead.
### :auth
@ -909,8 +917,8 @@ Authentication / authorization settings.
Use LDAP for user authentication. When a user logs in to the Akkoma
instance, the name and password will be verified by trying to authenticate
(bind) to an LDAP server. If a user exists in the LDAP directory but there
is no account with the same name yet on the Akkoma instance then a new
Akkoma account will be created with the same name as the LDAP user name.
is no account with the same name yet on the Akkoma instance, then a new
Akkoma account will be created with the same name as the LDAP username.
* `enabled`: enables LDAP authentication
* `host`: LDAP server hostname
@ -931,20 +939,20 @@ OAuth 2.0 provider settings:
* `token_expires_in` - The lifetime in seconds of the access token.
* `issue_new_refresh_token` - Keeps old refresh token or generate new refresh token when to obtain an access token.
* `clean_expired_tokens` - Enable a background job to clean expired oauth tokens. Defaults to `false`.
* `clean_expired_tokens` - Enable a background job to clean expired OAuth tokens. Defaults to `false`.
OAuth 2.0 provider and related endpoints:
* `POST /api/v1/apps` creates client app basing on provided params.
* `POST /api/v1/apps` creates client app basing on provided parameters.
* `GET/POST /oauth/authorize` renders/submits authorization form.
* `POST /oauth/token` creates/renews OAuth token.
* `POST /oauth/revoke` revokes provided OAuth token.
* `GET /api/v1/accounts/verify_credentials` (with proper `Authorization` header or `access_token` URI param) returns user info on requester (with `acct` field containing local nickname and `fqn` field containing fully-qualified nickname which could generally be used as email stub for OAuth software that demands email field in identity endpoint response, like Peertube).
* `GET /api/v1/accounts/verify_credentials` (with proper `Authorization` header or `access_token` URI parameter) returns user info on requester (with `acct` field containing local nickname and `fqn` field containing fully-qualified nickname which could generally be used as email stub for OAuth software that demands email field in identity endpoint response, like Peertube).
### OAuth consumer mode
OAuth consumer mode allows sign in / sign up via external OAuth providers (e.g. Twitter, Facebook, Google, Microsoft, etc.).
Implementation is based on Ueberauth; see the list of [available strategies](https://github.com/ueberauth/ueberauth/wiki/List-of-Strategies).
Implementation is based on Überauth; see the list of [available strategies](https://github.com/ueberauth/ueberauth/wiki/List-of-Strategies).
!!! note
Each strategy is shipped as a separate dependency; in order to get the strategies, run `OAUTH_CONSUMER_STRATEGIES="..." mix deps.get`, e.g. `OAUTH_CONSUMER_STRATEGIES="twitter facebook google microsoft" mix deps.get`. The server should also be started with `OAUTH_CONSUMER_STRATEGIES="..." mix phx.server` in case you enable any strategies.
@ -1025,7 +1033,7 @@ config :pleroma, :frontend_configurations,
## Link parsing
### :uri_schemes
* `valid_schemes`: List of the scheme part that is considered valid to be an URL.
* `valid_schemes`: List of the scheme part that is considered valid to be a URL.
### Pleroma.Formatter
@ -1034,10 +1042,10 @@ Configuration for Akkoma's link formatter which parses mentions, hashtags, and U
* `class` - specify the class to be added to the generated link (default: `false`)
* `rel` - specify the rel attribute (default: `ugc`)
* `new_window` - adds `target="_blank"` attribute (default: `false`)
* `truncate` - Set to a number to truncate URLs longer then the number. Truncated URLs will end in `...` (default: `false`)
* `truncate` - Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...` (default: `false`)
* `strip_prefix` - Strip the scheme prefix (default: `false`)
* `extra` - link URLs with rarely used schemes (magnet, ipfs, irc, etc.) (default: `true`)
* `validate_tld` - Set to false to disable TLD validation for URLs/emails. Can be set to :no_scheme to validate TLDs only for urls without a scheme (e.g `example.com` will be validated, but `http://example.loki` won't) (default: `:no_scheme`)
* `validate_tld` - Set to false to disable TLD validation for URLs/emails. Can be set to :no_scheme to validate TLDs only for URLs without a scheme (e.g `example.com` will be validated, but `http://example.loki` won't) (default: `:no_scheme`)
Example:
@ -1073,7 +1081,7 @@ git clone <MY MODULE>
## :configurable_from_database
Boolean, enables/disables in-database configuration. Read [Transfering the config to/from the database](../administration/CLI_tasks/config.md) for more information.
Boolean, enables/disables in-database configuration. Read [transferring the config to/from the database](../administration/CLI_tasks/config.md) for more information.
## :database_config_whitelist
@ -1123,12 +1131,13 @@ Turning any of the `:restrict_unauthenticated` options to `true` will restrict a
#### When :instance, :public is `false`
When `:instance, :public` is set to `false`, all of the `:restrict_unauthenticated` options will effectively be set to `true` by default,
When `:instance, :public` is set to `false`, all `:restrict_unauthenticated` options will effectively be set to `true` by default,
meaning that only authenticated users will be able to access the corresponding resources.
If you'd like to allow unauthenticated access to specific resources, you can turn these settings to `false`.
**Note**: setting `restrict_unauthenticated/timelines/local` to `true` has no practical sense if `restrict_unauthenticated/timelines/federated` is set to `false` (since local public activities will still be delivered to unauthenticated users as part of federated timeline).
!!! note
Setting `restrict_unauthenticated/timelines/local` to `true` has no practical sense if `restrict_unauthenticated/timelines/federated` is set to `false` (since local public activities will still be delivered to unauthenticated users as part of federated timeline).
## Pleroma.Web.ApiSpec.CastAndValidate
@ -1145,7 +1154,7 @@ Control favicons for instances.
!!! note
Requires enabled email
* `:purge_after_days` an integer, remove backup achives after N days.
* `:purge_after_days` an integer, remove backup archives after N days.
* `:limit_days` an integer, limit user to export not more often than once per N days.
* `:dir` a string with a path to backup temporary directory or `nil` to let Akkoma choose temporary directory in the following order:
1. the directory named by the TMPDIR environment variable
@ -1157,7 +1166,7 @@ Control favicons for instances.
### Theme settings
Settings to change theme as exposed to the outside world, for software
that scans `index.html` (mainly misskey)
that scans `index.html` (mainly Misskey)
```
config :pleroma, Pleroma.Web.Metadata.Providers.Theme, theme_color: "#593196"
@ -1182,10 +1191,10 @@ Settings to restrict concurrently running jobs. Jobs which can be configured:
Each job has these settings:
* `:max_running` - max concurrently runnings jobs
* `:max_running` - max concurrently running jobs
* `:max_waiting` - max waiting jobs
### Translation Settings
## Translation Settings
Settings to automatically translate statuses for end users. Currently supported
translation services are DeepL and LibreTranslate. The supported command line tool is [Argos Translate](https://github.com/argosopentech/argos-translate).
@ -1212,6 +1221,15 @@ Translations are available at `/api/v1/statuses/:id/translations/:language`, whe
### `:argos_translate`
- `:command_argos_translate` - command for `argos-translate`. Can be the command if it's in your PATH, or the full path to the file (default: `argos-translate`).
- `:command_argos_translate` - command for `argos-translate`. Can be the command if it's in your PATH, or the full path to the file (default: `argos-translate`).
- `:command_argospm` - command for `argospm`. Can be the command if it's in your PATH, or the full path to the file (default: `argospm`).
- `:strip_html` - Strip html from the post before translating it (default: `true`).
## Oban Web
The built-in Oban Web dashboard grants all administrators access to look at and modify the instances job queue.
To enable or disable it the following setting can be set to `true` or `false` respectively:
```
config :oban_met, autostart: false
```

View file

@ -46,7 +46,7 @@ config :pleroma, :emoji,
]
```
Order of the `groups` matters, so to override default tags just put your group on top of the list. E.g:
Order of the `groups` matters, so to override default tags, just put your group on top of the list. E.g:
```elixir
config :pleroma, :emoji,
shortcode_globs: ["/emoji/custom/**/*.png"],

View file

@ -2,7 +2,7 @@
Frontends in Akkoma are swappable, you can pick which you'd like.
For a basic setup, you can set a frontends for the key `primary` and `admin` and the options of `name` and `ref`. This will then make Akkoma serve the frontend from a folder constructed by concatenating the instance static path, `frontends` and the name and ref.
For a basic setup, you can set a frontend for the key `primary` and `admin` and the options of `name` and `ref`. This will then make Akkoma serve the frontend from a folder constructed by concatenating the instance static path, `frontends` and the name and ref.
The key `primary` refers to the frontend that will be served by default for general requests. The key `admin` refers to the frontend that will be served at the `/pleroma/admin` path.
@ -34,15 +34,15 @@ If you choose not to install a frontend for whatever reason, it is recommended t
You can also replace the default "no frontend" page by placing an `index.html` file under your `instance/static/` directory.
## Mastodon-FE
## masto-fe
Akkoma supports both [glitchsoc](https://github.com/glitch-soc/mastodon)'s more "vanilla" mastodon frontend,
Akkoma supports both [glitch-soc](https://github.com/glitch-soc/mastodon)'s more "vanilla" mastodon frontend,
as well as [fedibird](https://github.com/fedibird/mastodon)'s extended frontend which has near-feature-parity with akkoma (with quoting and reactions).
To enable either one, you must run the `frontend.install` task for either `mastodon-fe` or `fedibird-fe` (both `--ref akkoma`), then make sure
To enable either one, you must run the `frontend.install` task for either `masto-fe` or `fedibird-fe` (both `--ref akkoma`), then make sure
`:pleroma, :frontends, :mastodon` references the one you want.
## Swagger (openAPI) documentation viewer
## Swagger (OpenAPI) documentation viewer
If you're a developer and you'd like a human-readable rendering of the
API documentation, you can enable [Swagger UI](https://github.com/swagger-api/swagger-ui).

View file

@ -81,7 +81,7 @@ Use private `/tmp` and `/var/tmp` folders inside a new file system namespace, wh
> Recommended value: `true`
The `/home`, `/root`, and `/run/user` folders can not be accessed by this service anymore. If your Akkoma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to `false`.
The `/home`, `/root`, and `/run/user` folders cannot be accessed by this service anymore. If your Akkoma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to `false`.
### ProtectSystem

View file

@ -11,7 +11,7 @@ Akkoma supports that, but it might be tricky to set up, and any error might prev
It is important to understand that for federation purposes, a user in Akkoma has two unique identifiers associated:
- A webfinger `acct:` URI, used for discovery and as a verifiable global name for the user across Akkoma instances. In our example, our account's acct: URI is `acct:user@example.org`
- A WebFinger `acct:` URI, used for discovery and as a verifiable global name for the user across Akkoma instances. In our example, our account's acct: URI is `acct:user@example.org`
- An author/actor URI, used in every other aspect of federation. This is the way in which users are identified in ActivityPub, the underlying protocol used for federation with other Akkoma instances.
In our case, it is `https://akkoma.example.org/users/user`.
@ -19,7 +19,7 @@ Both account identifiers are unique and required for Akkoma. An important risk i
## WebFinger
As said earlier, each Akkoma user has an `acct`: URI, which is used for discovery and authentication. When you add @user@example.org, a webfinger query is performed. This is done in two steps:
As said earlier, each Akkoma user has an `acct`: URI, which is used for discovery and authentication. When you add @user@example.org, a WebFinger query is performed. This is done in two steps:
1. Querying `https://example.org/.well-known/host-meta` (where the domain of the URL matches the domain part of the `acct`: URI) to get information on how to perform the query.
This file will indeed contain a URL template of the form `https://example.org/.well-known/webfinger?resource={uri}` that will be used in the second step.
@ -27,7 +27,8 @@ This file will indeed contain a URL template of the form `https://example.org/.w
## Configuring your Akkoma instance
**_DO NOT ATTEMPT TO CONFIGURE YOUR INSTANCE THIS WAY IF YOU DID NOT UNDERSTAND THE ABOVE_**
!!! danger
DO NOT ATTEMPT TO CONFIGURE YOUR INSTANCE THIS WAY IF YOU DID NOT UNDERSTAND THE ABOVE
### Configuring Akkoma
@ -47,7 +48,7 @@ config :pleroma, Pleroma.Web.WebFinger, domain: "example.org"
### Configuring WebFinger domain
Now, you have Akkoma running at `https://akkoma.example.org` as well as a website at `https://example.org`. If you recall how webfinger queries work, the first step is to query `https://example.org/.well-known/host-meta`, which will contain an URL template.
Now, you have Akkoma running at `https://akkoma.example.org` as well as a website at `https://example.org`. If you recall how WebFinger queries work, the first step is to query `https://example.org/.well-known/host-meta`, which will contain a URL template.
Therefore, the easiest way to configure `example.org` is to redirect `/.well-known/host-meta` to `akkoma.example.org`.

View file

@ -1,108 +1,108 @@
# How to activate Akkoma in-database configuration
## Explanation
The configuration of Akkoma (and Pleroma) has traditionally been managed with a config file, e.g. `config/prod.secret.exs`. This method requires a restart of the application for any configuration changes to take effect. We have made it possible to control most settings in the AdminFE interface after running a migration script.
The configuration of Akkoma (and Pleroma) has traditionally been managed with a config file, e.g. `config/prod.secret.exs`. This method requires a restart of the application for any configuration changes to take effect. We have made it possible to control most settings in the admin-fe interface after running a migration script.
## Migration to database config
1. Run the mix task to migrate to the database.
**Source:**
**Source:**
```
$ mix pleroma.config migrate_to_db
```
```
$ mix pleroma.config migrate_to_db
```
or
or
**OTP:**
**OTP:**
*Note: OTP users need Akkoma to be running for `pleroma_ctl` commands to work*
*Note: OTP users need Akkoma to be running for `pleroma_ctl` commands to work*
```
$ ./bin/pleroma_ctl config migrate_to_db
```
```
$ ./bin/pleroma_ctl config migrate_to_db
```
```
Migrating settings from file: /home/pleroma/config/dev.secret.exs
```
Migrating settings from file: /home/pleroma/config/dev.secret.exs
Settings for key instance migrated.
Settings for group :pleroma migrated.
```
Settings for key instance migrated.
Settings for group :pleroma migrated.
```
2. It is recommended to backup your config file now.
```
cp config/dev.secret.exs config/dev.secret.exs.orig
```
```
cp config/dev.secret.exs config/dev.secret.exs.orig
```
3. Edit your Akkoma config to enable database configuration:
```
config :pleroma, configurable_from_database: true
```
```
config :pleroma, configurable_from_database: true
```
4. ⚠️ **THIS IS NOT REQUIRED** ⚠️
Now you can edit your config file and strip it down to the only settings which are not possible to control in the database. e.g., the Postgres (Repo) and webserver (Endpoint) settings cannot be controlled in the database because the application needs the settings to start up and access the database.
Now you can edit your config file and strip it down to the only settings which are not possible to control in the database. e.g., the Postgres (Repo) and webserver (Endpoint) settings cannot be controlled in the database because the application needs the settings to start up and access the database.
Any settings in the database will override those in the config file, but you may find it less confusing if the setting is only declared in one place.
Any settings in the database will override those in the config file, but you may find it less confusing if the setting is only declared in one place.
A non-exhaustive list of settings that are only possible in the config file include the following:
A non-exhaustive list of settings that are only possible in the config file include the following:
* config :pleroma, Pleroma.Web.Endpoint
* config :pleroma, Pleroma.Repo
* config :pleroma, configurable\_from\_database
* config :pleroma, :database, rum_enabled
* config :pleroma, :connections_pool
* config :pleroma, Pleroma.Web.Endpoint
* config :pleroma, Pleroma.Repo
* config :pleroma, configurable\_from\_database
* config :pleroma, :database, rum_enabled
* config :pleroma, :connections_pool
Here is an example of a server config stripped down after migration:
Here is an example of a server config stripped down after migration:
```
use Mix.Config
```
use Mix.Config
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "cool.pleroma.site", scheme: "https", port: 443]
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "cool.pleroma.site", scheme: "https", port: 443]
config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.Postgres,
username: "akkoma",
password: "MySecretPassword",
database: "akkoma_prod",
hostname: "localhost"
config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.Postgres,
username: "akkoma",
password: "MySecretPassword",
database: "akkoma_prod",
hostname: "localhost"
config :pleroma, configurable_from_database: true
```
config :pleroma, configurable_from_database: true
```
5. Restart your instance and you can now access the Settings tab in AdminFE.
5. Restart your instance and you can now access the Settings tab in admin-fe.
## Reverting back from database config
1. Run the mix task to migrate back from the database. You'll receive some debugging output and a few messages informing you of what happened.
**Source:**
**Source:**
```
$ mix pleroma.config migrate_from_db
```
```
$ mix pleroma.config migrate_from_db
```
or
or
**OTP:**
**OTP:**
```
$ ./bin/pleroma_ctl config migrate_from_db
```
```
$ ./bin/pleroma_ctl config migrate_from_db
```
```
10:26:30.593 [debug] QUERY OK source="config" db=9.8ms decode=1.2ms queue=26.0ms idle=0.0ms
SELECT c0."id", c0."key", c0."group", c0."value", c0."inserted_at", c0."updated_at" FROM "config" AS c0 []
```
10:26:30.593 [debug] QUERY OK source="config" db=9.8ms decode=1.2ms queue=26.0ms idle=0.0ms
SELECT c0."id", c0."key", c0."group", c0."value", c0."inserted_at", c0."updated_at" FROM "config" AS c0 []
10:26:30.659 [debug] QUERY OK source="config" db=1.1ms idle=80.7ms
SELECT c0."id", c0."key", c0."group", c0."value", c0."inserted_at", c0."updated_at" FROM "config" AS c0 []
Database configuration settings have been saved to config/dev.exported_from_db.secret.exs
```
10:26:30.659 [debug] QUERY OK source="config" db=1.1ms idle=80.7ms
SELECT c0."id", c0."key", c0."group", c0."value", c0."inserted_at", c0."updated_at" FROM "config" AS c0 []
Database configuration settings have been saved to config/dev.exported_from_db.secret.exs
```
2. Remove `config :pleroma, configurable_from_database: true` from your config. The in-database configuration still exists, but it will not be used. Future migrations will erase the database config before importing your config file again.
@ -130,7 +130,7 @@ You can clear the database config with the following command:
Additionally, every time you migrate the configuration to the database the config table is automatically truncated to ensure a clean migration.
### Manually removing a setting
If you encounter a situation where the server cannot run properly because of an invalid setting in the database and this is preventing you from accessing AdminFE, you can manually remove the offending setting if you know which one it is.
If you encounter a situation where the server cannot run properly because of an invalid setting in the database and this is preventing you from accessing admin-fe, you can manually remove the offending setting if you know which one it is.
e.g., here is an example showing a the removal of the `config :pleroma, :instance` settings:

View file

@ -1,5 +1,5 @@
# How to configure upstream proxy for federation
If you want to proxify all http requests (e.g. for TOR) that Akkoma makes to an upstream proxy server, edit your config file (`dev.secret.exs` or `prod.secret.exs`) and add the following:
If you want to proxify all HTTP requests (e.g. for TOR) that Akkoma makes to an upstream proxy server, edit your config file (`dev.secret.exs` or `prod.secret.exs`) and add the following:
```
config :pleroma, :http,

View file

@ -15,7 +15,7 @@ In most cases, you would need an extension installed to support parsing CJK text
Once you have the new search config , make sure you test it with the `pleroma` user in PostgreSQL (change `YOUR.CONFIG` to your real configuration name)
```
SELECT ts_debug('YOUR.CONFIG', '安装和配置Nginx, ElixirとErlangをインストールします');
SELECT ts_debug('YOUR.CONFIG', '安装和配置nginx, ElixirとErlangをインストールします');
```
Check output of the query, and see if it matches your expectation.

View file

@ -47,7 +47,7 @@ Now you'll already be able to select the theme in Pleroma FE from the drop-down.
### Give the theme a name
When you open one of the themes that ship with Akkoma, you'll notice that the json has a `"name"` key. Add a key-value pair to your theme where the key name is `"name"` and the value the name you want to give your theme. After this you can refresh te page in your browser and the name should be visible in the drop-down.
When you open one of the themes that ship with Akkoma, you'll notice that the JSON has a `"name"` key. Add a key-value pair to your theme where the key name is `"name"` and the value the name you want to give your theme. After this you can refresh the page in your browser and the name should be visible in the drop-down.
Example of `my-awesome-theme.json` where we add the name "My Awesome Theme"
```json
@ -70,4 +70,4 @@ config :pleroma, :frontend_configurations,
}
```
If you added it in the back-end configuration file, you'll need to restart your instance for the changes to take effect. If you don't see the changes, it's probably because the browser has cached the previous theme. In that case you'll want to clear browser caches. Alternatively you can use a private/incognito window just to see the changes.
If you added it in the back-end configuration file, you'll need to restart your instance for the changes to take effect. If you don't see the changes, it's probably because the browser has cached the previous theme. In that case you'll want to clear browser caches. Alternatively, you can use a private/incognito window just to see the changes.

View file

@ -1,4 +1,4 @@
# I2P Federation and Accessability
# I2P Federation and Accessibility
This guide is going to focus on the Akkoma federation aspect. The actual installation is neatly explained in the official documentation, and more likely to remain up-to-date.
It might be added to this guide if there will be a need for that.
@ -15,9 +15,10 @@ One using the config, and one using external software (fedproxy). The external s
### Using the Config
**Warning:** So far, everytime I followed this way of federating using I2P, the rest of my federation stopped working. I'm leaving this here in case it will help with making it work.
!!! warning
So far, everytime I followed this way of federating using I2P, the rest of my federation stopped working. I'm leaving this here in case it will help with making it work.
Assuming you're running in prod, cd to your Akkoma folder and append the following to `config/prod.secret.exs`:
Assuming you're running in prod, `cd` to your Akkoma folder and append the following to `config/prod.secret.exs`:
```
config :pleroma, :http, proxy_url: {:socks5, :localhost, 4447}
```
@ -45,7 +46,7 @@ To use [fedproxy](https://github.com/majestrate/fedproxy) you'll need to install
```
apt install golang
```
Use a different user than akkoma or root. Run the following to add the Gopath to your ~/.bashrc.
Use a different user than akkoma or root. Run the following to add the `GOPATH` to your ~/.bashrc.
```
echo "export GOPATH=/home/ren/.go" >> ~/.bashrc
```
@ -103,7 +104,7 @@ systemctl start i2pd.service
*Notice:* The stop command initiates a graceful shutdown process, i2pd stops after finishing to route transit tunnels (maximum 10 minutes).
Now you'll have to find your address.
To do that you can download and use I2PD tools.[^1]
To do that, you can download and use I2PD tools.[^1]
Or you'll need to access your web-console on localhost:7070.
If you don't have a GUI, you'll have to SSH tunnel into it like this:
`ssh -L 7070:127.0.0.1:7070 user@ip -p port`.
@ -130,7 +131,7 @@ config :pleroma, :http_security,
enabled: false
```
In the Nginx config, add the following into the `location /` block:
In the nginx config, add the following into the `location /` block:
```nginx
add_header X-XSS-Protection "0";
add_header X-Permitted-Cross-Domain-Policies none;
@ -146,7 +147,7 @@ listen 127.0.0.1:14447;
Set `server_name` to your i2p address.
Reload Nginx:
Reload nginx:
```
systemctl restart i2pd.service --no-block
systemctl reload nginx.service

View file

@ -1,10 +1,10 @@
# Configuring Ejabberd (XMPP Server) to use Akkoma for authentication
# Configuring ejabberd (XMPP Server) to use Akkoma for authentication
If you want to give your Akkoma users an XMPP (chat) account, you can configure [Ejabberd](https://github.com/processone/ejabberd) to use your Akkoma server for user authentication, automatically giving every local user an XMPP account.
If you want to give your Akkoma users an XMPP (chat) account, you can configure [ejabberd](https://github.com/processone/ejabberd) to use your Akkoma server for user authentication, automatically giving every local user an XMPP account.
In general, you just have to follow the configuration described at [https://docs.ejabberd.im/admin/configuration/authentication/#external-script](https://docs.ejabberd.im/admin/configuration/authentication/#external-script). Please read this section carefully.
In general, you just have to follow the configuration described at [https://docs.ejabberd.im/admin/configuration/authentication/#external-script](https://docs.ejabberd.im/admin/configuration/authentication/#external-script). Please read this section carefully.
Copy the script below to suitable path on your system and set owner and permissions. Also do not forget adjusting `AKKOMA_HOST` and `AKKOMA_PORT`, if necessary.
Copy the script below to a suitable path on your system and set owner and permissions. Also do not forget adjusting `AKKOMA_HOST` and `AKKOMA_PORT`, if necessary.
```bash
cp akkoma_ejabberd_auth.py /etc/ejabberd/akkoma_ejabberd_auth.py
@ -12,7 +12,7 @@ chown ejabberd /etc/ejabberd/akkoma_ejabberd_auth.py
chmod 700 /etc/ejabberd/akkoma_ejabberd_auth.py
```
Set external auth params in ejabberd.yaml file:
Set external auth parameters in ejabberd.yaml file:
```bash
auth_method: [external]
@ -23,8 +23,7 @@ auth_use_cache: false
Restart / reload your ejabberd service.
After restarting your Ejabberd server, your users should now be able to connect with their Akkoma credentials.
After restarting your ejabberd server, your users should now be able to connect with their Akkoma credentials.
```python
import sys
@ -33,7 +32,6 @@ import http.client
from base64 import b64encode
import logging
AKKOMA_HOST = "127.0.0.1"
AKKOMA_PORT = "4000"
AUTH_ENDPOINT = "/api/v1/accounts/verify_credentials"

View file

@ -5,6 +5,6 @@ If you want to give your Akkoma users an XMPP (chat) account, you can configure
In general, you just have to follow the configuration described at [https://mongooseim.readthedocs.io/en/latest/authentication-backends/HTTP-authentication-module/](https://mongooseim.readthedocs.io/en/latest/authentication-backends/HTTP-authentication-module/) and do these changes to your mongooseim.cfg.
1. Set the auth_method to `{auth_method, http}`.
2. Add the http auth pool like this: `{http, global, auth, [{workers, 50}], [{server, "https://yourakkomainstance.com"}]}`
2. Add the HTTP auth pool like this: `{http, global, auth, [{workers, 50}], [{server, "https://yourakkomainstance.com"}]}`
Restart your MongooseIM server, your users should now be able to connect with their Akkoma credentials.

View file

@ -11,7 +11,7 @@ Possible uses include:
* removing media from messages
* sending only public messages to a specific instance
The MRF provides user-configurable policies. The default policy is `NoOpPolicy`, which disables the MRF functionality. Akkoma also includes an easy to use policy called `SimplePolicy` which maps messages matching certain pre-defined criterion to actions built into the policy module.
The MRF provides user-configurable policies. The default policy is `NoOpPolicy`, which disables the MRF functionality. Akkoma also includes an easy-to-use policy called `SimplePolicy` which maps messages matching certain pre-defined criterion to actions built into the policy module.
It is possible to use multiple, active MRF policies at the same time.
@ -29,7 +29,7 @@ config :pleroma, :mrf,
Once `SimplePolicy` is enabled, you can configure various groups in the `:mrf_simple` config object. These groups are:
* `reject`: Servers in this group will have their messages rejected. Also outbound messages will not be sent to these servers.
* `reject`: Servers in this group will have their messages rejected. Also, outbound messages will not be sent to these servers.
* `accept`: If not empty, only messages from these instances will be accepted (whitelist federation).
* `media_nsfw`: Servers in this group will have the #nsfw tag and sensitive setting injected into incoming messages which contain media.
* `media_removal`: Servers in this group will have media stripped from incoming messages.
@ -151,7 +151,7 @@ Please note that the Akkoma developers consider custom MRF policy modules to fal
### MRF policies descriptions
If MRF policy depends on config, it can be added into MRF tab to adminFE by adding `config_description/0` method, which returns a map with a specific structure. See existing MRF's like `lib/pleroma/web/activity_pub/mrf/activity_expiration_policy.ex` for examples. Note that more complex inputs, like tuples or maps, may need extra changes in the adminFE and just adding it to `config_description/0` may not be enough to get these inputs working from the adminFE.
If MRF policy depends on config, it can be added into MRF tab to admin-fe by adding `config_description/0` method, which returns a map with a specific structure. See existing MRF's like `lib/pleroma/web/activity_pub/mrf/activity_expiration_policy.ex` for examples. Note that more complex inputs, like tuples or maps, may need extra changes in the admin-fe and just adding it to `config_description/0` may not be enough to get these inputs working from the admin-fe.
Example:

View file

@ -5,7 +5,7 @@ In addition, federating with such instances will also help furthering that goal.
This is a guide to show you how it can be easily done.
This guide assumes you already got Akkoma working, and that it's running on the default port 4000.
This guide also assumes you're using Nginx as the reverse proxy.
This guide also assumes you're using nginx as the reverse proxy.
To install Tor on Debian / Ubuntu:
```
@ -21,7 +21,7 @@ HiddenServicePort 80 127.0.0.1:8099
HiddenServiceVersion 3 # Remove if Tor version is below 0.3 ( tor --version )
HTTPTunnelPort 9080
```
Restart Tor to generate an adress:
Restart Tor to generate an address:
```
systemctl restart tor@default.service
```
@ -63,7 +63,7 @@ If creating a Tor-only instance, open `config/prod.secret.exs` and under "config
In addition to that, replace the existing nginx config's contents with the example below.
## Existing Instance (Clearnet Instance)
If not a Tor-only instance,
If not a Tor-only instance,
add the nginx config below to your existing config at `/etc/nginx/sites-enabled/akkoma.nginx`.
---
@ -74,7 +74,7 @@ config :pleroma, :http_security,
enabled: false
```
In the Nginx config, add the following into the `location /` block:
In the nginx config, add the following into the `location /` block:
```nginx
add_header X-XSS-Protection "0";
add_header X-Permitted-Cross-Domain-Policies none;
@ -90,7 +90,7 @@ listen 127.0.0.1:8099;
Set the `server_name` to your onion address.
Reload Nginx:
Reload nginx:
```
systemctl reload nginx
```
@ -101,7 +101,7 @@ You should now be able to both access your instance using Tor and federate with
### Possible Issues
* In Debian, make sure your hidden service folder `/var/lib/tor/akkoma_hidden_service/` and its contents, has debian-tor as both owner and group by using
* In Debian, make sure your hidden service folder `/var/lib/tor/akkoma_hidden_service/` and its contents, has debian-tor as both owner and group by using
```
ls -la /var/lib/tor/
```

View file

@ -0,0 +1,48 @@
# General Performance and Optimisation Notes
# Oban Web
The built-in Oban Web dashboard has a seemingly constant'ish overhead
irrelevant to large instances but potentially
noticeable for small instances on low power systems.
Thus if the latter applies to your case, you might want to disable it;
see [the cheatsheet](../cheatsheet.md#oban-web).
# Relays
Subscribing to relays exposes your instance to a high volume flood of incoming activities.
This does not just incur the cost of processing those activities themselves, but typically
each activity may trigger additional work, like fetching ancestors and child posts to
complete the thread, refreshing user profiles, etc.
Furthermore the larger the count of activities and objects in your database the costlier
all database operations on these (highly important) tables get.
Carefully consider whether this is worth the cost
and if you experience performance issues unsubscribe from relays.
Regularly pruning old remote posts and orphaned activities is also especially important
when following relays or just having unfollowed relays for performance reasons.
# Pruning old remote data
Over time your instance accumulates more and more remote data, mainly in form of posts and activities.
Chances are you and your local users do not actually care for the vast majority of those.
Consider regularly *(frequency highly dependent on your individual setup)* pruning such old and irrelevant remote data; see
[the corresponding `mix` tasks](../../../administration/CLI_tasks/database#prune-old-remote-posts-from-the-database).
# Database Maintenance
Akkomas performance is highly dependent on and often bottle-necked by the database.
Taking good care of it pays off!
See the dedicated [PostgreSQL page](../postgresql.md).
# HTTP Request Cache
If your instance is frequently getting _many_ `GET` requests from external
actors *(i.e. everyone except logged-in local users)* an additional
*(Akkoma already has some caching built-in and so might your reverse proxy)*
caching layer as described in the [Varnish Cache guide](varnish_cache.md)
might help alleviate the impact.
If this condition does **not** hold though,
setting up such a cache likely only worsens latency and wastes memory.

View file

@ -1,6 +1,6 @@
# Optimizing the BEAM
Akkoma is built upon the Erlang/OTP VM known as BEAM. The BEAM VM is highly optimized for latency, but this has drawbacks in environments without dedicated hardware. One of the tricks used by the BEAM VM is [busy waiting](https://en.wikipedia.org/wiki/Busy_waiting). This allows the application to pretend to be busy working so the OS kernel does not pause the application process and switch to another process waiting for the CPU to execute its workload. It does this by spinning for a period of time which inflates the apparent CPU usage of the application so it is immediately ready to execute another task. This can be observed with utilities like **top(1)** which will show consistently high CPU usage for the process. Switching between procesess is a rather expensive operation and also clears CPU caches further affecting latency and performance. The goal of busy waiting is to avoid this penalty.
Akkoma is built upon the Erlang/OTP VM known as BEAM. The BEAM VM is highly optimized for latency, but this has drawbacks in environments without dedicated hardware. One of the tricks used by the BEAM VM is [busy waiting](https://en.wikipedia.org/wiki/Busy_waiting). This allows the application to pretend to be busy working so the OS kernel does not pause the application process and switch to another process waiting for the CPU to execute its workload. It does this by spinning for a period of time which inflates the apparent CPU usage of the application so it is immediately ready to execute another task. This can be observed with utilities like **top(1)** which will show consistently high CPU usage for the process. Switching between processes is a rather expensive operation and also clears CPU caches further affecting latency and performance. The goal of busy waiting is to avoid this penalty.
This strategy is very successful in making a performant and responsive application, but is not desirable on Virtual Machines or hardware with few CPU cores. Akkoma instances are often deployed on the same server as the required PostgreSQL database which can lead to situations where the Akkoma application is holding the CPU in a busy-wait loop and as a result the database cannot process requests in a timely manner. The fewer CPUs available, the more this problem is exacerbated. The latency is further amplified by the OS being installed on a Virtual Machine as the Hypervisor uses CPU time-slicing to pause the entire OS and switch between other tasks.
@ -18,7 +18,6 @@ Please only change these settings if you are experiencing issues or really know
* AWS (known to use burst scheduling)
## Example configurations
Tuning the BEAM requires you provide a config file normally called [vm.args](http://erlang.org/doc/man/erl.html#emulator-flags). If you are using systemd to manage the service you can modify the unit file as such:

View file

@ -4,29 +4,29 @@ Varnish is a layer that sits between your web server and your backend applicatio
it does something similar to nginx caching, but tends to be optimised for speed over
all else.
To set up a varnish cache, first you'll need to install varnish.
To set up a Varnish cache, first you'll need to install Varnish.
This will vary by distribution, and since this is a rather advanced guide,
no copy-paste instructions are provided. It's probably in your distribution's
package manager, though. `apt-get install varnish` and so on.
Once you have varnish installed, you'll need to configure it to work with akkoma.
Once you have Varnish installed, you'll need to configure it to work with akkoma.
Copy the configuration file to the varnish configuration directory:
Copy the configuration file to the Varnish configuration directory:
cp installation/akkoma.vcl /etc/varnish/akkoma.vcl
You may want to check if varnish added a `default.vcl` file to the same directory,
if so you can just remove it without issue.
You may want to check if Varnish added a `default.vcl` file to the same directory,
if so, you can just remove it without issue.
Then boot up varnish, probably `systemctl start varnish` or `service varnish start`.
Then boot up Varnish, probably `systemctl start varnish` or `service varnish start`.
Now you should be able to `curl -D- localhost:6081` and see a bunch of
akkoma javascript.
Once that's out of the way, we can point our webserver at varnish. This
Once that's out of the way, we can point our webserver at Varnish. This
=== "Nginx"
=== "nginx"
upstream phoenix {
server 127.0.0.1:6081 max_fails=5 fail_timeout=60s;
@ -51,4 +51,4 @@ if (std.port(server.ip) != 443) {
}
```
This will allow your webserver alone to handle redirects.
This will allow your webserver alone to handle redirects.

View file

@ -10,4 +10,4 @@ It is also recommended to not use "Network Storage" option.
If your server runs other services, you may want to take that into account. E.g. if you have 4G ram, but 1G of it is already used for other services, it may be better to tell PGTune you only have 3G.
In the end, PGTune only provides recomended settings, you can always try to finetune further.
In the end, PGTune only provides recommended settings, you can always try to finetune further.

View file

@ -18,7 +18,7 @@ around 4 gigabytes. Like [RUM](./cheatsheet.md#rum-indexing-for-full-text-search
higher performance and ordering by timestamp in a reasonable amount of time.
Additionally, the search results seem to be more accurate.
Due to high memory usage, it may be best to set it up on a different machine, if running pleroma on a low-resource
Due to high memory usage, it may be best to set it up on a different machine, if running akkoma on a low-resource
computer, and use private key authentication to secure the remote search instance.
To use [meilisearch](https://www.meilisearch.com/), set the search module to `Pleroma.Search.Meilisearch`:
@ -26,8 +26,8 @@ To use [meilisearch](https://www.meilisearch.com/), set the search module to `Pl
> config :pleroma, Pleroma.Search, module: Pleroma.Search.Meilisearch
You then need to set the address of the meilisearch instance, and optionally the private key for authentication. You might
also want to change the `initial_indexing_chunk_size` to be smaller if you're server is not very powerful, but not higher than `100_000`,
because meilisearch will refuse to process it if it's too big. However, in general you want this to be as big as possible, because meilisearch
also want to change the `initial_indexing_chunk_size` to be smaller if your server is not very powerful, but not higher than `100_000`,
because Meilisearch will refuse to process it if it's too big. However, in general you want this to be as big as possible, because Meilisearch
indexes faster when it can process many posts in a single batch.
> config :pleroma, Pleroma.Search.Meilisearch,
@ -36,7 +36,7 @@ indexes faster when it can process many posts in a single batch.
> search_key: "search key",
> initial_indexing_chunk_size: 100_000
Information about setting up meilisearch can be found in the
Information about setting up Meilisearch can be found in the
[official documentation](https://docs.meilisearch.com/learn/getting_started/installation.html).
You probably want to start it with `MEILI_NO_ANALYTICS=true` environment variable to disable analytics.
At least version 0.25.0 is required, but you are strongly adviced to use at least 0.26.0, as it introduces
@ -93,7 +93,7 @@ To start the initial indexing, run the `index` command:
```
This will show you the total amount of posts to index, and then show you the amount of posts indexed currently, until the numbers eventually
become the same. The posts are indexed in big batches and meilisearch will take some time to actually index them, even after you have
become the same. The posts are indexed in big batches and Meilisearch will take some time to actually index them, even after you have
inserted all the posts into it. Depending on the amount of posts, this may be as long as several hours. To get information about the status
of indexing and how many posts have actually been indexed, use the `stats` command:
@ -131,9 +131,9 @@ depends on the amount of text in posts.
**Note: This requires at least ElasticSearch 7**
As with meilisearch, this can be rather memory-hungry, but it is very good at what it does.
As with Meilisearch, this can be rather memory-hungry, but it is very good at what it does.
To use [elasticsearch](https://www.elastic.co/), set the search module to `Pleroma.Search.Elasticsearch`:
To use [Elasticsearch](https://www.elastic.co/), set the search module to `Pleroma.Search.Elasticsearch`:
> config :pleroma, Pleroma.Search, module: Pleroma.Search.Elasticsearch
@ -146,7 +146,7 @@ You then need to set the URL and authentication credentials if relevant.
### Initial indexing
After setting up the configuration, you'll want to index all of your already existsing posts. You'll only have to do it one time, but it might take a while, depending on the amount of posts your instance has seen.
After setting up the configuration, you'll want to index all of your already existsing posts. You'll only have to do it one time, but it might take a while, depending on the amount of posts your instance has seen.
The sequence of actions is as follows:

View file

@ -49,7 +49,7 @@ Add `$static_dir/instance/thumbnail.jpeg` with your selfie or other neat picture
## Instance-specific panel
Create and Edit your file at `$static_dir/instance/panel.html`.
Create and edit your file at `$static_dir/instance/panel.html`.
## Background
@ -69,7 +69,7 @@ config :pleroma, :frontend_configurations,
!!! important
Note the extra `static` folder for the default logo.png location
If you want to give a brand to your instance, You can change the logo of your instance by uploading it to the static directory `$static_dir/static/logo.png`.
If you want to give a brand to your instance, you can change the logo of your instance by uploading it to the static directory `$static_dir/static/logo.png`.
Alternatively, you can specify the path to your logo in [your configuration](../cheatsheet/#frontend_configurations).
@ -91,21 +91,21 @@ Terms of Service will be shown to all users on the registration page. It's the b
## Favicon
The favicon will display on the frontend, and in the browser tab.
The favicon will display on the frontend, and in the browser tab.
Place a PNG file at `$static_dir/favicon.png` to change the favicon. Not that this
is _one level above_ where the logo is placed, it should be on the same level as
the `frontends` directory.
## Styling rendered pages
To overwrite the CSS stylesheet of the OAuth form and other static pages, you can upload your own CSS file to `instance/static/static.css`. This will completely replace the CSS used by those pages, so it might be a good idea to copy the one from `priv/static/instance/static.css` and make your changes.
## Overriding pleroma-fe styles
## Overriding akkoma-fe styles
To overwrite the CSS stylesheet of pleroma-fe, you can put a file at
To overwrite the CSS stylesheet of akkoma-fe, you can put a file at
`$static_dir/static/custom.css` containing your styles. These will be loaded
with the rest of the CSS.
You will probably have to put `!important` on most/all your styles to override the
default ones, due to the specificity precedence of CSS.
default ones, due to the specificity precedence of CSS.

View file

@ -1,10 +1,10 @@
# Storing Remote Media
Akkoma does not store remote/federated media by default. The best way to achieve this is to change Nginx to keep its reverse proxy cache
Akkoma does not store remote/federated media by default. The best way to achieve this is to change nginx to keep its reverse proxy cache
for a year and to activate the `MediaProxyWarmingPolicy` MRF policy in Akkoma which will automatically fetch all media through the proxy
as soon as the post is received by your instance.
## Nginx
## nginx
The following are excerpts from the [suggested nginx config](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/installation/nginx/akkoma.nginx) that demonstrates the necessary config for the media proxy to work.

View file

@ -137,7 +137,7 @@ Backwards-compatibility for admin API endpoints without version prefixes (`/api/
## `GET /api/v1/pleroma/admin/users/:nickname/permission_group`
### Get user user permission groups membership
### Get user permission groups membership
- Params: none
- Response:
@ -153,7 +153,7 @@ Backwards-compatibility for admin API endpoints without version prefixes (`/api/
Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesnt exist.
### Get user user permission groups membership per permission group
### Get user permission groups membership per permission group
- Params: none
- Response:
@ -303,7 +303,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/users/:nickname_or_id`
### Retrive the details of a user
### Retrieve the details of a user
- Params:
- `nickname` or `id`
@ -313,7 +313,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/users/:nickname_or_id/statuses`
### Retrive user's latest statuses
### Retrieve user's latest statuses
- Params:
- `nickname` or `id`
@ -337,7 +337,7 @@ Removes the user(s) from follower recommendations.
## `GET /api/v1/pleroma/admin/instances/:instance/statuses`
### Retrive instance's latest statuses
### Retrieve instance's latest statuses
- Params:
- `instance`: instance name
@ -377,7 +377,7 @@ It may take some time.
## `GET /api/v1/pleroma/admin/statuses`
### Retrives all latest statuses
### Retrieves all latest statuses
- Params:
- *optional* `page_size`: number of statuses to return (default is `20`)
@ -414,7 +414,7 @@ Params: