yarn.social logo

yarn.social

  •  0 ratings
In category: Communication / Social Networks and Forums

About yarn.social

Self-Hosted, Twitter™-like Decentralised micro-logging platform. No ads, no tracking, your content, your data.

  •   481  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: 2,284  
  •   29  
  •   21  
  •  Latest commit: N/A  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about yarn.social

Yarn social

Yarn - a decentralised self-hosted social media that has a privacy-first focus.

View the chinese version of this document

Installation

Pre-built Binaries

As a first point, please try to use one of the pre-built binaries that are available on the Releases page.

Using Homebrew

We provide Homebrew formulae for macOS users for both the command-line client (yarnc) as well as the server (yarnd).

brew tap yarnsocial/yarn https://git.mills.io/yarnsocial/homebrew-yarn.git
brew install yarn

Run the server:

yarnd

Run the command-line client:

yarnc

Building from source

This is an option if you are familiar with Go development.

  1. Clone this repository (this is important)
git clone https://git.mills.io/yarnsocial/yarn.git
  1. Install required dependencies (this is important)

Linux, macOS:

make deps
Note that in order to get the media upload functions to work, you need to install ffmpeg and its associated -dev packages. Consult your distribution's package repository for availability and names.

FreeBSD:

  • Install gmake
  • Install pkgconf that brings pkg-config
gmake deps
  1. Build the binaries

Linux, macOS:

  • The server

make server
- The client

make cli
- List all options

make help

FreeBSD:

gmake

Usage

Command-line Client

  1. Login to your Yarn.social pod:

```#!console $ ./yarnc login INFO[0000] Using config file: /Users/prologic/.twt.yaml Username:


2. Viewing your timeline

```#!console
$ ./yarnc timeline
INFO[0000] Using config file: /Users/prologic/.twt.yaml
> prologic (50 minutes ago)
Hey @rosaelefanten 👋 Nice to see you have a Twtxt feed! Saw your [Tweet](https://twitter.com/koehr_in/status/1326914925348982784?s=20) (_or at least I assume it was yours?_). Never heard of `aria2c` till now! 🤣 TIL

> dilbert (2 hours ago)
Angry Techn Writers ‣ https://dilbert.com/strip/2020-11-14

  1. Making a Twt (post):

``#!console $ ./yarnc post INFO[0000] Using config file: /Users/prologic/.twt.yaml Testingyarn` the command-line client INFO[0015] posting twt... INFO[0016] post successful


For additional help on using the `yarnc` command-line client:

```#!console
$ yarnc help
This is the command-line client for Yarn.social pods running
yarnd. This tool allows a user to interact with a pod to view their timeline,
following feeds, make posts and managing their account.

Usage:
  yarnc [command]

Available Commands:
  completion  generate the autocompletion script for the specified shell
  help        Help about any command
  login       Login and authenticate to a Yarn.social pod
  post        Post a new twt to a Yarn.social pod
  stats       Parses and performs statistical analytis on a Twtxt feed given a URL or local file
  timeline    Display your timeline

Flags:
  -c, --config string   set a custom config file (default "/Users/prologic/.yarnc.yml")
  -D, --debug           Enable debug logging
  -h, --help            help for yarnc
  -t, --token string    yarnd API token to use to authenticate to endpoints (default "$YARNC_TOKEN")
  -U, --uri string      yarnd API endpoint URI to connect to (default "http://localhost:8000/api/v1/")

Use "yarnc [command] --help" for more information about a command.

Deploy With Docker Swarm and Cloudflare

Visit: deployment

Deploy with Docker Compose

Run the compose configuration:

docker-compose up -d

Then visit: http://localhost:8000/

Web App

Run yarnd:

yarnd -R

NOTE: Registrations are disabled by default so hence the -R flag above.

Then visit: http://localhost:8000/

You can configure other options by specifying them on the command-line or via environment variables.

To view the available options simply run:

$ ./yarnd --help

Valid environment value names are the long-option version of a flag in all uppercase with dashes repalced by an underscore _.

Configuring your Pod

At a bare minimum you should set the following options:

  • -d /path/to/data
  • -s bitcask:///path/to/data/twtxt.db (we will likely simplify/default this)
  • -n <name> to give your pod a unique name.
  • -u <url> the base url (public facing) of how your pod will be reahced on the web.
  • -R to enable open registrations.
  • -O to enable open profiles.

Most other configuration values should be done via environment variables.

It is recommended you pick an account you want to use to "administer" the pod with and set the following environment values:

  • ADMIN_USER=username
  • ADMIN_EMAIL=email

In order to configure email settings for password recovery and the /support and /abuse endpoints, you should set appropriate SMTP_ values.

It is highly recommended you also set the following values to secure your Pod:

  • API_SIGNING_KEY
  • COOKIE_SECRET
  • MAGICLINK_SECRET

These values should be generated with a secure random number generator and be of length 64 characters long. You can use the following shell snippet to generate secrets for your pod for the above values:

$ cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n 1

There is a shell script in ./tools/gen-secrets.sh you can use to conveniently generate the required secrets for a production pod. The output is designed to by copy/pasted into a docker-compose.yml file with the right indentation.

DO NOT publish or share these values. BE SURE to only set them as env vars.

NOTE: The Dockerfile specifies that the container run as the user yarnd with uid=1000. Be sure that any volume(s) you mount into your container and use as the data storage (-d/--data) path and database storage path (-s/--store) is correctly configured to have the correct user/group ownership. e.g: chorn -R 1000:1000 /data

Production Deployments

Docker Swarm

You can deploy yarnd to a Docker Swarm cluster by utilising the provided yarn.yaml Docker Stack. This also depends on and uses the Traefik ingress load balancer so you must also have that configured and running in your cluster appropriately.

docker stack deploy -c yarn.yml

Contributing

Interested in contributing to this project? You are welcome! Here are some ways you can contribute:

  • File an Issue -- For a bug, or interesting idea you have for a new feature or just general questions.
  • Submit a Pull-Request or two! We welcome all PR(s) that improve the project!

Please see the Contributing Guidelines and checkout the Developer Documentation or over at /docs.

Contributors

Thank you to all those that have contributed to this project, battle-tested it, used it in their own projects or products, fixed bugs, improved performance and even fix tiny typos in documentation! Thank you and keep contributing!

You can find an AUTHORS file where we keep a list of contributors to the project. If you contribute a PR please consider adding your name there.

Related Projects

License

yarn is licensed under the terms of the AGPLv3 License

Comments (0)

Please login to join the discussion on this project.

yarn.social Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 7k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Dashboard

in Personal Dashboards
 5k    0    0    0  

Audiobookshelf

in Audio Streaming
 5k    0    1    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 1k    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

Cactus Comments logo
Cactus Comments cover

Cactus Comments

Cactus Comments is a federated comment system for the open …

Misskey logo
Misskey cover

Misskey

Decentralized app-like microblogging server/SNS for the Fed…

Movim logo
Movim cover

Movim

Modern, federated social network based on XMPP, with a full…