Epiktistes

Epiktistes is my home in the Fediverse. It is an instance of Ktistec, a single-user ActivityPub server like Mastodon, but with fewer users and fewer commits. Here's my introduction (last updated early-2025).

I wrote a series of posts about optimizing the performance of the Ktistec server, its build time, and its executable size: part 1, part 2, part 3, part 4, and part 5.

Some things I regularly write about, organized by hashtag:

I also wrote some #pointfreeverse.

Todd Sundstedwl
Todd Sundsted shared a note by wl Nov 21, 2021

First time hosting much of a website myself, it's going ok now. Running ktistec for the activitypub federation stuff.


Hosting it on Hetzner's CPX11 (Memory: 2GB, Cores: 2) seems perfectly fine but you can't build the server if you don't have any swap (w/ 2gb mem), of which were my circumstances I discovered. The default Debian iso on Hetzner doesn't have any, so now you know.

But I had an obvious idea after @toddsundsted@epiktistes.com told me to build it and then run the binary: build it on my machine and then transfer it over to run said binary, 16GB of RAM should do after all. And it did with slight trouble.

I cloned the repository, checked out the dist branch, and ran the suggested command: crystal build src/ktistec/server.cr

Subsequently an error:

/usr/bin/ld: cannot find -lgmp (this usually means you need to install the development package for libgmp)

On Fedora the package to install was gmp-devel

Ran the build command again, no error just warnings:

In src/controllers/remote_follows.cr:33:54

 33 | location = lookup(account).gsub("{uri}", URI.encode(actor.iri))
                                                   ^-----
Warning: Deprecated URI.encode. Use `.encode_path` instead.

In /usr/share/crystal/src/uri/encoding.cr:119:25

 119 | String.build { |io| encode(string, io, space_to_plus: space_to_plus) }
                           ^-----
Warning: Deprecated URI.encode:space_to_plus. Use `.encode_path` instead.

A total of 2 warnings were found.

Warnings I can live with, but the resulting binary I can't because I stupidly built a dynamically linked one on my own system. Reading some documentation tells me about the --cross-compile flag:

This will generate a .o and will print a line with a command to execute on the system we are trying to cross-compile to.
[...]
You must copy this .o file to that system and execute those commands. Once you do this the executable will be available in that target system.

Simple enough, it gave me a command to run on my VPS. Transfer over the server.o file, and removed some weird "command -v pkg-config" stuff and here the command is:
cc server.o -o server  -rdynamic -L/usr/lib64/crystal -lgmp  -lxml2  -lsqlite3  -lz -lcrypto -lpcre -lm -lgc -lpthread -levent  -lrt -ldl -lm

Which Debian said to me:
/usr/bin/ld: cannot find -lgmp
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lsqlite3
/usr/bin/ld: cannot find -lz
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status

Promptly I hunted down the appropriate dev packages for:
sudo apt install libgmp3-dev zlib1g-dev libsqlite3-dev libxml2-dev

Run the linking command again. It works.

$ ./server and here we are.

Todd Sundsted

a major milestone in the life of ktistec... with the release of blocking, the database schema for 1.0 is now fixed. this means no more migrations. i'm working on a few interoperability issues, and then i'll tag 1.0.

#ktistec

Todd Sundsted

commits a2f3fad to 485dbf2 add support for blocking actors and objects. like many things, blocking is built on the back on a lot of earlier cleanup and refactoring.

as expected, blocking an actor removes the actor and its content from your timelines. blocking an object removes only that object.

finishing this is the last blocker to a 1.0 release. 🎉

#ktistec

Todd Sundsted

i'm blocking the next person i see talking about meta on my fediverse feed...! (leave that stuff behind you!)

Todd Sundsted

it's a shield/lasgun kind of day...

Todd Sundsted
today’s sculpture project
Todd Sundsted
a sea of fog over the valley
Todd Sundsted

my wife commissioned an amazing halloween family portrait from a local artist.

sundsted manor

i just love this!

the extended family

even saki, the dog!

Todd Sundsted

和楽器バンド / Wagakki Band

I still enjoy this particular performance immensely.

https://www.youtube.com/watch?v=ponTbDDMYjw

焔 / Homura + 暁ノ糸 / Akatsuki no Ito

Todd Sundsted