twtxt, the decentralized and minimalist plain text social network

Leer en español

Nowadays it is hard for a social network to surprise you. We have flavors and colors for every taste: some focused on multimedia content (Instagram, TikTok), others on microblogging (Mastodon, Pleroma, X, Bluesky...), forums (Reddit, Discourse), instant messaging (WhatsApp, Telegram), or even niches like programming (GitHub, GitLab) or job hunting (LinkedIn). Everything seems already invented. They are complex platforms with their own learning curves. Can a social network exist based on plain text? I mean one where publishing a post only requires a text editor similar to Notepad.

Let me introduce you to twtxt, a decentralized and minimalist plain text social network. You need no software to publish, follow other users, or read their posts. A social network that runs over HTTP, backed by plain text files. Its influence from X, or Twitter back in the day, is obvious, since it focuses on publishing short messages. Over time, though, it has evolved and built its own identity. A simple idea, which is also a stroke of genius, for decentralized microblogging living in a few lines of a plain text file.

The first specification was released in mid 2016 by @buckket. Since then it has grown thanks to the community, both with tools and with extensions to the original spec that enrich the user experience: Pods, Registry, mentions, threads, metadata, and so on. However, all of them are optional. The essence of twtxt stays the same: publish posts in a plain text file and share it with other users.

Let's start with the most basic part. How do you publish a post in twtxt?

Publishing a post

Each user publishes their posts in a plain text file that they own. To make it accessible to others, it must live on any web server. The file must follow a specific format: date and time in RFC3339 format, a tab, and the post content.

For example, we create a file called twtxt.txt with the following line:

2024-09-29T13:30:00Z   Hello twtxt! I'm a new user.

Now we serve it with a web server, such as Nginx. Done! We have published our first post on twtxt. If you want a quick guide on how to do it with Docker, I recommend reading this article.

To publish another post, we just add a line at the end of the file:

2024-09-29T13:30:00Z   Hello twtxt! I'm a new user.
2024-09-29T13:35:00Z   Hello again! Is anyone following me?

We can even use a simple console command to make the task easier:

echo -e "$(date -Im)\tPublishing from the terminal!" >> twtxt.txt

This appends the current date and time, followed by the post content, to the file.

Now we can share our thoughts with every twtxt user. We upload the file to the web server and share its path (for example, https://my-server/twtxt.txt). Anyone who wants to follow us adds our URL to their feed.

Since each user is responsible for their own feed, it becomes a decentralized social network.

The next question is: how do you follow other users? If I want to follow a couple of friends, checking their feeds manually is no big deal. But if we want to follow more users, or receive notifications for mentions, we will need some tool to help us.

Mentions

In twtxt, just like in other social networks, you can mention other users.

The format is: @< + user nick + space + user feed url + >. For example, if I want to mention a user with the nick foo whose feed is at https://example.com/twtxt.txt, the format would be @<foo https://example.com/twtxt.txt>.

2024-09-29T13:30:00Z Hey @<foo https://example.com/twtxt.txt>, I loved your last post.

There is also a mechanism to reference a specific post from another user, creating a conversation thread through a hash. You can check the extension.

Following other users

Following other users can be as basic as checking their feeds for new posts. However, we need to make it easier to gather all the feeds of the users we follow in one place, sort them by date, and know whether there are new posts. For that we have the twtxt clients the community has been developing.

There is an official terminal client written in Python. You can install it with pip:

pip install twtxt

You will be able to manage your subscriptions, check new publications, and build a timeline with the posts of the users you follow, much like an RSS feed reader or a microblogging app.

Every social network offers space to configure your profile. In twtxt this is done as simply as publishing a post.

Profile configuration

You can customize your twtxt feed with a few options so that other users can get to know you better. You only need to add a few lines at the top of the text file:

# nick = my-nick
# url = https://my-server/twtxt.txt
# avatar = https://my-server/avatar.png
# description = I define myself as a twtxt user.
2024-06-15T07:36:15Z    Hi Twtxt
2024-06-15T08:03:42Z    I like it
  • nick: Your username. It can be whatever you want, there will be no conflicts.
  • url: URLs pointing to your feed or related to you (website, blog, etc). You can add several lines.
  • avatar: URL of the profile image.
  • description: Description of your profile.

As you can see, it could not be simpler. You just add to the top of the feed: # + option name + = + option value. Easy to read and easy to write.

The biggest problem when using a client, or editing the feed with your favorite text editor, is that you cannot use several devices. If you want to read your feed on your phone, your laptop, or your desktop, you will have to sync them manually. And this is where Pods come into play, on top of solving some limitations that clients carry.

Pod

Using a client, by its very nature, carries some important limitations. For example, you cannot check your timeline on different devices, there is no way to discover new users beyond your circle, and it is not easy to receive notifications. For this very reason, the twtxt community created Pods.

A Pod is similar to an instance in the network, like the ones in Mastodon or Pleroma. A node that interacts with other nodes to share feeds, notifications, and user lists. They also hide a community-building component, that is, they gather users who can interact with each other. This helps you read posts beyond your subscriptions, making it easier to explore new accounts. Besides, since Pods are online tools, they offer web interfaces that make it easier to manage the accounts you follow, or writing tools (like Markdown support). This does not mean you stop using the client, it can be a complement to improve the experience.

On the other hand, if the available software does not convince you, the documentation to build your own Pod is at your disposal. The spec is not complex to implement, unlike others such as ActivityPub. I would dare to say it can be a little game for your idle time. I encourage you to read the official documentation.

Registry

Because of twtxt's own decentralized nature, you do not have humble features such as global user searches, filtering by tags, or receiving a notification if a user you do not follow has mentioned you. Basic interactions you expect from any social network, which are also trivial. The fact that information is not monolithic, but distributed, brings certain problems. And that is why the Registry was created.

A Registry is an index of feeds that is updated periodically. From your client or Pod, you can talk to it to perform some actions: add your feed to the index, search posts by keywords, find mentions and users, and filter by tags. It enriches clients and Pods with very valuable information. It is also a tool to discover new users and feeds, and for other users to discover you.

Conclusions

We have touched on many concepts in this article. To sum up, I would like to compare the three main elements of twtxt.

Feed Client Pod Registry
Function Publish posts and configure the profile. Read and publish posts. Manage feeds and communities. Index feeds and search posts.
Purpose Share thoughts and tastes. Interact with other users. Discover new feeds and users. Search posts and mentions.
Similarity A plain text file with posts. A console client to read feeds. A node that hosts feeds and communities. An index of feeds to search posts.
Example https://my-server/twtxt.txt pip install twtxt twtxt.net as one of the most popular pods. registry.twtxt.org
Interaction Manually with a text editor. Terminal or graphical interface. Web interface. API.

Over time you understand that twtxt is a social network that stands out for its simplicity, but above all for its "pure" focus on content. In twtxt there are no likes, retweets (boosts in Mastodon), quotes, suggestions, or algorithms; only publications in a raw plain text feed. It holds up because there are users who share the URL of their feed. Everything else are complementary tools, not mandatory, to improve the experience or the interaction. You can even use it as a simple alternative to an RSS or Atom feed for your personal blog. Use it however you see fit.

I hope you can give a chance to a social network as different and minimalist as twtxt.

To finish, I would like to share some links of interest so you can dig deeper:

  • Official documentation.
  • Extensions: List of extensions, or innovations, you can add to your feed to improve connectivity. They are all optional, but some are very interesting, like multiline, the hash to create threads, or the ability to add metadata.
  • twtxt: Official console client in Python.
  • twtxt.net: Official twtxt Pod. You can sign up and start publishing.
  • Yarn: Self-hosting a Pod. Equivalent to having your own feed manager and web interface.
  • jenny: Console client with Maildir integration.
  • twtxt.el: Emacs client. I am involved in its development.
  • Specifications and community: Website with technical information, extensions, and the status of some projects.
  • Official Registry: Official twtxt Registry. You can search users, tags, or posts.
  • tilde.institute Registry.
  • ENVS.NET Registry.

See you next time!

Help me keep writing

Every coffee gives me a push toward the next article.

Comments

There are no comments yet.

You may also like