$ git clone https://github.com/go-ap/fedbox
$ cd fedbox$ make allCompiling for a specific storage backend:
$ make STORAGE=sqlite allCompiling for the production environment:
$ make ENV=prod all$ cp .env.dist .env
$ $EDITOR .envThis step ensures that the storage method we're using gets initialized.
$ ./bin/fedbox storage bootstrapFor a more advanced example, the bootstrap.sh script has a more elaborate use case to
automate bootstrapping a project together with adding an Actor and an OAuth2 client.
FedBOX also supports loading magic files for the root actor's password and private key.
If you place a {root-actor-iri}.pw and {root-actor-iri}.key at the root of your storage path
FedBOX loads them and uses them at startup time.
The pw file is a file containing the password in plain text. The key file needs to be a PEM encoded private key.
These files get removed after a fist successful start.
The logs will contain output similar to:
TRC Found private key typ=RSA valid=true
TRC Found valid password file pw=pa****rdFedBOX is strictly an ActivityPub server, so despite the fact that it advertises OAuth2 authorization endpoints for its actors, it does not provide them.
In order to make use of that functionality and be able to go through an authorization flow, you need to have running the authorization microservice alongside it.
It should be able to run using the same configuration .env file as FedBOX.
This adds the additional requirement that the requests done to the OAuth2 authorization endpoints are proxied to the correct service.
Here's an example for caddy:
# actors oauth endpoints
handle /actors/*/oauth/* {
reverse_proxy http://authorize-service:1234 {
transport http
}
}
# root service oauth endpoints
handle /oauth/* {
reverse_proxy http://authorize-service:1234 {
transport http
}
}Similarly to how OAuth2 is handled by a different service that uses the same storage backend as FedBOX, for providing web-finger we have a different microservice for .well-known end-points.
It can also be run with the same configuration .env file as FedBOX.
Similarly to above, it needs additional request proxying setup:
handle /.well-known/* {
reverse_proxy http://well-known-service:4555 {
transport http
}
}See the containers document for details about how to build podman/docker images or use the existing ones.