Github Mastodon Verification

How to get that ever-so-satisfying check mark and green translucent glow on your profile’s metadata?

Users can add up to four key:value pairs and populate them with whatever information they want. Here the admin user has a link to a support page, a link to his GitHub account, and a link to a website that he also manages.
Pretty enviable, right? You have to save changes to trigger the verification.

This guide by @simon@simonwillison.net helped me get my xpat.github.io verification on Mastodon Mexican Bold. It contains some HTML code that you can customize to point to your own page.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Redirecting to github.com/simonw/</title>
    <meta http-equiv="refresh" content="0; URL=https://github.com/simonw">
    <link href="https://github.com/simonw" rel="me">
    <link href="https://simonwillison.net/" rel="me">
    <link href="https://fedi.simonwillison.net/@simon" rel="me">
  </head>
  <body style="margin: 0; padding: 0">
    <a
      href="https://github.com/simonw"
      style="
        display: block;
        height: 100vh;
        width: 100vw;
        margin: 0;
        padding: 0;
        color: white;
      "
    >
      github.com/simonw
    </a>
  </body>
</html>

I’d already created a GitHub repository xpat.github.io and had it serving a static site that I made with Flutter several years ago as a test. I deleted almost all that was there – especially the CNAME file that contained an earlier pointer to pinche.website. (Note to self: that’s why, at first, it was redirecting to https://pinche.website and not to https://github.com/xpat which is where I keep all my repositories.)

Here’s another example by someone else: @MattHodges@mastodon.social. Mr. Hodges takes a different tack and redirects https://hodgesmr.github.io to https://matthodges.com, a static GitHub page instead of his GitHub profile page.

Mastodon up! @you@your.domain

#Test case:

Sign-in to your Mastodon instance. Search for @mxurbano@happyhobbit.dev. What result do you get?*

Double the fun.  Search for @urbanx@antoine.patraldo.com, another alias of mine. What result do you get?*

#Problem:

Say you want to explore different servers, switching instances as you see fit. Today, it’s Mastodon.Social. Tomorrow, it’s Something.Else.

You have your own website https://your.domain. You’re thinking, “I’ll scrape the web for all the places where my @mastodon.social handle appears. I’ll change @me@mastodon.social to @me@something.else.”

You could have had a V-8.  You could have used your domain as your permanent, #portable, #interoperable (?) mastodon handle, even though you haven’t set up your own personal Mastodon server.

#Solution:

You can add an endpoint to https://your.domain/.well-known/webfinger that points to your latest Mastodon instance. Follow this guide by @maartenballiauw@mastodon.online Your mileage may vary.

My experience was pretty much problem free. I reworked the #Sveltekit code for a couple of domains that I host on a Linux Ubuntu server on Google Cloud Platform. I came across a github issue that offered different ideas. The one that worked for me was the simplest. I added a dot folder under static/ and then created a blank file named ‘webfinger’ and then I put the json output of the GET command in the blank file. That was on my local development machine.

Here’s how I get the json:

$ curl https://mastodon.mexicanbold.com/.well-known/webfinger?resource=acct:mxurbano@mastodon.mexicanbold.com | python3 -mjson.tool

That outputs the following:

{
“subject”: “acct:mxurbano@mastodon.mexicanbold.com”,
“aliases”: [
“https://mastodon.mexicanbold.com/@mxurbano”,
“https://mastodon.mexicanbold.com/users/mxurbano”
],
“links”: [
{
“rel”: “http://webfinger.net/rel/profile-page”,
“type”: “text/html”,
“href”: “https://mastodon.mexicanbold.com/@mxurbano”
},
{
“rel”: “self”,
“type”: “application/activity+json”,
“href”: “https://mastodon.mexicanbold.com/users/mxurbano”
},
{
“rel”: “http://ostatus.org/schema/1.0/subscribe”,
“template”: “https://mastodon.mexicanbold.com/authorize_interaction?uri={uri}”
}
]
}

Copy and paste into the blank webfinger file (static/.well-known/webfinger). There’s nothing else in that file. I tried adding the output from a second account thinking I could add the json from an indefinite number of accounts, but if that’s even possible it didn’t work for me.

My process for updating a #Sveltekit web site is manual and somewhat tedious but not terribly laborious. Yes, it is toil and I should automate it. Most of my commands are in history and so I usually just use control-r in bash and find the right command. In svelte.config.js I use adapter-node. I self-host on Google Cloud Platform and use Nginx with upstream directives serving each site on a different port. I run PM2 process manager. I should do a post on my tedious-not-too-laborious-toil-nonetheless #sveltekit deployment process.

Once deployed, visit it and add .well-known/webfinger to your path and you should see some output. In Mastodon, search for your account using your new alias.  Now give your alias to any prospective mastodon user (any activitypub user?). Someone who searches for you in the Mastodon using @you@your.domain should get a result that matches the instance name that you’ve put in the webfinger file. When you change instances, simply rerun the curl command and swap the output and re-build and re-deploy.

So Mastodon UP! Roam wide and far, high and low, from now until … we go extinct.

* both times the result should be the same: @mxurbano@mastodon.mexicanbold.com The reason is that I put the same webfinger file in the .well-known folder for each of my domains, happyhobbit.dev/.well-known/webfinger and antoine.patraldo.com/.well-known/webfinger.

Experiment #1, Examination of Human Value: Intrinsic, Extrinsic & Relative

I’ve started two essentially equal Mastodon social media sites: Karl Marx Social & Ayn Rand Social. They’re open to everyone to join. I’m admin for both and if I post things on one, I’m going to post the same thing on the other. I don’t know yet whether I want to participate in discussions there, or if so how much and in what capacity. I am not adverse to peppering each site with a post now and then — but the same post (at least for now, that’s what I have in mind). Similarly, if I follow people in the #fediverse, I am going to try and follow them twice, once from each site.

Those are the control variables: same structure, same approach, same rules, same treatment. Potential outcomes? Will one site lead to more insight into the question of human value? Will one site have more compelling arguments? So many possibilities. I’m even thinking of a second experiment at this point and that would involve debate teams. Tangential to that might be one that would include judges or arbiters; more on that later.

Feel free to comment and suggest either a more serious academic experiment or a more playful one (not sure why I’m assuming that the two types would be incompatible).

Published
Categorized as ActivityPub

Mastodon* Instances, Plural

Ayn Rand Social and Karl Marx Social are each hosted remotely with Digital Ocean in the San Francisco, California region, on separate but equal servers. Each server’s specifications are: 8 GB Memory / 4 AMD vCPUs / 160 GB Disk / SFO3 (Region) / Basic Shared CPU with Premium AMD with NVMe SSD.

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

As remote server administrators, we’re responsible for everything except the physical maintenance of the machines on which the server is installed. We operate this and a few other servers in our spare time as a personal project.

This project is largely a labor of love that we’re hoping to sustain with some modest financial support from individual community members.

* Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones. On Mastodon, users can publish anything they want: links, pictures, text, video. All Mastodon servers are interoperable as a federated network (users on one server can seamlessly communicate with users from another one, including non-Mastodon software that implements ActivityPub)!