Custom emoji are a feature of Pleroma and a bunch of other fediverse software that enables you to embed tiny inline images in your posts. Possible uses are endless and range from generic reaction images to a 50 MB gif of a dog vomiting during sex or extremely zoomed in photo of some nazi podcaster's wife's nose that will get your entire server defederated by poa.st.
Pleroma and Misskey (and probably some other software) support any images as custom emoji. Mastodon, on the other hand, is extremely limited when it comes to federating emojis. It will only accept .png files up to some ridiculously small size, something like 50 kB. Anything other than that will just show as :whatever: on Mastodon instances. I personally don't care but someone might so I included it here.
You probably tried to add some custom emoji using Pleroma's AdminFE. If you're lucky it didn't do anything for a minute and then threw something like "Timeout of 60000ms exceeded". If you're not as lucky it crashed the whole server and you had to log in using your VPS provider's website and restart the dead VM. In any case you didn't add any emoji.
The solution for this is surprisingly simple considering how ridiculously overcomplicated some other shit is with Pleroma. Basically you make a folder, add a bunch of images and a .txt file listing them and then restart Pleroma.
First you need to locate your instance's static directory. This is the tricky part since that path varies widely between builds and releases and the official documentation is not helpful at all. If you know where your config file is (should be /opt/pleroma/config/prod.secret.exs
for source installs and /etc/pleroma/config.exs
for OTP, not sure if this applies to all forks and builds), it should contain the static dir path, something like config :pleroma, :instance, static_dir: "/var/lib/pleroma/static"
. If not, good luck, but here are the paths I encountered myself: /var/lib/pleroma/static
for OTP Pleroma and /opt/akkoma/instance/static
for source Akkoma. As I said, good luck.
Once you locate the static directory it's actually much simpler than I expected. Inside the static dir you have a folder called emoji. Enter that folder (so in my case cd /var/lib/pleroma/static/emoji
.
A NOTE ABOUT LINUX AND PERMISSIONS AND SHIT: Static directory is owned by Pleroma user and not whatever your user is (ubuntu in my case) which means you'll encounter access denied errors when doing shit. There are 2 ways to fix this: if you're a nerd you'll switch to Pleroma user, if you're a real man you'll run every command as sudo. I'll run everything as sudo here, not as much because nerd shit but so that, if someone's just copy pasting shit without reading the whole thing, they don't encounter any errors.
Inside that folder you should find one or more folders, one for each "pack" of emoji. DO NOT MANUALLY PUT EMOJI IN ANY OF THE EXISTING FOLDERS, YOU'LL FUCK EVERYTHING UP. Make a new folder (or multiple of you want to bother organizing emoji for whatever reason), in my case I'm making a single folder called test1 sudo mkdir test1
and then enter it sudo cd test1
(shouldn't need sudo for cd but who knows). Ibsude the folder add some images you want to add as emojis. There's a bunch of ways to get images into a folder, I'll just wget some from a remote server sudo wget https://shitpisscum.mooo.com/emoji/test1/dogsexvomitcube.gif
and sudo wget https://social.mrhands.horse/emoji/cum/sneedbuddy.png
Then make a file called emoji.txt sudo vim emoji.txt
(Luke Smith would be proud). List your images inside like this, one row for each emoji:
dogsexvomitcube, /emoji/test1/dogsexvomitcube.gif sneedbuddy, /emoji/test1/sneedbuddy.png
Left name is the emoji shortcode (how you call it in posts, like :sneedbuddy: but without ::), test1 is whatever you named the folder you made and the name after that is the file name. Once you're done save that file. Restart Pleroma sudo systemctl restart Pleroma
and it should work.