snac.matoken.org is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Site description
matokenの個人ActivityPub インスタンスです.
Admin account
@matoken@snac.matoken.org

Search results for tag #snac

[?]ティージェーグレェ » 🌐
@teajaygrey@snac.bsd.cafe

Groovy!

I submitted a Pull Request to update MacPorts' snac to 2.87 here:

https://github.com/macports/macports-ports/pull/30679

It's churning through GitHub Continuous Integration checks (1 of 3 passed so far which is a good sign the other two will complete successfully).

It's up to someone else with commit access to merge it.

p.s. the other day I read your napcop proposal and I dig the acronym. ;)



    matoken boosted

    [?]The Real Grunfink » 🌐
    @grunfink@comam.es

    Hi, everyone. I've just published version 2.87 of , the simple, minimalistic instance server written in C. It only includes a single change, to avoid using EmojiReacts to harass users:

    Hide EmojiReacts from muted actors and blocked instances.

    Sorry for the inconvenience. Bad people creativity always gets me off-guard. Upgrade your snac to this version ASAP, or revert to 2.85.

    There will be another release pretty soon with a better solution to delete offending EmojiReacts.

    https://comam.es/what-is-snac


      [?]Stefano Marinelli » 🌐
      @stefano@mastodon.illumos.cafe

      The instance has been upgraded to 2.87

        [?]Deekshith Allamaneni » 🌐
        @dk@social.deekshith.in

        Everything seem to be working fine on this self hosted instance so far but missing these (probably deliberately):
        • Cannot see number of followers/followed
        • No global timeline
        I am using a lightweight ActivityPub server written in C. It's really light and I am loving it so far. :)
        I cannot afford to self host or similar which are resource hogs.


          [?]ティージェーグレェ » 🌐
          @teajaygrey@snac.bsd.cafe

          Thank you!

          Also, thanks to lxo, violette, fruye and to anyone else who may have helped contributed to this release!

          I've submitted a Pull Request to update MacPorts' snac to 2.86 here:

          https://github.com/macports/macports-ports/pull/30669

          Currently one of three Continuous Integration checks passed (which is a good sign the other two will probably pass soon too).

          It's up to someone else with commit access to merge it.



            [?]Oliver ⚡ » 🌐
            @oliver@microhive.me

            I've just updated my instance to stable version 2.86 👍 🎉
            You don't know Snac? But you should: https://codeberg.org/grunfink/snac2
            A simple, minimalistic and well documented instance server written in C, no database needed, totally JavaScript-free, no cookies either, not much bullshit.
            A lot of new great stuff in version 2.86, among other things, we now also have emoji reactions! Wooohoo!! 🤩


              [?]daltux » 🌐
              @daltux@snac.daltux.net

              If the query variable terse of a public post page is set to anything, no header is shown.
              Only now I saw this sentence and tested it. Very nice, good job! :blobYes:

              Also I'm using a lot

              keeps evolving :geordiLike:

                0 ★ 0 ↺

                [?]matoken » 🌐
                @matoken@snac.matoken.org

                を2.86 にした
                新機能はまだ試していない
                https://codeberg.org/grunfink/snac2/src/branch/master/RELEASE_NOTES.md#2-86
                $ git checkout 2.86
                Previous HEAD position was c741c30 Updated RELEASE_NOTES.
                HEAD is now at b84b92d Version 2.86 RELEASED.
                $ make
                $ ./snac | head -2
                snac 2.86 - A simple, minimalistic ActivityPub instance
                Copyright (c) 2022 - 2026 grunfink et al. / MIT license
                $ sudo -u snac /home/snac/snac2/snac upgrade ~snac/snac-data
                05:52:38 OK
                $ sudo -u snac /home/snac/snac2/snac httpd ~snac/snac-data
                Emoji reactions:
                  matoken boosted

                  [?]The Real Grunfink » 🌐
                  @grunfink@comam.es

                  I've just published version 2.86 of , the simple, minimalistic instance server written in C. Once again, most of the work has been done by fellow developers because they are the best. It includes the following changes:

                  Truncate RSS titles at UTF-8 character boundaries (contributed by lxo).

                  Link contacts to single-user people pages. Also, user's posts are shown (contributed by lxo).

                  Added emoji reactions (contributed by violette).

                  Mastodon API: Fix for some client notifications (contributed by violette), fix for a status visibility error (contributed by fruye).

                  If the query variable terse of a public post page is set to anything, no header is shown.

                  Fixed search failures when the query string has any leading blank.

                  https://comam.es/what-is-snac

                  If you find useful, please consider buying grunfink a coffee or contributing via LiberaPay.


                  Emoji reactions:

                    [?]The Real Grunfink » 🌐
                    @grunfink@comam.es

                    The migration from Mastodon process has several steps. If you've already done the move to get your followers, you must download your following_accounts.csv from your old Mastodon account and import them to your new account. It's documented here:

                    https://comam.es/snac-doc/snac.8.html#Migrating_from_snac_to_Mastodon

                      [?]patricus » 🌐
                      @patricus@snac.posix.live

                      how to import my following to ? I got my followers but I don't have who I followed

                        [?]R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou: » 🌐
                        @rl_dane@polymaths.social

                        @riverpunk

                        Mastodon itself doesn't support formatting, but other fediverse software like #GoToSocial, #snac, and #GlitchSocial do.

                        Consider migrating to an instance running one of those. :)

                        • real
                        • markdown
                        • support
                        • is
                        • fun

                          [?]eltheanine » 🌐
                          @eltheanine@the.teabag.ninja

                          I was thinking about what @JenJen@mastodon.art said on stream regarding needing the pretty in order to use something.

                          So true. I have to want to use something, or I just won't.

                          And is why I redid my css for , , and .

                          https://the.teabag.ninja/2026/01/02/new-year-new-css/

                            [?]eltheanine » 🌐
                            @eltheanine@the.teabag.ninja

                            While here, I also must thank:
                            @prahou@merveilles.town for
                            @grunfink@comam.es for
                            @stefano@bsd.cafe for

                            Without their time and effort, my small presence online would not exist in its current form.

                            These projects can be found on their profiles, for anyone curious.

                            🧡

                              [?]Marcel Stritzelberger » 🌐
                              @marzlberger@neander.social

                              Oh yeah, I just discovered that @grunfink is working fine now with @IceCubesApp

                              Wonderful!

                                [?]SnowSNAC » 🌐
                                @snow@snac.prove.noho.st

                                Manuale d’uso di SNAC2, guida semplice

                                Benvenuto su SNAC2. Qui trovi le istruzioni essenziali per usarlo ogni giorno, scrivere post, rispondere e gestire chi segui.



                                1) Entrare e capire le pagine

                                Quando apri SNAC2 dal browser vedrai due “mondi”.

                                Pagina pubblica

                                È il profilo visibile a tutti.
                                - mostra i post pubblici
                                - chiunque può leggerla senza password

                                Area privata, dopo il login

                                È la tua “casa”.
                                Qui puoi
                                - scrivere post
                                - leggere i contenuti delle persone che segui
                                - rispondere, mettere like, fare boost
                                - vedere notifiche
                                - cambiare alcune impostazioni

                                Suggerimento
                                Se vuoi fare tutto con calma, usa sempre l’area privata.



                                2) Scrivere un post

                                Nell’area privata trovi il riquadro dove scrivere.

                                Post normale

                                1) scrivi il testo
                                2) premi “Publish” o “Post”

                                Gli a capo restano come li scrivi, quindi puoi andare a capo quando vuoi.

                                Scegliere chi lo vede

                                Di solito puoi scegliere tra
                                - Pubblico, lo vedono tutti
                                - Non in elenco, è pubblico ma non finisce in certe liste
                                - Solo follower, lo vedono solo i tuoi follower
                                - Messaggio diretto, lo vedono solo le persone indicate

                                Se non sei sicuro, usa Pubblico.



                                3) Rispondere e parlare in un thread

                                Sotto un post trovi di solito il tasto “Reply”.
                                - scrivi la risposta
                                - invia

                                Le conversazioni sono ordinate a “rami”, come un albero. È utile perché capisci subito chi risponde a chi.



                                4) Like, boost e bookmark

                                Like

                                Serve per dire “mi piace”.

                                Boost

                                Serve per condividere il post con i tuoi follower.

                                Bookmark

                                Serve per salvare un post e ritrovarlo dopo.

                                Suggerimento
                                Bookmark è perfetto per “me lo leggo dopo”.



                                5) Seguire persone

                                Seguire qualcuno

                                Se trovi un profilo interessante
                                - premi “Follow”

                                Da quel momento vedrai i suoi post nella tua area privata.

                                Smettere di seguire

                                - premi “Unfollow”



                                6) Menzionare persone e usare hashtag

                                Menzionare

                                Per chiamare qualcuno in un post, scrivi
                                @nomeutente@dominio

                                Esempio
                                @maria@esempio.it

                                Hashtag

                                Per parlare di un tema e renderlo più facile da trovare, scrivi

                                Esempio



                                7) Mettere un avviso contenuto sensibile

                                Se stai parlando di qualcosa che può dare fastidio a qualcuno, tipo spoiler o contenuti delicati, puoi aggiungere un avviso.
                                - attiva “contenuto sensibile”
                                - scrivi una breve descrizione, per esempio “spoiler” o “tema delicato”
                                - poi pubblica



                                8) Aggiungere un’immagine o un file

                                Nel riquadro del post c’è un modo per aggiungere un allegato.
                                - scegli l’immagine o il file
                                - pubblica

                                Suggerimento
                                Se è un’immagine, aggiungi una breve descrizione quando possibile, aiuta l’accessibilità.



                                9) Messaggi diretti

                                I messaggi diretti sono come post privati.
                                - scegli la modalità “Direct”
                                - scrivi i destinatari o menzionali nel testo
                                - invia

                                Nota
                                I messaggi diretti sono pensati per pochi destinatari, non per “chat di gruppo”.



                                10) Notifiche

                                Nell’area privata trovi una sezione notifiche, dove vedi
                                - chi ti ha seguito
                                - chi ha risposto
                                - chi ha messo like
                                - chi ha fatto boost dei tuoi post



                                11) Piccoli trucchi che aiutano

                                - Se un post non appare, ricarica la pagina
                                - Se una conversazione è lunga, scorri e cerca le risposte annidate
                                - Se vuoi scrivere più chiaro, usa frasi brevi e vai a capo
                                - Se vuoi essere gentile con chi legge, usa l’avviso contenuto sensibile quando serve



                                12) Problemi comuni

                                Non riesco a entrare

                                Contatta l’amministratore e chiedi un reset della password.

                                Non vedo post nuovi

                                Ricarica la pagina. Se succede spesso, può essere un momento di manutenzione.

                                Non si caricano immagini

                                Aspetta e riprova. Se continua, segnala all’amministratore.



                                Fine

                                @localhost@citiverse.it


                                Grazie a @grunfink@comam.es per aver realizzato SNAC2, mi piace così tanto che ho cercato di creare questa piccola guida d’uso per chi lo usa la prima volta. Spero di aver fatto cosa buona. 🙏

                                  [?]patricus » 🌐
                                  @patricus@mstdn.social

                                  oh man, has no docs, except man pages which I hate because the search functionality was updated last before notepad on windows had CTRL+F or before windows even existed, it's broken, and I can't get info or get the basic config.

                                    [?]gyptazy » 🌐
                                    @gyptazy@gyptazy.com

                                    Running your own Fediverse instance and want to become more visible?

                                    You can simply use relay instances to be interconnected with other instances to exchange posts and it works seamless with , , / and many other ones! If you're in tech, you might want to use:

                                    https://fedi-relay.gyptazy.com

                                    You can simply add it to get a bigger reach but also to get more interesting content into your own timeline which becomes even more important on single user- & smaller instances.


                                    Activity Pub / Fediverse Relay

                                    Alt...Activity Pub / Fediverse Relay

                                      [?]Alexandre Oliva » 🌐
                                      @lxo@snac.lx.oliva.nom.br

                                      test5678901234567890123456789012345678901234☁☁☁

                                      testing a fix for a rss bug

                                        [?]Stefano Marinelli » 🌐
                                        @stefano@mastodon.bsd.cafe

                                        Two Fediverse clients I like are Elk and Phanpy, but both had the same issue: the inability to filter "replies" and "boosts" from the timeline. For me this is essential. I can't keep up with my timeline, and if I also see replies to posts unrelated to what I follow, it just becomes chaos. So I tried to implement these filters and opened a PR.

                                        The Elk developers have already merged it into the main branch, so we should soon see the two hide options appear in Elk. Hopefully the same will happen in Phanpy as well, because this greatly improves the experience on two excellent Fediverse tools, which are also compatible with snac.

                                        github.com/elk-zone/elk/pull/3

                                        github.com/cheeaun/phanpy/pull

                                          [?]Alexandre Oliva » 🌐
                                          @lxo@snac.lx.oliva.nom.br

                                          @grunfink@comam.es here's a patch for that extends the recently-added per-actor "People" page to display some of that actor's latest posts as well. the skip and show iteration parameters refer to the user's private timeline, and those ranges are then filtered to show only the actor's posts. I've added a "More (x 10)" button to make searching faster, in case the actor's posts are too sparse.

                                            [?]The Real Grunfink » 🌐
                                            @grunfink@comam.es

                                            grunfink - creator of snac, who made all of this possible using very few resources, on a 4 euro per month VM
                                            Thank you very much to you, Stefano. Your Fedimeteo service is a greatly valuable public service, and even if it was the only use of out there, I would be fully satisfied.

                                            CC: @openmeteo@fosstodon.org @FediFollows@social.growyourown.services

                                              [?]Stefano Marinelli » 🌐
                                              @stefano@mastodon.bsd.cafe

                                              Exactly one year ago, on 30th December 2024, I laid the foundation of FediMeteo.

                                              I took a VM, installed FreeBSD, and set up the first jail to support Italy. The goal was to create a tool for my own use, support a few countries, and announce it.

                                              Unexpectedly, the enthusiasm was incredible. That pushed me to keep going, support more countries and cities, and turn it into what it is today.

                                              FediMeteo now supports 38 countries and 2,937 cities, with more than 7,700 followers in the Fediverse alone, not counting the many people who follow via RSS feeds or visit the web pages.

                                              If you are curious to read the story and some technical details, you can find it here:
                                              it-notes.dragas.net/2025/02/26

                                              Today is also Tuesday, a , so I want to say thanks to:

                                              * OpenMeteo - @openmeteo - for providing accurate, high quality data, without which FediMeteo would be far less useful

                                              * @grunfink - creator of snac, who made all of this possible using very few resources, on a 4 euro per month VM

                                              * FreeBSD, which thanks to the efficiency of the OS and its jail implementation made it possible to run this service in a stable and efficient way with minimal effort

                                              * FediFollows - @FediFollows - that periodically spreads the word about cities, countries, and the enthusiasm around the project

                                              *All of you*, who suggested, encouraged, corrected, and celebrated this project

                                              And forward toward supporting more countries and other interesting features already in the works.

                                              Happy birthday, FediMeteo! 🎉

                                                [?]Stefano Marinelli » 🌐
                                                @stefano@fedihome.stefanomarinelli.it

                                                Today, this instance turns two.

                                                Originally created as a temporary setup to experiment with , I later decided to keep it online. For about a year now, it’s been my most 'private', less technical corner. And I couldn’t be happier: it runs in a jail, uses almost zero resources, and is always ready to serve me.

                                                Happy birthday, FediHome!


                                                  [?]The Real Grunfink » 🌐
                                                  @grunfink@comam.es

                                                  Hi. doesn't do anything with maximum upload sizes (if fact, there is no limit); this must be configured in your nginx / Apache / whatever httpd frontend.

                                                    [?]thedæmon » 🌐
                                                    @thedaemon@snac.9front.club

                                                    How to adjust Attachment Upload maximum size on snac?

                                                      [?]Oliver ⚡ » 🌐
                                                      @oliver@microhive.me

                                                      By the way: Snac has themes. If you don't like them, build your own 🙂
                                                      And Snac runs smoothly with various web clients (e.g. Elk, Semaphore, Phanpy) and, of course, with pretty much every mobile client.


                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snacとBluesky連携

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はsnac とBluesky 連携について. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はsnac とBluesky 連携について.

                                                        Bluesky はポストTwitter の一つでAT Protocol を利用した分散型SNS です.とはいえ現時点ではActivityPub ほど分散している感じはしません.
                                                        このBluesky とfediverse (snac のActivityPub も含む)とWeb を連携させるブリッジとしてBridgy Fed というサービスがあります.
                                                        Bridgy Fed を使ってsnac とBluesky を連携してみます,

                                                        ActivityPub から連携するには https://fed.brid.gy/login で認証後,「Enable」ボタンを押すとなっているのですがログインしてもボタンが見当たりません.Mastodon としてsnac のアカウントを認証したのでなにかAPI の違いや不足があるのかもしれません.

                                                        以下のページを見ると別の方法も紹介されています.

                                                        if login isn't supported for your fediverse server, search for and follow @bsky.brid.gy@bsky.brid.gy in the fediverse. That account will then follow you back. Accept its follow to make sure your fediverse posts get sent the bridge and make it into Bluesky. You can unfollow it afterward if you want, you'll still stay bridged. (Here's how to disable.)

                                                        How do I get started?

                                                        snac の該当アカウントで @bsky.brid.gy@bsky.brid.gy をfollow します.するとこのアカウントからfollow が返されるので承認すると連携完了です.この後は unfollow しても連携は維持されるそうです.

                                                        このときの連携元アカウントが, @[user]@[instance] の場合Bluesky ブリッジアカウントのハンドルは [user].[instance].ap.brid.gy になります.

                                                        なにか投稿して確認しましょう.

                                                        Bridgy Fed は単に投稿を転送するだけでなく返信やlikes, (元の投稿がブリッジされている場合は)repost なども連携されるようです.元の投稿を削除した場合も反映されます.

                                                        Which stuff of mine from the fediverse will get bridged?

                                                        Once you’ve enabled the bridge, anything that’s fully public and interacts with Bluesky users. This includes your posts, replies, likes, and reposts if the original post was bridged. Posts on Bluesky are limited to 300 characters, so longer posts from the fediverse are truncated and ellipsized. Hashtags, links, link previews, images, videos, and even alt text are also included.

                                                        Which stuff of mine from the fediverse will get bridged?

                                                        ブリッジアカウントの削除を行いたい場合は,Bridgy Fedボットユーザー( @bsky.brid.gy@bsky.brid.gy )をブロックすることで削除できるようです.

                                                        If you’re on the fediverse or Bluesky, and you’ve opted in but now want to opt out, block the Bridgy Fed bot user for the network you want to opt out of. For example, on the fediverse, block @bsky.brid.gy@bsky.brid.gy. On Bluesky, block @ap.brid.gy.

                                                        (However, if you’re on a Pixelfed instance, DM the word stop to @bsky.brid.gy@bsky.brid.gy instead. Pixelfed doesn’t yet send the ActivityPub Block activity, so blocking won’t work. Hopefully they’ll fix that soon!)

                                                        If you’re on the web, email us from an address at your web site’s domain to show that you own it, or you can put the text #nobridge in the profile on your home page and then update your profile on your user page.

                                                        Once you’ve done this, Bridgy Fed will deactivate your bridged profile in that network, and it will no longer bridge any of your posts or interactions there.

                                                        You can undo this later and reactivate bridging for your account, but depending on the network, not everything will be perfectly restored. For example, when you disable bridging into the fediverse, the bridged fediverse account is deleted and all followers are disconnected. If you later re-enable it, fediverse users will have to search for your account by address manually to find and follow it again.

                                                        How do I opt out and remove my site or account?

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snacの自動投稿機能

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はsnac のbot 向け投稿機能について. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はsnac のbot 向け投稿機能について.

                                                        bot やアナウンスなど向けのアカウントで自動投稿をしたいことがあります.
                                                        例えばいま考えているのはCalDav から今日のイベントを投稿するアカウント.現在はWebhook 経由でDiscord にpost したりしています.
                                                        snac でもいくつか自動投稿する機能があります.

                                                        Implementing post bots

                                                        snac makes very easy to post messages in a non-interactive manner. This example posts a string:

                                                        uptime | snac note $SNAC_BASEDIR $SNAC_USER –

                                                        You can setup a line like this from a crontab(5) or similar. Take note that you need a) command-line access to the same machine that hosts the snac instance, and b) write permissions to the storage directories and files.

                                                        You can also post non-interactively using the Mastodon API and a command-line http tool like curl(1) or similar. This has the advantage that you can do it remotely from any host, anywhere; the only thing you need is an API Token. This is an example:

                                                        curl -X POST https://$SNAC_HOST/api/v1/statuses \
                                                        –header “Authorization: Bearer ${TOKEN}” -d “status=$(uptime)”

                                                        You can obtain an API Token by connecting to the following URL:

                                                        https://$SNAC_HOST/oauth/x-snac-get-token

                                                        — man(1) より

                                                        note basedir uid text [file file ... [-r inReplyTo [-d YYYYmmddHHMMSS]]]
                                                                Enqueues a Create + Note message to all followers. If the text argument is -e, the external editor defined by  the  EDITOR  environment  variable
                                                                will  be invoked to prepare a message; if it's - (a lonely hyphen), the post content will be read from stdin.  The rest of command line arguments
                                                                are treated as media files to be attached to the post. The LANG environment variable (if defined) is used as the post language. An  optional  URL
                                                                to  a  Fediverse post, prefixed by -r, can be specified for this note to be a reply to. If a date in YYYYmmddHHMMSS format is followed by -d, the
                                                                note is scheduled for that moment instead of immediately posted (this date must be in the same timezone the user has configured in the web UI).

                                                        note_unlisted basedir uid text [file file ... [-r inReplyTo [-d YYYYmmddHHMMSS]]]
                                                                Like the previous one, but creates an "unlisted" (or "quiet public") post.

                                                        note_mention basedir uid text [file file ... [-r inReplyTo [-d YYYYmmddHHMMSS]]]
                                                                Like the previous one, but creates a post only for accounts mentioned in the post body.

                                                        block basedir instance_url

                                                        — man(1) より

                                                        snac note コマンドでの投稿

                                                        snac の動作している環境で実行できるのであればお手軽なsnac のnote コマンドがあります.
                                                        man(1) にある例を真似してみます.

                                                        uptime | snac note $SNAC_BASEDIR $SNAC_USER –

                                                        $ uptime | pee "./snac note snac-test test -" cat
                                                         23:32:36 up 4 days, 10:17,  1 user,  load average: 1.56, 1.90, 1.69
                                                        23:32:36 [test] enqueue_message http://127.0.0.1:8001/test/p/1766154756.511450/Create
                                                        8       /�

                                                        投稿を確認するとこんな感じ.

                                                        日本語もそのままでok でした.

                                                        pfetch を流し込んでみるとこんな感じで整形を考えないとダメそう.

                                                        curl を使ってAPI 経由で投稿

                                                        こちらは一般的なネットワーク経由でリモートで投稿可能な方法です.token を入手してcurl コマンドで投稿します.

                                                        まず以下のようなURL でtoken を取得します.

                                                        https://$SNAC_HOST/oauth/x-snac-get-token

                                                        以下のような画面になるので対象アカウントの情報を入手します.

                                                        以下のようなトークンが取得できるのでメモします.

                                                        1f3ea50e9ab7cc85f5ff01b8f43fb1ae

                                                        後はcurl などで以下のようにPOST.
                                                        json で返り値が帰ってきます.

                                                        $ curl -X POST http://127.0.0.1:8001/api/v1/statuses --header "Authorization: Bearer 1f3ea50e9ab7cc85f5ff01b8f43fb1ae" -d "status=$(uptime)"
                                                        {
                                                            "id": "1766155742b0f5ed692a273ff5b6ef59b696ddde76",
                                                            "uri": "http://127.0.0.1:8001/test/p/1766155742.788170",
                                                            "url": "http://127.0.0.1:8001/test/p/1766155742.788170",
                                                            "account": {
                                                                "id": "488d5ffe15e31aa0be5002853e8006f7",
                                                                "username": "test",
                                                                "display_name": "test",
                                                                "discoverable": true,
                                                                "group": false,
                                                                "hide_collections": false,
                                                                "indexable": true,
                                                                "noindex": false,
                                                                "roles": [
                                                                ],
                                                                "acct": "test@127.0.0.1:8001",
                                                                "created_at": "2025-11-14T19:38:38Z",
                                                                "last_status_at": "2025-12-19",
                                                                "bot": false,
                                                                "note": "<br>",
                                                                "url": "http://127.0.0.1:8001/test",
                                                                "uri": "http://127.0.0.1:8001/test",
                                                                "avatar": "http://127.0.0.1:8001/susie.png",
                                                                "avatar_static": "http://127.0.0.1:8001/susie.png",
                                                                "header": "",
                                                                "header_static": "",
                                                                "emojis": [
                                                                ],
                                                                "locked": false,
                                                                "followers_count": 0,
                                                                "following_count": 0,
                                                                "statuses_count": 0,
                                                                "fields": [
                                                                ]
                                                            },
                                                            "created_at": "2025-12-19T14:49:02.000Z",
                                                            "content": "23:49:02 up 4 days, 10:34,  1 user,  load average: 1.48, 1.57, 1.68<br>",
                                                            "visibility": "public",
                                                            "sensitive": false,
                                                            "spoiler_text": "",
                                                            "media_attachments": [
                                                            ],
                                                            "mentions": [
                                                            ],
                                                            "tags": [
                                                            ],
                                                            "emojis": [
                                                            ],
                                                            "favourites_count": 0,
                                                            "favourited": false,
                                                            "reblogs_count": 0,
                                                            "reblogged": false,
                                                            "replies_count": 0,
                                                            "in_reply_to_id": null,
                                                            "in_reply_to_account_id": null,
                                                            "reblog": null,
                                                            "card": null,
                                                            "language": "en",
                                                            "filtered": [
                                                            ],
                                                            "muted": false,
                                                            "text": " 23:49:02 up 4 days, 10:34,  1 user,  load average: 1.48, 1.57, 1.68",
                                                            "edited_at": null,
                                                            "poll": null,
                                                            "bookmarked": false,
                                                            "pinned": false
                                                        }

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snacの通知について

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はsnac の通知について. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はsnac の通知について.

                                                        snac の通知は以下のように「notifications」の横に数字で通知されます.「notifications」リンクをクリックすることで詳細が表示されます.

                                                        しかしこの通知はsnac のページが読み込まれたタイミングにならないと通知がわかりません.
                                                        しかし代替の通知がいくつか実装されています.これらを利用することでほぼリアルタイムな通知が可能となります.

                                                        e-mail

                                                        一般的なe-mail です.サーバーのメールシステムが設定済であればユーザーの「User Settings…​」から「Email address for notifications:」に宛先のe-main address を入力するることで利用可能です.
                                                        サーバーのメールシステムの設定がされていなかったり,外部のメールシステムを利用したい場合 server.json の以下の項目を設定することでもメールが送信できます.

                                                        Email address for notifications
                                                                If this field is not empty, an email message will be sent to this address whenever a post written by you is liked, boosted or replied to.

                                                        — snac(1)より

                                                        smtp_url    Since version 2.76, email notifications can be sent via direct connection to an SMTP server instead of the traditional behaviour of piping the mes‐
                                                                    sage to /usr/sbin/sendmail.  Set this value to the SMTP url to be used for sending email notifications (for example, smtp://localhost). It may  in‐
                                                                    clude a port number if it's not running on the usual one, like in smtp://mail.example.com:587.

                                                        smtp_user

                                                        smtp_password
                                                                    To be filled if the SMTP server defined by the previous directive needs credentials.

                                                        — snac(8)より

                                                        Telegram で通知

                                                        インスタントメッセージアプリケーションのTelegram にも対応しています.ただ,Telegram bot を作成して利用する必要があるので期設定が少し初面倒です.

                                                        Telegram notifications
                                                                To  enable  notifications  via Telegram, fill the two provided fields (Bot API key and Chat id). You need to create both a Telegram channel and a
                                                                bot for this; the process is rather cumbersome but it's documented everywhere. The Bot API key is a long string of  alphanumeric  characters  and
                                                                the chat id is a big, negative number.

                                                        — snac(1)より

                                                        以前Telegram bot をNextcloud のTOTP の通知設定に利用するために書いたエントリがあります.

                                                        Telegram bot が作成できたら各ユーザの「User Settings…​」の「Telegram notifications (bot key and chat id):」に設定することで利用できます.

                                                        ntfy で通知

                                                        OSS でセルフホスト可能でウェブブラウザやスマートフォンに通知ができるntfy というサービスがあります.これを利用してsnac の通知を行うことも可能です.

                                                        ntfy notifications
                                                                To  enable  notifications  via  ntfy  (both self-hosted or standard ntfy.sh server), fill the two provided fields (ntfy server/topic and, if pro‐
                                                                tected, the token).  You need to refer to the https://ntfy.sh web site for more information on this process.

                                                        — snac(1)より

                                                        セルフホスト可能ですが,とりあえずntfy.sh を利用して試すと良さそうです.

                                                        「User Settings…​」の「ntfy notifications (ntfy server and token):」に設定することで通知できるようになります.

                                                        Webhook で通知

                                                        色々なサービスが対応しているWebhook も利用可能です.

                                                        Notify webhook
                                                                If this is set to an URL, an HTTP POST will be sent to it whenever a new notification happens (see the 'Webhook for notifications' section  below
                                                                for more information).

                                                        — snac(1)より

                                                        例えばDiscord であれば,「チャンネルの編集」→「連携サービス」→「ウェブフックを作成」で生成されるURL を利用して通知できます.
                                                        これを「User Settings…​」の「Notify webhook:」に入力することで通知可能です.

                                                        mastodon アプリケーションでの通知

                                                        snac はmastodon API に対応しています.そのためmastodon アプリケーションが利用可能です.
                                                        mastodon アプリケーションの通知機能を使って通知を受けることが可能です.

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snacのthemeを設定

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はsnac のtheme 変更. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はsnac のtheme 変更.

                                                        snac はCSS ファイルを編集することでテーマを設定することが出来ます.
                                                        CSS ファイルは2種類あり,インスタンス全体のスタイルを設定する, {basedir}/style.css と,各ユーザー用のプライベートCSSファイルの {basedir}/user/{ユーザー名}}/static/style.css です.

                                                        Tip

                                                        手元のsnac 2.8.5 で試したところ,各ユーザーのプライベートCSSファイルはログインした状態でないと効かないようです.
                                                        つまり,各ユーザーの公開ページはグローバル設定が反映されます.

                                                        自分で設定しなくても, README.mdIncredibly awesome CSS themes for snac 部分にいくつかのtheme が紹介されているのでこれを使わせてもらったりそれを元にカスタマイズするのでも良さそうです.

                                                        $ grep -A5 'Incredibly awesome CSS themes for snac' README.md## Incredibly awesome CSS themes for snac- [A compilation of themes for snac (by Во )](https://codeberg.org/voron/snac-style).- [A cool, elegant theme (by Haijo7)](https://codeberg.org/Haijo7/snac-custom-css).- [A terminal-like theme (by Tetra)](https://codeberg.org/ERROR404NULLNOTFOUND/snac-terminal-theme).

                                                        以下は Pika というtheme を設定した例です.3ペインになり,PC等の横長画面での操作性が良さそうです.

                                                        snac theme pika

                                                        Alt...snac theme pika

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snacのWelcome pageを設定ファイルでカスタマイズ

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はsnac でのWelcome pageのカスタマイズについてその2. 以前のカスタマイズではhtml ファイルの書き換えを行いましたが今回は設定ファイルでの書き換えです. snacのWelcome pageのhtmlファイルカスタマイズ – matoken’s blog […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はsnac でのWelcome pageのカスタマイズについてその2.
                                                        以前のカスタマイズではhtml ファイルの書き換えを行いましたが今回は設定ファイルでの書き換えです.

                                                        snac のtop page は以下のような挨拶ページが表示されます. greeting.html ファイルを書き換えることでこのページをカスタマイズ出来ますが,他にもサーバー設定ファイルの server.json でもカスタマイズ項目があります.

                                                        $ w3m -dump https://snac.kagolug.org/snac.kagolug.org is a Fediverse instance that uses the ActivityPub protocol. Inother words, users at this host can communicate with people that use softwarelike Mastodon, Pleroma, Friendica, etc. all around the world.This server runs the snac software and there is no automatic sign-up process.The following users are part of this community:    @info@snac.kagolug.org (info)    @matoken@snac.kagolug.org (matoken)This site is powered by snac.

                                                        show_instance_timeline これを true に設定するとWelcome page に最新のユーザーが投稿したタイムラインが表示されるようになります.
                                                        また,以下の設定項目が設定されていた場合それも表示されます.

                                                        admin_email
                                                        インスタンス管理者の電子メールアドレス

                                                        admin_account
                                                        インスタンス管理者のアカウント

                                                        title
                                                        インスタンスのタイトル

                                                        short_description
                                                        インスタンスに対する短い説明

                                                        short_description_raw
                                                        short_description を生の文字列として解釈するか,HTML に変換するか

                                                        例えばこの様に設定すると,

                                                        $ grep -A5 show_instance_timeline snac-data/server.json    "show_instance_timeline": true,    "admin_email": "",    "admin_account": "matoken",    "title": "🐈🐈🐈",    "short_description": "matokenの個人ActivityPub インスタンスです.",    "short_description_raw": false,

                                                        こんな感じになりました.

                                                        注意点として,show_instance_timelinetrue にすると greeting.html は無視されるようです.用途や好みに合わせてどちらかを利用する感じでしょうか.

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snacでのSPAM対策

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はsnac でのSPAM 対策について. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はsnac でのSPAM 対策について.

                                                        SPAM が来ないに越したことはありませんがActivityPub でも偶に見かけます.もしSPAM が来るときのことを考えて対策を確認しておきます.
                                                        snac では2つの対策があるようです.

                                                        SPAM Mitigation    There have been some SPAM attacks on the Fediverse and, as too many instances and server implementations out there still allow automatic account creation, it will only get worse.  snac includes some (not very strong) tools for try‐    ing to survive the SPAM flood that will eventually happen.

                                                        The  min_account_age field in the main configuration file allows setting a minimum age (in seconds) to consider too recently created accounts suspicious of being a potential source of SPAM. This is a naïve assumption, because spam‐mers can create accounts, let them dormant for a while and then start to use them. Also, some ActivityPub implementations don't even bother to return a creation date for their accounts, so this is not very useful.

                                                        From version 2.50, post content can be filtered out by regular expressions.  These weapons of mass destruction can be written into the filter_reject.txt file in the server base directory, one per line;  if  this  file  exists,  allposts'  content  will  be  matched (after being stripped of HTML tags) against these regexes, one by one, and any match will make the post to be rejected. Use lower case, the regex will be case insensitive by default.  If you don'tknow about regular expressions, don't use this option (or learn about them inw some tutorial, there are gazillions of them out there), as you and your users may start missing posts. Also, given that every regular expression  imple‐mentation supports a different set of features, consider reading the documentation about the one implemented in your system.

                                                        — snac(8) より

                                                        アカウント作成から日の浅いアカウントを拒否

                                                        1つ目はメイン設定ファイルの server.json で設定できる min_account_age で,投稿を受け付けるアカウントが作成されてからの時間が設定できます.
                                                        ただし,SPAM アカウントを作成して寝かせてから運用したり,アカウントの作成日を返さない実装もあるらしいのであまり役に立たないようです.
                                                        既定値は 0 になっています.

                                                        $ jq .min_account_age server.json0

                                                        投稿内容を正規表現でフィルタリング

                                                        2つめは投稿内容を正規表現でフィルタリングできるようです.snac データディレクトリに filter_reject.txt を用意してこのファイル中に1行ずつ記述できるようです.これにより全ての投稿をHTML タグを取り除いた後正規表現と1つずつ照合され一致する投稿は拒否されます.
                                                        正規表現なのでテストを十分して設定したほうが良さそうです.

                                                        Reverse proxy やFirewall などsnac の外で対策も考えられます.その他以下のようなものもあるようです.e-mail もこんな感じで多段にしたりしますね.そうなるとReceived のようなものが見たいなと思ったりも.

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snacのrobots.txt

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はsnac でのrobots.txt について. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はsnac でのrobots.txt について.

                                                        検索エンジンで「site:snac.kagolug.org」のように検索してみると何も出てきません.運用開始からそう時間が経っていないからかな?と思いつつ念の為 robots.txt を確認するとこんな感じで全て拒否るすようになっていました.

                                                        $ w3m -dump https://snac.kagolug.org/robots.txtUser-agent: *Disallow: /

                                                        source を確認すると httpd.c の中でハードコーディングされているようです.

                                                        $ grep -n -A5 robots.txt httpd.c321:    if (strcmp(q_path, "/robots.txt") == 0) {322-        status = HTTP_STATUS_OK;323-        *ctype = "text/plain";324-        *body  = xs_str_new("User-agent: *\n"325-                            "Disallow: /\n");326-    }

                                                        snac の設定でどうにかできればいいですが恐らく無理.ISSUE を探すと以下のものが.404エラーが邪魔なので用意しているだけでカスタマイズしたい人は前段のhttp proxy でルールを追加する感じのようです.

                                                        ISSUE を立てた方はnginx でカスタムrobots.txt を返すようにしているようです.

                                                        Actually, I am able to work around this by returning a custom robots.txt with nginx:

                                                        location = /robots.txt {return 200 'User-agent: FediFetcher\nAllow: /\nUser-agent: *\nDisallow: /\n';}

                                                        自分の環境はApache2 httpd ですが同じような設定はできるので設定してみます.

                                                        Apache2 httpd のAlias でrobots.txt を設定

                                                        以前Nitter を公開していたときにもやっていたのでこれを参考に設定します.

                                                        Apache2 httpd のsnac 部分の設定を以下のように修正しました.これでLinux ファイルシステム内の /var/lib/snac2/robots.txt/robots.txt になるはずです.

                                                        $ sudo git diff /etc/apache2/sites-available/011-snac.kagolug.org.confdiff --git a/apache2/sites-available/011-snac.kagolug.org.conf b/apache2/sites-available/011-snac.kagolug.org.confindex f5b5c7f..7bb72c1 100644--- a/apache2/sites-available/011-snac.kagolug.org.conf+++ b/apache2/sites-available/011-snac.kagolug.org.conf@@ -58,6 +58,11 @@        </Location>        Alias /static /var/www/static+       Alias /robots.txt /var/lib/snac2/robots.txt+       <Location "/robots.txt">+               ProxyPass !+               Require all granted+       </Location>        # Possible values include: debug, info, notice, warn, error, crit,        # alert, emerg.

                                                        設定を確認してから反映します.

                                                        $ sudo apache2ctl configtest$ sudo systemctl reload apache2

                                                        このファイルが,

                                                        $ sudo -u www-data cat /var/lib/snac2/robots.txtUser-agent: *Allow: /

                                                        /robots.txt に反映されました.

                                                        $ w3m -dump https://snac.kagolug.org/robots.txtUser-agent: *Allow: /

                                                        これで各種bot からのアクセスが許可されました.

                                                        source 書き換え

                                                        source からbuild している環境ではsource 書き換えでもrobots.txt をカスタマイズできました.でもアップデートのたびにパッチを当てるのは面倒なのでやはりproxy で設定するほうが良さそうです.

                                                        robots.txt を無くす(404 エラーがたくさんなのであまり良く無さそう)

                                                        $ git diff httpd.cdiff --git a/httpd.c b/httpd.cindex a8cd849..976fdd6 100644--- a/httpd.c+++ b/httpd.c@@ -318,13 +318,6 @@ int server_get_handler(xs_dict *req, const char *q_path,         *body  = xs_json_dumps(j, 4);     }     else-    if (strcmp(q_path, "/robots.txt") == 0) {-        status = HTTP_STATUS_OK;-        *ctype = "text/plain";-        *body  = xs_str_new("User-agent: *\n"-                            "Disallow: /\n");-    }-    else     if (strcmp(q_path, "/style.css") == 0) {         FILE *f;         xs *css_fn = xs_fmt("%s/style.css", srv_basedir);

                                                        $ w3m -dump https://snac.matoken.org/robots.txt404 Not Found (snac/2.85)

                                                        全て許可に書き換え

                                                        $ git diff httpd.cdiff --git a/httpd.c b/httpd.cindex a8cd849..c0bcaef 100644--- a/httpd.c+++ b/httpd.c@@ -322,7 +322,7 @@ int server_get_handler(xs_dict *req, const char *q_path,         status = HTTP_STATUS_OK;         *ctype = "text/plain";         *body  = xs_str_new("User-agent: *\n"-                            "Disallow: /\n");+                            "Allow: /\n");     }     else     if (strcmp(q_path, "/style.css") == 0) {

                                                        $ w3m -dump https://snac.matoken.org/robots.txtUser-agent: *Allow: /

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snacのWelcome pageのカスタマイズ

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はsnac でのWelcome pageのカスタマイズについて. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はsnac でのWelcome pageのカスタマイズについて.

                                                        snac のtop page は以下のような挨拶ページが表示されます.このページをカスタマイズしてみます.

                                                        $ w3m -dump https://snac.kagolug.org/snac.kagolug.org is a Fediverse instance that uses the ActivityPub protocol. Inother words, users at this host can communicate with people that use softwarelike Mastodon, Pleroma, Friendica, etc. all around the world.This server runs the snac software and there is no automatic sign-up process.The following users are part of this community:    @info@snac.kagolug.org (info)    @matoken@snac.kagolug.org (matoken)This site is powered by snac.

                                                        このページは greeting.html を読み込んでいるようです.

                                                        greeting.html

                                                        <!DOCTYPE html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="icon" type="image/x-icon" href="https://%host%/favicon.ico"/><style>*{color-scheme:light dark}body{margin:auto;max-width:50em}</style><title>Welcome to %host%</title></head><body><p><b>%host%</b> is a <a href="https://en.wikipedia.org/wiki/Fediverse">Fediverse</a> instance that uses the <a href="https://en.wikipedia.org/wiki/ActivityPub">ActivityPub</a> protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.</p><p>This server runs the <a href="https://comam.es/what-is-snac">snac</a> software and there is no automatic sign-up process.</p><p>The following users are part of this community:</p>%userlist%<p>This site is powered by <abbr title="Social Networks Are Crap">snac</abbr>.</p></body></html>

                                                        例えば日本語にしたり,ユーザーリストを隠したりといったカスタマイズが出来ます.このhtml ファイルを保存した時点で反映されます.

                                                        $ w3m -dump https://snac.kagolug.org/snac.kagolug.orgはActivityPubプロトコルを利用したFediverseインスタンスです.このホストのユーザーは世界中のMastodon, Pleroma, Friendica, などのソフトウェアを利用している人々とコミニュケーションを取ることが出来ます.このサーバーはsnac ソフトウェアを利用しています.自動登録プロセスはありません.以下のユーザーがこのコミュニティに参加しています:    @info@snac.kagolug.org (info)    @matoken@snac.kagolug.org (matoken)This site is powered by snac.

                                                        今回とりあえず日本語にしましたが,LUG の説明なども入れたいところです.

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        Debian 13 trixieでbackportsを使い最新のsnacを利用

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はDebian trixie backports のsnac パッケージを使うよう設定してみます. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はDebian trixie backports のsnac パッケージを使うよう設定してみます.

                                                        Debian でのsnac2 パッケージのバージョン

                                                        snac2 はDebian パッケージになっています.しかし,stable のDebian 13 trixie のsnac2 パッケージのバージョンは 2.75-2 で少し古いバージョンです.
                                                        stable-backports のパッケージのバージョンは現在の上流の最新と同じ 2.85 なのでこれを利用してみます.

                                                        $ rmadison snac2| grep -v debugsnac2      | 2.75-2~bpo12+1 | oldstable-backports       | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390xsnac2      | 2.75-2         | stable                    | source, amd64, arm64, armel, armhf, i386, ppc64el, riscv64, s390xsnac2      | 2.84-3~bpo13+1 | stable-backports          | source, riscv64snac2      | 2.85-1~bpo13+1 | stable-backports          | source, amd64, arm64, armel, armhf, i386, ppc64el, s390xsnac2      | 2.85-1         | testing                   | source, amd64, arm64, armhf, i386, ppc64el, riscv64, s390xsnac2      | 2.85-1         | unstable                  | source, amd64, arm64, armhf, i386, ppc64el, riscv64, s390x

                                                        Debian 13 trixie に backports を設定

                                                        Debian backports はDebian stable で一部のtesting パッケージを利用できるよう調整されたもので対応したパッケージであればstable より新しいバージョンが利用できます.

                                                        これを利用するためにはbackports 情報を sources.list に追加する必要があります.
                                                        ここでは公式ドキュメントと同じ /etc/apt/sources.list.d/debian-backports.sources としてファイルを作成しました.

                                                        /etc/apt/sources.list.d/debian-backports.sources を作成

                                                        Types: deb deb-srcURIs: http://deb.debian.org/debianSuites: trixie-backportsComponents: mainEnabled: yesSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg

                                                        続いてパッケージ情報をbackports を含む最新状態にします.

                                                        パッケージ情報更新

                                                        $ sudo apt update

                                                        backports の snac を導入

                                                        backpots のパッケージは通常のインストールでは導入されません.backports のパッケージを導入するにはパッケージ名に /trixie-backports を付けて導入します.

                                                        $ sudo apt install snac2/trixie-backports

                                                        もしくは -t trixie-backports を付けて導入すると不足した依存関係も導入されるようです.

                                                        $ sudo apt install -t trixie-backports snac2

                                                        $ dpkg-query -W snac2snac2   2.85-1~bpo13+1$ snac versionsnac 2.85 - A simple, minimalistic ActivityPub instanceCopyright (c) 2022 - 2025 grunfink et al. / MIT licenseupgrade {basedir}                    Upgrade to a new version

                                                        導入されたbackports パッケージは通常と同じ優先度100に固定されるので導入後はいつもの apt upgrade でbackports パッケージも更新されます.つまり通常の運用で大丈夫です.

                                                        snac アップグレード操作

                                                        snac のバージョンアップ時にディスク構成が変わることがあり,その場合snac が起動しないようです.その場合snac の upgrade コマンドを実行する必要があるようです.
                                                        自分は念の為毎回実行しています.

                                                        snac(8)より

                                                        Upgrading to a new version    Sometimes, the data storage disk layout changes between versions. If there is such a change, snac will refuse to run and require an upgrade. Do this by running

                                                        snac upgrade $HOME/snac-data

                                                        Take special care to execute this upgrade operation without any snac processes serving on the same folder. You can break everything. I know this because Tyler knows this.

                                                        $ snac | grep upgradeupgrade {basedir}                    Upgrade to a new version

                                                        upgrade コマンドはデーモンが起動していない状態で実行する必要があるので一旦snac を停止してから実行,その後snac を起動します.

                                                        $ sudo service snac2 stop (1)$ sudo -u debian-snac snac upgrade /var/lib/snac2/ (2)19:45:50 Linux sandbox not compiled in19:45:50 OK$ sudo service snac2 start (3)$ w3m -dump https://snac.kagolug.org/info | tail -1 (4)about this site - powered by snac/2.83

                                                        1. snac 停止

                                                        2. snac upgrade

                                                        3. snac 起動

                                                        4. バージョン確認

                                                        という感じでDebian stable でも最新のsnac が利用できています.一旦設定すると通常のDebian パッケージ更新操作で追従してくれるので運用もいつもと変わりません.更新タイミングも公式と見比べると結構すぐ対応してくれているようです.

                                                        matoken boosted

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        snac でカスタム絵文字を利用

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました. さくらインターネットのさくらのナレッジにsnacの記事を寄稿 – matoken’s blog ここに書かなかったsnac のことをいくつか書いていこうと思います. 今日はカスタム絵文字について. […] [SENSITIVE CONTENT]

                                                        さくらのナレッジに軽量ActivityPub Server のsnac についての記事を寄稿しました.

                                                        ここに書かなかったsnac のことをいくつか書いていこうと思います.
                                                        今日はカスタム絵文字について.

                                                        ActivityPub 各インスタンスでよく使われているカスタム絵文字というものがあります.misskey.io なんかでは特に多用されているようです.
                                                        snac もカスタム絵文字に対応しています.

                                                        既定値で設定されているものとして例えばtoot 本文中に :-) と入力することで「🙂」が, :beer: と入力することで「🍺」が表示されます.他に :shrug2: で「¯\_(ツ)_/¯」なんでものも.でもこのあたりのUnicode絵文字などは日本語入力環境があるとあまり有り難みは感じなそうです.でも画像ファイルも利用できます.

                                                        自分で用意した絵文字を追加してみましょう.

                                                        カスタム絵文字を追加するにはsnac のデータディレクトリにある emojis.json を編集することでカスタマイズできます.

                                                        emojis.json の既定値はこんな感じです.
                                                        toot 本文中に記述するkey と,実際に評される値の組み合わせです.key は保管性を保つために : で囲むことが推奨されています.値は以下では数値文字参照及び文字列ですが,URL を指定することも出来ます.

                                                        {    ":-)": "&#128578;",    ":-D": "&#128512;",    "X-D": "&#128518;",    ";-)": "&#128521;",    "B-)": "&#128526;",    ">:-(": "&#128545;",    ":-(": "&#128542;",    ":-*": "&#128536;",    ":-/": "&#128533;",    "8-o": "&#128562;",    "%-)": "&#129322;",    ":_(": "&#128546;",    ":-|": "&#128528;",    "<3": "&#10084;&#65039;",    ":facepalm:": "&#129318;",    ":shrug:": "&#129335;",    ":shrug2:": "&#175;\\_(&#12484;)_/&#175;",    ":eyeroll:": "&#128580;",    ":beer:": "&#127866;",    ":beers:": "&#127867;",    ":munch:": "&#128561;",    ":thumb:": "&#128077;"}

                                                        ここにsnac デフォルトアイコンを追加してみます.snac のベースurl の下の /susie.png (kagolug では https://snac.kagolug.org/susie.png )にアクセスするとsnac デフォルトアイコンのsusie が表示されます.これを利用してみます.

                                                        emojis.json を以下のように書き換えます.

                                                             ":beer:": "&#127866;",     ":beers:": "&#127867;",     ":munch:": "&#128561;",-    ":thumb:": "&#128077;"+    ":thumb:": "&#128077;",+    ":susie:": "https://snac.kagolug.org/susie.png" }

                                                        Tip

                                                        emojis.json は保存した時点で内容が反映されます.中途半端な状態で保存すると全てのカスタム絵文字が利用できなくなったりするので注意しましょう.

                                                        これで :susie: と入力することで が表示されるようになります.

                                                        更にペンギンのTux とタスマニアデビルのTuz を追加してみます.
                                                        アイコンの画像ファイルを用意し,静的環境に設置,そのurl をemojis.json ファイルに記述します.
                                                        今回以下のようになりました.

                                                             ":beer:": "&#127866;",     ":beers:": "&#127867;",     ":munch:": "&#128561;",-    ":thumb:": "&#128077;"+    ":thumb:": "&#128077;",+    ":susie:": "https://snac.kagolug.org/susie.png",+    ":tux:": "https://www.kagolug.org/snac-emoji/Tux.png",+    ":tuz:": "https://www.kagolug.org/snac-emoji/Tuz.png" }

                                                        これで :susie:, :tux:, :tuz: の3つの絵文字が利用できるようになりました.
                                                        toot して確認できます.
                                                        もしくは以下のようなサイトでMastodon カスタム絵文字API経由で絵文字一覧を確認することも出来ます.

                                                        ]

                                                        snac のカスタム絵文字についての詳細はsnac(8) を参照してください.

                                                        Custom Emojis    From version 2.51, support for customized Emojis in posts is available (previously, they were hardcoded). Emojis are read from the emojis.json file in the instance base directory, as a JSON object of key / value pairs (if this file    does not exist, it will be created with the predefined set). Each key in the object contains the text to be found (e.g., the :-) for a smiling face), and its associated value, the text string that will replace it (in  this  example    case, the HTML entity for the Unicode codepoint for the smiley or the Emoji itself as text).

                                                        Emoji values can also be URLs to image files; in this case, they will not be substituted in the post content, but added to the 'tag' array as an ActivityPub standard 'Emoji' object (it's recommendable that the Emoji key be enclosedin colons for maximum compatibility with other ActivityPub implementations, like e.g. :happydoggo:). These images can be served from an external source or from the static directory of the instance admin.

                                                        If you want to disable any Emoji substitution, change the file to contain just an empty JSON object ({}).

                                                        [?]matoken » 🌐
                                                        @matoken@matoken.org

                                                        さくらインターネットのさくらのナレッジにsnacの記事を寄稿

                                                        さくらインターネットのさくらのナレッジにsnacの記事を寄稿しました. さくらのVPSで試す、軽量ActivityPub実装「snac」によるセルフホストSNS構築 | さくらのナレッジ […] [SENSITIVE CONTENT]

                                                        さくらインターネットのさくらのナレッジにsnacの記事を寄稿しました.

                                                        鹿児島らぐというLinux User GroupのVPSをさくらインターネットさんにコミニュティ支援として提供していただいています.この縁でさくらのナレッジに記事を寄稿することになりました.
                                                        今回の内容は軽量なActivityPub Server のsnac を設定したときの記録をまとめたものです.
                                                        元は鹿児島Linux勉強会 2025.10 で発表したものを元にしたものです.

                                                        興味があれば読んでもらえると嬉しいです.

                                                        Back to top - More...