### Example GET Request for HTTP Signature Source: https://docs.joinmastodon.org/spec/security A sample GET request structure before signing. ```http GET /users/username/outbox HTTP/1.1 Host: mastodon.example Date: 18 Dec 2019 10:08:46 GMT Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams" ``` -------------------------------- ### Enable and start Sidekiq Redis Source: https://docs.joinmastodon.org/admin/scaling Enable the new systemd service to start on boot and start it immediately. ```bash systemctl enable --now redis-sidekiq ``` -------------------------------- ### Install System Repositories Source: https://docs.joinmastodon.org/admin/install Installs essential tools for managing system repositories. ```bash apt install -y curl wget gnupg lsb-release ca-certificates ``` -------------------------------- ### Start Vagrant Virtual Machine Source: https://docs.joinmastodon.org/dev/setup Starts the virtual machine for the Mastodon development environment. ```bash vagrant up ``` -------------------------------- ### Install Foreman and Run Development Server Source: https://docs.joinmastodon.org/dev/setup Installs the Foreman gem and then runs the Mastodon development server using the 'bin/dev' script, which starts multiple processes like Rails, Vite, streaming API, and Sidekiq. ```bash gem install foreman --no-document bin/dev ``` -------------------------------- ### Example API Request for Pagination Source: https://docs.joinmastodon.org/api/guidelines This example demonstrates a typical GET request to an API endpoint, including the Host header and Authorization token, which is often used in conjunction with pagination parameters. ```http GET /api/v1/endpoint HTTP/1.1 Host: mastodon.example Authorization: Bearer ``` -------------------------------- ### Run Mastodon Setup Wizard Source: https://docs.joinmastodon.org/admin/install Initiates the Mastodon setup wizard to generate configuration, precompile assets, and create the database schema. ```bash RAILS_ENV=production bin/rails mastodon:setup ``` -------------------------------- ### Install iptables-persistent Source: https://docs.joinmastodon.org/admin/prerequisites Install iptables-persistent to manage and save firewall rules across reboots. ```bash apt install -y iptables-persistent ``` -------------------------------- ### Get featured accounts response examples Source: https://docs.joinmastodon.org/methods/accounts Response payloads for the get endorsements request, including sample data and pagination headers. ```json [ { "id": "952529", "username": "alayna", "acct": "alayna@desvox.es", "display_name": "Alayna Desirae", "locked": true, "bot": false, "created_at": "2019-10-26T23:12:06.570Z", "note": "experiencing ________ difficulties
22y/o INFP in Oklahoma", "url": "https://desvox.es/users/alayna", "avatar": "https://files.mastodon.social/accounts/avatars/000/952/529/original/6534122046d050d5.png", "avatar_static": "https://files.mastodon.social/accounts/avatars/000/952/529/original/6534122046d050d5.png", "header": "https://files.mastodon.social/accounts/headers/000/952/529/original/496f1f817e042ade.png", "header_static": "https://files.mastodon.social/accounts/headers/000/952/529/original/496f1f817e042ade.png", "followers_count": 0, "following_count": 0, "statuses_count": 955, "last_status_at": "2019-11-23T07:05:50.682Z", "emojis": [], "fields": [] }, { "id": "832844", "username": "a9", "acct": "a9@broadcast.wolfgirl.engineering", "display_name": "vivienne :collar: ", "locked": true, "bot": false, "created_at": "2019-06-12T18:55:12.053Z", "note": "borderline nsfw, considered a schedule I drug by nixon
waiting for the year of the illumos desktop", "url": "https://broadcast.wolfgirl.engineering/users/a9", "avatar": "https://files.mastodon.social/accounts/avatars/000/832/844/original/ae1de0b8fb63d1c6.png", "avatar_static": "https://files.mastodon.social/accounts/avatars/000/832/844/original/ae1de0b8fb63d1c6.png", "header": "https://files.mastodon.social/accounts/headers/000/832/844/original/5088e4a16e6d8736.png", "header_static": "https://files.mastodon.social/accounts/headers/000/832/844/original/5088e4a16e6d8736.png", "followers_count": 43, "following_count": 67, "statuses_count": 5906, "last_status_at": "2019-11-23T05:23:47.911Z", "emojis": [ { "shortcode": "collar", "url": "https://files.mastodon.social/custom_emojis/images/000/106/920/original/80953b9cd96ec4dc.png", "static_url": "https://files.mastodon.social/custom_emojis/images/000/106/920/static/80953b9cd96ec4dc.png", "visible_in_picker": true } ], "fields": [] } ] ``` ```http Link: ; rel="next", ; rel="prev" ``` ```json { "error": "This API requires an authenticated user" } ``` ```json { "error": "Record not found" } ``` -------------------------------- ### User Preferences Example Source: https://docs.joinmastodon.org/entities/Preferences This JSON object shows an example of a user's preferences, including default settings for posting and reading. ```json { "posting:default:visibility": "public", "posting:default:sensitive": false, "posting:default:language": null, "reading:expand:media": "default", "reading:expand:spoilers": false } ``` -------------------------------- ### Install Ruby Version Source: https://docs.joinmastodon.org/admin/install Installs the required Ruby version using rbenv, with jemalloc for performance. ```bash RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install ``` -------------------------------- ### Query String Parameter Example Source: https://docs.joinmastodon.org/client/intro Demonstrates how to append query strings to a URL to pass parameters for a GET request. Parameters are in the format key=value, separated by '&'. ```bash curl https://mastodon.example/endpoint?q=test&n=0 ``` -------------------------------- ### Install Fail2ban Source: https://docs.joinmastodon.org/admin/prerequisites Install the fail2ban package to protect against brute-force login attempts. ```bash apt install fail2ban ``` -------------------------------- ### Install Tor Packages Source: https://docs.joinmastodon.org/admin/optional/tor Installs the Tor package and the repository key package. This command installs the necessary software to run a Tor onion service. ```bash apt install tor deb.torproject.org-keyring ``` -------------------------------- ### Install PgBouncer on Debian and Ubuntu Source: https://docs.joinmastodon.org/admin/scaling Use the system package manager to install the PgBouncer service. ```bash sudo apt install pgbouncer ``` -------------------------------- ### Status response examples Source: https://docs.joinmastodon.org/methods/statuses Examples of successful and error responses from the status creation endpoint. ```json { "id": "103254962155278888", "created_at": "2019-12-05T11:34:47.196Z", // ... "content": "

test content

", // ... "application": { "name": "test app", "website": null }, // ... } ``` ```json { "id": "3221", "scheduled_at": "2019-12-05T12:33:01.000Z", "params": { "text": "test content", "media_ids": null, "sensitive": null, "spoiler_text": null, "visibility": null, "scheduled_at": null, "poll": null, "idempotency": null, "in_reply_to_id": null, "application_id": 596551, "quoted_status_id": null, "quote_approval_policy": "followers" }, "media_attachments": [] } ``` ```json { "error": "The access token is invalid" } ``` ```json { "error": "Validation failed: Text can't be blank" } ``` -------------------------------- ### Example Response: Terms of Service (Configured) Source: https://docs.joinmastodon.org/methods/instance Example JSON response when terms of service are configured, including effective date, status, and content. ```json { "effective_date": "2025-04-15", "effective": true, "content": "

Foo bar newer

\n", "succeeded_by": null } ``` -------------------------------- ### Start and Enable Elasticsearch Service Source: https://docs.joinmastodon.org/admin/elasticsearch Reloads the systemd daemon and then starts and enables the Elasticsearch service to run on boot. ```bash systemctl daemon-reload systemctl enable --now elasticsearch ``` -------------------------------- ### Install rbenv and ruby-build Source: https://docs.joinmastodon.org/admin/install Installs rbenv for Ruby version management and ruby-build for compiling Ruby versions. ```bash git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build ``` -------------------------------- ### Install System Packages Source: https://docs.joinmastodon.org/admin/install Installs a comprehensive list of system packages required for Mastodon, including build tools, libraries, and services. ```bash apt update apt install -y \ imagemagick ffmpeg libvips-tools libpq-dev libxslt1-dev file git \ protobuf-compiler pkg-config autoconf bison build-essential \ libssl-dev libyaml-dev libreadline-dev zlib1g-dev libffi-dev \ libgdbm-dev nginx nodejs redis-server postgresql certbot \ python3-certbot-nginx libidn-dev libicu-dev libjemalloc-dev ``` -------------------------------- ### Start and Enable Mastodon Systemd Services Source: https://docs.joinmastodon.org/admin/install Reload the systemd daemon and then start and enable the Mastodon web, sidekiq, and streaming services to ensure they run on boot. ```bash systemctl daemon-reload systemctl enable --now mastodon-web mastodon-sidekiq mastodon-streaming ``` -------------------------------- ### Install Elasticsearch Source: https://docs.joinmastodon.org/admin/elasticsearch Installs the Elasticsearch package after updating the apt package list. ```bash apt update apt install elasticsearch ``` -------------------------------- ### Report Example Source: https://docs.joinmastodon.org/entities/Report This JSON object represents an example of a report filed against a user. It includes details about the report itself and the target account. ```json { "id": "48914", "action_taken": false, "action_taken_at": null, "category": "spam", "comment": "Spam account", "forwarded": false, "created_at": "2022-08-25T09:56:16.763Z", "status_ids": [ "108882889550545820" ], "collection_ids": [], "rule_ids": null, "target_account": { "id": "108366849347798387", "username": "Baluke", "acct": "Baluke", "display_name": "Baluke Dental Studios", "locked": false, "bot": false, "discoverable": false, "group": false, "created_at": "2022-05-26T00:00:00.000Z", "note": "

Baluke Dental Studios is a full service dental lab offering fabrication, staining, and digital services. Advanced technologies and a meticulous process ensure reduced chair time, lower costs, and better patient outcomes with beautiful smiles. Talk to a representative today.

https://baluke.com/

", "url": "https://mastodon.social/@Baluke", "avatar": "https://files.mastodon.social/accounts/avatars/108/366/849/347/798/387/original/dbcfe99ed5def0f4.png", "avatar_static": "https://files.mastodon.social/accounts/avatars/108/366/849/347/798/387/original/dbcfe99ed5def0f4.png", "header": "https://static-cdn.mastodon.social/headers/original/missing.png", "header_static": "https://static-cdn.mastodon.social/headers/original/missing.png", "followers_count": 0, "following_count": 0, "statuses_count": 38, "last_status_at": "2022-08-25", "emojis": [], "fields": [] } } ``` -------------------------------- ### SSH into Vagrant VM and Start Processes Source: https://docs.joinmastodon.org/dev/setup Connects to the Vagrant virtual machine via SSH and starts the Mastodon processes using Foreman. ```bash vagrant ssh -c "cd /vagrant && foreman start" ``` -------------------------------- ### Example Response for Viewing All Filters (v1 - Deprecated) Source: https://docs.joinmastodon.org/methods/filters Example response showing excerpts of various filters, including their ID, phrase, context, and expiration. ```json [ { "id": "6191", "phrase": ":eurovision2019:", "context": [ "home" ], "whole_word": true, "expires_at": "2019-05-21T13:47:31.333Z", "irreversible": false }, // ... { "id": "5580", "phrase": "@twitter.com", "context": [ "home", "notifications", "public", "thread" ], "whole_word": false, "expires_at": null, "irreversible": true }, // ... ] ``` -------------------------------- ### Setup Test Database Source: https://docs.joinmastodon.org/dev/setup Sets up the Mastodon test database. ```bash RAILS_ENV=test bin/rails db:setup ``` -------------------------------- ### Keep Alive Comment Example Source: https://docs.joinmastodon.org/methods/streaming This is an example of a heartbeat comment used to keep the server-sent events connection alive. Parsers should ignore lines starting with a colon. ```text :thump ``` -------------------------------- ### Setup Development Database Source: https://docs.joinmastodon.org/dev/setup Sets up the Mastodon development database, including creating databases, loading the schema, and seeding data. ```bash RAILS_ENV=development bin/rails db:setup ``` -------------------------------- ### GET Request to View Blocked Users Source: https://docs.joinmastodon.org/methods/blocks This snippet shows the structure of a GET request to the /api/v1/blocks endpoint. It includes example headers and query parameters for retrieving a list of blocked accounts. ```http GET /api/v1/blocks HTTP/1.1 ``` -------------------------------- ### Fetch Notifications Request Source: https://docs.joinmastodon.org/methods/notifications Example HTTP GET request to retrieve notifications with a limit parameter. ```http GET https://mastodon.social/api/v1/notifications?limit=2 HTTP/1.1 Authorization: Bearer ``` -------------------------------- ### Response for listing blocked domains Source: https://docs.joinmastodon.org/methods/admin/domain_blocks Example response structure for the `GET /api/v1/admin/domain_blocks` endpoint, showing details of a blocked domain. ```json [ { "id": "1", "domain": "example.com", "digest": "a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947", "created_at": "2022-11-16T08:15:34.238Z", "severity": "noop", "reject_media": false, "reject_reports": false, "private_comment": null, "public_comment": null, "obfuscate": false }, // ... ] ``` -------------------------------- ### ActivityPub Create Activity Example Source: https://docs.joinmastodon.org/spec/webfinger This is a sample ActivityPub 'Create' activity. The 'to' field demonstrates how a remote user's profile URI, obtained via WebFinger, is used to address the activity. ```json { "id": "https://social.example/activities/1", "type": "Create", "actor": "https://social.example/actors/1", "object": { "id": "https://social.example/objects/1", "type": "Note", "content": "Hello, Gargron!" }, "to": "https://mastodon.social/users/Gargron" } ``` -------------------------------- ### GET /api/v1/statuses/:id/context Source: https://docs.joinmastodon.org/methods/statuses View statuses above and below a specific status in the thread. Starting from Mastodon 4.5, this endpoint may return an experimental Mastodon-Async-Refresh header. ```APIDOC ## GET /api/v1/statuses/:id/context ### Description View statuses above and below this status in the thread. Starting from Mastodon 4.5, asynchronous background jobs may be started to check for missing replies, potentially returning an experimental `Mastodon-Async-Refresh` header. ### Method GET ### Endpoint /api/v1/statuses/:id/context ### Parameters #### Path Parameters - **id** (String) - Required - The ID of the Status in the database. #### Headers - **Authorization** (String) - Optional - Provide `Bearer ` to gain authorized access for private statuses and increased limits. ### Response #### Success Response (200) - **ancestors** (Array) - List of statuses above the current status. - **descendants** (Array) - List of statuses below the current status. #### Response Example { "ancestors": [ { "id": "103188938570975982", "created_at": "2019-11-23T19:44:00.124Z", "in_reply_to_id": null, "in_reply_to_account_id": null } ], "descendants": [ { "id": "103189026958574542", "created_at": "2019-11-23T20:06:36.011Z", "in_reply_to_id": "103189005915505698", "in_reply_to_account_id": "634458" } ] } ``` -------------------------------- ### Watch Public Timeline for Hashtag Source: https://docs.joinmastodon.org/methods/streaming This example shows how to make a GET request to the /api/v1/streaming/hashtag endpoint to stream public statuses for a specific hashtag. Requires a user token with 'read:statuses' scope. ```http GET /api/v1/streaming/hashtag HTTP/1.1 ``` -------------------------------- ### Pagination example for domain blocks Source: https://docs.joinmastodon.org/methods/admin/domain_blocks Illustrates how to use the `Link` header for paginating through the list of blocked domains. ```http Link: ; rel="next", ; rel="prev" ``` -------------------------------- ### HTTP Signature for Partial Collection Access Source: https://docs.joinmastodon.org/spec/activitypub This example demonstrates a GET request to a partial collection URL, which must be signed with HTTP signatures. It includes the Signature header and the expected JSON-LD response body. ```http GET https://social.sitedethib.com/users/Thib/followers_synchronization HTTP/1.1 Signature: ... # a signature from an account on mastodon.social { "@context": "https://www.w3.org/ns/activitystreams", "id": "https://social.sitedethib.com/users/Thib/followers?domain=mastodon.social", "type": "OrderedCollection", "orderedItems": [ "https://mastodon.social/users/Gargron" ] } ``` -------------------------------- ### Start Multiple Streaming Server Instances Source: https://docs.joinmastodon.org/admin/scaling Commands to initiate multiple streaming server processes using systemd service templates. ```bash $ sudo systemctl start mastodon-streaming@4000.service $ sudo systemctl start mastodon-streaming@4001.service $ sudo systemctl start mastodon-streaming@4002.service ``` -------------------------------- ### Prepare Sidekiq Redis data directory Source: https://docs.joinmastodon.org/admin/scaling Create the directory for the new Redis instance and assign ownership to the redis user. ```bash mkdir /var/lib/redis-sidekiq chown redis /var/lib/redis-sidekiq ``` -------------------------------- ### New Users Measure Example Source: https://docs.joinmastodon.org/entities/Admin_Measure Example of the 'new_users' measure, detailing the number of users who joined within a specific time frame. This helps track user acquisition trends. ```json { "key": "new_users", "unit": null, "total": "2", "previous_total": "0", "data": [ { "date": "2022-09-14T00:00:00.000+00:00", "value": "0" }, { "date": "2022-09-15T00:00:00.000+00:00", "value": "0" }, { "date": "2022-09-16T00:00:00.000+00:00", "value": "0" }, { "date": "2022-09-17T00:00:00.000+00:00", "value": "1" }, { "date": "2022-09-18T00:00:00.000+00:00", "value": "0" }, { "date": "2022-09-19T00:00:00.000+00:00", "value": "0" }, { "date": "2022-09-20T00:00:00.000+00:00", "value": "1" }, { "date": "2022-09-21T00:00:00.000+00:00", "value": "0" }, { "date": "2022-09-22T00:00:00.000+00:00", "value": "0" } ] } ``` -------------------------------- ### Signed GET Request Source: https://docs.joinmastodon.org/spec/security The final GET request including the Signature header. ```http GET /users/username/inbox HTTP/1.1 Host: mastodon.example Date: 18 Dec 2019 10:08:46 GMT Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams" Signature: keyId="https://my.example.com/actor#main-key",headers="(request-target) host date",signature="Y2FiYW...IxNGRiZDk4ZA==" ``` -------------------------------- ### Enable Nginx Site Configuration Source: https://docs.joinmastodon.org/admin/optional/object-storage-proxy After saving the Nginx configuration file, create a symbolic link to enable the site and reload Nginx to apply the changes. ```bash ln -s /etc/nginx/sites-available/files.example.com /etc/nginx/sites-enabled/ systemctl reload nginx ``` -------------------------------- ### Not found response example Source: https://docs.joinmastodon.org/methods/admin/domain_blocks Example response when a requested domain block ID does not exist. ```json { "error": "Record not found" } ``` -------------------------------- ### Run Database Migrations Source: https://docs.joinmastodon.org/dev/setup Runs new database migrations for the development instance's database. ```bash RAILS_ENV=development bin/rails db:migrate ``` -------------------------------- ### Software Versions Dimension Example Source: https://docs.joinmastodon.org/entities/Admin_Dimension Lists the versions of software components used in the server stack. Each entry includes the software key, human-readable name, version value, and human-readable version. ```json { "key": "software_versions", "data": [ { "key": "mastodon", "human_key": "Mastodon", "value": "3.5.3", "human_value": "3.5.3" }, { "key": "ruby", "human_key": "Ruby", "value": "3.0.4p208", "human_value": "3.0.4p208" }, { "key": "postgresql", "human_key": "PostgreSQL", "value": "10.22", "human_value": "10.22" }, { "key": "redis", "human_key": "Redis", "value": "4.0.9", "human_value": "4.0.9" } ] } ``` -------------------------------- ### Notification request response examples Source: https://docs.joinmastodon.org/methods/notifications Examples of successful and unauthorized responses for the notification request endpoint. ```json { "id": "112456967201894256", "created_at": "2024-05-17T14:45:41.171Z", "updated_at": "2024-05-17T14:45:41.171Z", "notifications_count": "1", "account": { "id": "971724", "username": "zsc", "acct": "zsc", // ... }, "last_status": { "id": "103186126728896492", "created_at": "2019-11-23T07:49:01.940Z", "in_reply_to_id": "103186038209478945", "in_reply_to_account_id": "14715", // ... "content": "

@trwnh sup!

", // ... "account": { "id": "971724", "username": "zsc", "acct": "zsc", // ... }, // ... "mentions": [ { "id": "14715", "username": "trwnh", "url": "https://mastodon.social/@trwnh", "acct": "trwnh" } ], // ... } } ``` ```json { "error": "The access token is invalid" } ``` -------------------------------- ### Update Collection Request Example Source: https://docs.joinmastodon.org/methods/collections Example of a PATCH request body to update collection attributes. ```http PATCH /api/v1/collections/116131056935959117 HTTP/1.1 Content-Type: application/json { "name": "Nice accounts", "description": "These accounts are very nice", "language": "en", "tag_name": "#accounts", "sensitive": false, "discoverable": true } ``` -------------------------------- ### Video PreviewCard JSON Example Source: https://docs.joinmastodon.org/entities/PreviewCard Represents a video-type preview card with embedded HTML and dimensions. ```json { "url": "https://www.youtube.com/watch?v=OMv_EPMED8Y", "title": "♪ Brand New Friend (Christmas Song!)", "description": "", "type": "video", "author_name": "YOGSCAST Lewis & Simon", "author_url": "https://www.youtube.com/user/BlueXephos", "provider_name": "YouTube", "provider_url": "https://www.youtube.com/", "html": "", "width": 480, "height": 270, "image": "https://files.mastodon.social/preview_cards/images/014/179/145/original/9cf4b7cf5567b569.jpeg", "embed_url": "", "blurhash": "UvK0HNkV,:s9xBR%njog0fo2W=WBS5ozofV@" } ``` -------------------------------- ### Example User Filters Changed Event Source: https://docs.joinmastodon.org/methods/streaming An example of a 'filters_changed' event. This event does not have a 'payload' property. ```json { "stream": [ "user" ], "event": "filters_changed" } ``` -------------------------------- ### List Entity Example Source: https://docs.joinmastodon.org/entities/List An example of the List entity's JSON representation, showing its attributes. ```json { "id": "12249", "title": "Friends", "replies_policy": "list", "exclusive": false } ``` -------------------------------- ### Account following response sample Source: https://docs.joinmastodon.org/methods/accounts Example JSON response body containing a list of followed accounts. ```json [ { "id": "963410", "username": "gautambhatia", "acct": "gautambhatia", "display_name": "Gautam Bhatia" // ... }, { "id": "1007400", "username": "seafrog", "acct": "seafrog@glitterkitten.co.uk", "display_name": "🐓🦃 Heck Partridge 🤠 🦆" // ... } ] ``` -------------------------------- ### FilterKeyword Example Source: https://docs.joinmastodon.org/entities/FilterKeyword An example of the FilterKeyword entity structure, showing its id, keyword, and whole_word attributes. ```json { "id": "1197", "keyword": "bad word", "whole_word": false } ``` -------------------------------- ### Example API Response with Pagination Links Source: https://docs.joinmastodon.org/api/guidelines This example shows a successful HTTP response containing a Link header. The Link header provides URLs for navigating to the next and previous pages of results, crucial for implementing pagination. ```http HTTP/1.1 200 OK Link: ; rel="next", ; rel="prev" [ { "//": "some Entity" }, "more Entities in an Array" ] ``` -------------------------------- ### Install Development Dependencies Source: https://docs.joinmastodon.org/dev/setup Installs Ruby gems and JavaScript packages required for the Mastodon development environment. ```bash bundle install yarn install ``` -------------------------------- ### Sample response for multiple statuses Source: https://docs.joinmastodon.org/methods/statuses Example of a successful 200 OK response containing a list of status objects. ```json [ { "id": "1", "created_at": "2016-03-16T14:44:31.580Z", "in_reply_to_id": null, "in_reply_to_account_id": null, "sensitive": false, "spoiler_text": "", "visibility": "public", "language": "en", "uri": "https://mastodon.social/users/Gargron/statuses/1", "url": "https://mastodon.social/@Gargron/1", "replies_count": 7, "reblogs_count": 98, "favourites_count": 112, "favourited": false, "reblogged": false, "muted": false, "bookmarked": false, "content": "

Hello world

", "reblog": null, "application": null, "account": { "id": "1", "username": "Gargron", "acct": "Gargron", "display_name": "Eugen", "locked": false, "bot": false, "created_at": "2016-03-16T14:34:26.392Z", "note": "

Developer of Mastodon and administrator of mastodon.social. I post service announcements, development updates, and personal stuff.

", "url": "https://mastodon.social/@Gargron", "avatar": "https://files.mastodon.social/accounts/avatars/000/000/001/original/d96d39a0abb45b92.jpg", "avatar_static": "https://files.mastodon.social/accounts/avatars/000/000/001/original/d96d39a0abb45b92.jpg", "header": "https://files.mastodon.social/accounts/headers/000/000/001/original/c91b871f294ea63e.png", "header_static": "https://files.mastodon.social/accounts/headers/000/000/001/original/c91b871f294ea63e.png", "followers_count": 320472, "following_count": 453, "statuses_count": 61163, "last_status_at": "2019-12-05T03:03:02.595Z", "emojis": [], "fields": [ { "name": "Patreon", "value": "https://www.patreon.com/mastodon", "verified_at": null }, { "name": "Homepage", "value": "https://zeonfederated.com", "verified_at": "2019-07-15T18:29:57.191+00:00" } ] }, "media_attachments": [], "mentions": [], "tags": [], "emojis": [], "card": null, "poll": null } ] ``` -------------------------------- ### Install Ruby and JavaScript Dependencies Source: https://docs.joinmastodon.org/admin/install Installs Ruby gems and JavaScript dependencies using Bundler and Yarn. ```bash bundle config deployment 'true' bundle config without 'development test' bundle install yarn install ``` -------------------------------- ### Define PgBouncer User Credentials Source: https://docs.joinmastodon.org/admin/scaling Example entries for the userlist.txt file using MD5 hashing. ```text "mastodon" "md5d75bb2be2d7086c6148944261a00f605" ``` ```bash # ubuntu, debian, etc. echo -n "passwordmastodon" | md5sum # macOS, openBSD, etc. md5 -s "passwordmastodon" ``` ```text "mastodon" "md5d75bb2be2d7086c6148944261a00f605" "pgbouncer" "md5a45753afaca0db833a6f7c7b2864b9d9" ``` -------------------------------- ### RFC9421 Signature Header Example Source: https://docs.joinmastodon.org/spec/security Example of the required Signature-Input and Signature headers used for RFC9421-compatible requests. ```http Signature-Input: sig1=("@method" "@target-uri" "content-digest");created=1748341414;keyid="https://my.example.com/actor#main-key" Signature: sig1=:Y2FiYW...IxNGRiZDk4ZA==: ``` -------------------------------- ### Copy System Files with rsync Source: https://docs.joinmastodon.org/admin/migrating Use rsync to efficiently copy the '~/live/public/system/' directory from the old Mastodon server to the new one. This directory contains user-uploaded media. ```bash rsync -avz ~/live/public/system/ mastodon@example.com:~/live/public/system/ ```