Skip to content

Quick start

The aim of this guide is to provide a quick introduction on how to test an application locally using the provided tools.

HTTP Message Signatures

By running

docker run -p 2917:80 -ti helgekr/pasture http_signature
podman run -p 2917:80 -ti docker.io/helgekr/pasture http_signature

one can start the tool to test a HTTP signature implementation. One can verify it works via

curl -H "Signature: wrong" localhost:2917

{
    "steps": [
        "Got get request",
        "With headers: Remote-Addr: 172.17.0.1\r\nHost: localhost:2917\r\nUser-Agent: curl/7.81.0\r\nAccept: */*\r\nSignature: wrong\r\n\r\n",
        "Signature header 'wrong'"
    ],
    "x error": [
        "Failed to parse signature",
        "IndexError('list index out of range')"
    ]
}

Verifying your actor

By running

docker run -p 2909:80 -ti helgekr/pasture verify_actor localhost:2909
podman run -p 2909:80 -ti docker.io/helgekr/pasture verify_actor localhost:2909

one can start the verify actor container. It is then available at http://localhost:2909.

Running an Application from the Fediverse Pasture

The Fediverse pasture provides prebuilt containers and docker-compose.yml files to provide versions of popular Fediverse applications to develop against. As the setup for some of the applications requires a database and a task runner, these files tend to more complex than a single docker commando.

In order to start, we will first download the zip file containing the files

Download

Alternatively, you can clone the repository and navigate to the appropriate folder via

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

We can start akkoma via

docker compose --file akkoma.yml up

this will create a user accessible via the credentials

Domain Username Password
http://localhost:2975/ witch password

We note that the port 2975 is forwarded from 80 inside the container.

We can start bovine via

docker compose --file bovine.yml up

bovine provided by this is very simple. It does not come with a graphical interface as most other applications do. Instead, we will focus on the provided moocow. This means, if you mention @moocow@bovine in any of the other applications, while bovine is running, you will get a reply back. See the screenshot

Screenshot shows @moocow@bovine replying with a moo

We can start mastodon via

docker compose --file mastodon.yml up

this will create a user accessible via the credentials

Domain Email Password
http://localhost:2970/ hippo@mastodon.localhost password

We note that the port 2970 is forwarded from 80 inside the container.

We can start mitra via

docker compose --file mitra.yml up

this will create a user accessible via the credentials

Domain Username Password
http://localhost:2976/ admin password

We note that the port 2976 is forwarded from 80 inside the container.

We can start mitra via

docker compose --file sharkey.yml up

Currently, you have to open http://localhost:2974/ and create an account. We suggest the username willy and the password password.

We note that the port 2974 is forwarded from 80 inside the container.

Connecting to other pasture applications

If your base folder is called fediverse-pasture, then the docker network this runs on is fediverse-pasture_default as can be seen from running docker network ls. You can now start the actor verification tool via

docker compose --file pasture.yml up pasture_verify_actor

It will be available at http://localhost:2909/.