This document describes data portability in ActivityPub.
It lists what data exists for an actor. It then describes two modes of data
portability for an actor: using a domain, and Mastodon-style Move
.
This is a draft for a future SocialCG report.
Data elements
This is a list of data objects that are part of an actor's data.
On own server
- Actor ID (https URI)
- Webfinger identity
- Actor profile properties
- name
- avatar
- content
- links
- URI
- Outbox
- Inbox
- Uploaded files
- Followers
- Following
- Blocks
- public key
Other servers
- ID in others' followers lists
- ID in others' following lists
- ID in others' blocked lists
- Links in @-mentions
- Object IDs for activities
- Object IDs for content
- URIs for uploaded files
Domain portability
This is a process for moving an actor from one ActivityPub server to another.
It requires the user to run a server on a domain they control.
Process
- The user backs up all data for the account at username@old.example.
- The user shuts down the old implementation running at old.example.
- The user installs the new implementation at old.example.
- The user restores all data to the account at username@old.example.
Results
- All user data is available.
- All links from others' servers are still valid.
Limitations
- No standard format for backup files exists; see https://github.com/w3c/activitypub/issues/370.
- The user has to register and maintain their own domain name.
- The user has to run their own server, or use a hosting service that allows mapping their own domain name.
- Different implementations may use different URI patterns for activities or content.
Move action
Mastodon and compatible server software use a Move
activity
to move an actor from one server to another.
Process
The user will typically execute these steps using a Web interface or an API client, rather than executing them directly.
- The user creates a new actor at username@new.example
- The user marks the new actor as accepting a move with the
alsoKnownAs
property.
- The user marks the old actor as having moved with the
movedTo
property.
- The user sends a
Move
activity from the old actor to all followers.
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Move",
"actor": "https://old.example/users/username",
"object": "https://old.example/users/username",
"target": "https://new.example/users/username"
}
- Each follower checks the
alsoKnownAs
property of the new account and movedTo
property of the old account.
- Each follower sends a
Follow
activity to the new account.
- Each follower sends an
Undo Follow
activity to the old account.
- The old account's profile URI redirects to the new account's profile URI.
- (Optional) The user exports the old account's
following
list as a CSV file.
- (Optional) The user imports the CSV file into the new account.
- (Optional) The new account sends a
Follow
activity to each account in the imported CSV file.
Results
- The old account's profile URI redirects to the new account.
- The new account's followers is a subset of the old account's followers.
- The new account's following is a subset of the old account's following.
- The old account's followers list is empty.
- Each follower's
following
list includes the ID of the new account.
Limitations
- The process will not work if the old account's server is down.
- The process will not work if the old account's server is blocked by followers.
- Content like images, videos, text, audio that are created in the old account is not moved to the new account.
If the old server goes down, all that content is lost.
- Other user data listed above, like replies, likes, blocks are also not ported.
Changelog
- Added the limitation that a lot of data is not ported in the
Move
activity technique.
- Note that users will typically use software to make changes to their actor record or send activities.