Skip to content

Fediverse-pasture

Fediverse applications that you can run local to have easily deployable versions to test/develop against.

Quick start

First download the archive and unzip it

curl -o fediverse-pasture.zip https://pasture.funfedi.dev/assets/fediverse-pasture.zip
unzip fediverse-pasture.zip

and then you can your application of choice via

docker compose --file fediverse-pasture/akkoma.yml up
docker compose --file fediverse-pasture/cattle_grid.yml up
docker compose --file fediverse-pasture/gotosocial.yml up
docker compose --file fediverse-pasture/hollo.yml up
docker compose --file fediverse-pasture/mastodon.yml up
docker compose --file fediverse-pasture/mbin.yml up
docker compose --file fediverse-pasture/misskey.yml up
docker compose --file fediverse-pasture/mitra.yml up
docker compose --file fediverse-pasture/pleroma.yml up
docker compose --file fediverse-pasture/sharkey.yml up

The containers will take a while to startup and automatically create a user with credentials. The port being forwarded to localhost depends on the application, so all of them can be run in parallel.

Forwarded address Username Password Actor Handle
http://localhost:2975/ witch password witch@akkoma

Info

cattle_grid is different than other Fediverse applications. It tries to be a middleware that does some stuff and not others. So what is presented here is a demo connection based on the RabbitMQ Web MQTT plugin.

Websocket Username Password Actor Handle
ws://localhost:15675/ws guest guest `guest@cattle_grid

One can use MooQTT to connect to this socket.

Forwarded address Email Password Actor Handle
http://localhost:2978/ cookie@gts PaSs123$abc&* cookie@gts

Warning

Gotosocial does not come with an UI. Checking /admin can lead to weird errors. Checking with alternative interfaces was not done.

Forwarded address Email Password Actor Handle
http://localhost:2981/ john@example.com password john@hollo
Forwarded address Email Password Actor Handle
http://localhost:2970/ hippo@mastodon.localhost password hippo@mastodon
Forwarded address User Password Actor Handle
http://localhost:2980/ oscar grouch oscar@mbin

Warning

You currently need to create a magazine manually, see containers#54

Forwarded address Username Password Actor Handle
http://localhost:2973/ kitty password kitty@misskey
Forwarded address Username Password Actor Handle
http://localhost:2976/ admin password admin@mita
Forwarded address Username Password Actor Handle
http://localhost:2972/ full password full@pleroma
Forwarded address Username Password Actor Handle
http://localhost:2974/ willy password willy@sharkey

Talking to each other

As mentioned before, it is possible to run the various Fediverse applications in parallel. For example

docker compose --file mastodon.yml --file mitra.yml up --detach

Conversation between Mitra and Mastodon

will start both a Mastodon and Mitra instance. The command will finish once both servers are running, due to the --detach flag. The accounts can then be accessed using the login information above and by mentioning admin@mitra respectively hippo@mastodon, they can message each other.

Tip

It may take a few seconds after the docker compose command finishes for messages to be actually delivered. Similarly, the processing between sending a message in one window and it arriving in the second, can take a few seconds.

Generating traffic with the pasture container

By running

docker compose --file misskey.yml up --detach

we start the misskey container and then log in at http://localhost:2973/ with credentials kitty and password. After clicking through the popups.

By running

docker compose --file pasture.yml run pasture_runner python -mfediverse_pasture hello misskey

one can then send a "Hello World" message to misskey. This message will appear in the global timeline.

Docker networking

All containers are configured with the network fediverse-pasture via

networks:
  default:
    name: fediverse-pasture
    external: true

So if you want to test your own implementation against these, you have to specify this networks. The hostnames correspond to the application names.

Technical comments

The containers used in the fediverse-pasture are build here. The reason for using custom containers is explained below. The docker files are available in the repository.

Running different versions

By default the latest versions available here will be used. By specifying the environment variable VERSION another versions can be run. For example to run Mastodon v4.1.16 run

VERSION=v4.1.16 docker compose --file mastodon.yml up

Difference to production versions

The containers and docker compose files used here should be not used for production, a few reasons:

  • Users, passwords and access tokens are created automatically and set to default values
  • Servers are adapted to use HTTP. This makes local usage easier, and allows debugging of HTTP requests through packet capture
  • Databases are in a volatile state and are deleted with their docker container

Repository and testing

One can clone the repository containing the docker compose files via

git clone https://codeberg.org/funfedidev/fediverse-pasture.git

By running ./test.sh one can ensure that the docker compose files are valid and that the network configuration is correct.

The tests automatically run in CI: status-badge

Funding

This code was created as part of Fediverse Test Framework.

A project funded through the NGI0 Core Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101092990.