Toki
n. (toki pona) - communication, speech
A C# ActivityPub Fediverse-compatible server designed mostly for small-ish instances.
I'm working on it as sort of a personal challenge, considering I've always wanted to implement the ActivityPub protocol.
While Toki has its own frontend called luka, it supports the Mastodon API protocol, allowing it to be used with your favorite client.
Do note that Toki isn't considered truly stable for the time being, and while it is very much usable for usage, it might still undergo changes.
Toki doesn't have an admin panel yet. There are plans to make one and the required steps are outlined in the Administration Roadmap issue. (If anyone would want to help out with it, I'd be insanely thankful...)
Firstly, make sure that the .NET 8 runtime is installed, alongside Docker.
-
Clone the repository to a directory of your choice.
-
Inside of the repository, run
docker compose up -d
to initialize and run all of the docker containers required by Toki. -
After that, navigate to the
Toki.Admin
repository. -
Inside of there, execute
dotnet run <path to appsettings.json> setup
to perform the first-time setup.a. NOTE: The
appsettings.json
file is located in theToki
folder, and the path to it must be absolute. (that is, if the folder of theToki
folder is/opt/toki/Toki
, the path toappsettings.json
would be/opt/toki/Toki/appsettings.json
)b. NOTE 2: You must create the directory you've specified as the upload directory. Toki doesn't do it automatically.
-
Navigate to the
Toki
directory. From there rundotnet run --configuration Release --auto-migrate
to perform the neccessary migrations and run Toki for the first time.
Toki should now be up and running!
In order to update an already existing version of Toki, you must:
-
Stop the currently running Toki instance
-
Navigate to the root of the git repository and
git pull
the latest changes. -
Navigate to the
Toki
directory and from there rundotnet run --configuration Release --auto-migrate
. This will automatically perform the database migrations (if any happened).
By default Toki doesn't launch with a frontend. Unlike Pleroma/Akkoma we don't support installing frontends from the admin panel yet, but manual installation is still possible.
As a prerequisite, the latest version of Node.JS is required.
-
Clone luka into a directory of your choice.
-
Navigate to the luka folder.
-
Inside of the luka git repository, navigate to
src/config
and inside of theconfig.js
file, edit it to point to the domain of your Toki instance. -
Run
npm install
to install all of the required packages. -
Run
npm run build
to build the release version of Luka. -
Copy all of the files from the
dist
folder to<toki git repo>/Toki/wwwroot
. -
In the
appsettings.json
file, add (or modify if it already exists) the following section:
"Frontend": {
"Enabled": true,
"SpaFilename": "index.html"
}
- Restart Toki, and luka should be already running!
As a prerequisite, the emojis should be packed in a zip file without any subdirectories with the names <the emoji name you want>.<extension>
.
If you already have the zip file ready:
-
Navigate to the
Toki.Admin
folder. -
From there, execute
dotnet run <path to appsettings.json> importemojipack --path <path to your zip file>
. Toki should automatically extract the emojis and add them to the database. -
Restart Toki, and enjoy your emojis!
Toki contains the server & Web backend.
Toki.ActivityPub contains all of the ActivityPub related logic, like the models, and various resolvers.
Toki.ActivityStreams contains the ActivityStreams implementation.
Toki.HTTPSignatures contains our HTTP signatures implementation.
If you'd really want to contribute to this project (thank you!) please adhere to the Conventional Commits commit format as much as you can.
- .NET 8
- PostgreSQL (as the database)
- Redis (for the job queue)