Oddbean new post about | logout
 #realy installation is simple

install go 1.23 and git

git clone https://github.com/mleku/realy.git

cd realy

for the simplest but not as performant

    export CGO_ENABLED=0
    cd cmd/realy
    go build .

this produces the binary in the current directory, then move the binary `realy` where you want, eg /usr/local/bin

    realy env

spits out the default configuration (and when customised, the current configuration)

    mkdir ~/.realy
    realy env > ~/.realy/.env

these are the expected default locations for the data directory and configuration file

use your editor (nano i guess would be most people, maybe vi/vim for some) to edit, it's just a set of key/value pairs in standard env style

you can move it to another directory if you must, but you have to invoke it with the data directory environment variable set in the command, eg:

    ROOT_DIR=/path/to/where/you/want/it PROFILE=.profileFolderNameCanBeAnyValidDirectoryName realy

this will then make realy look in that place to load the .env file (it's always called .env though, sorry #notsorry

for more information, see https://realy.lol it will explain how to disable CGO as well as, from the main readme.md, direct you to the instructions on how to build the bitcoin/secp256k1 signature library to get much better event signature verification performance

#realy uses an event store based on fiatjaf's eventstore/badger but much less resource hungry, and using the fastest #golang binary event encoder i am aware of, there is no extra configuration, no docker, no environment, #nobullshit

it is, in my 8 years experience at Go development a reasonably well written, maybe could be better documented codebase, and it should not be difficult, if you have the will, to learn Go and to modify this relay to do whatever you like, and please do ping me if you create featurse for it, i am happy to integrate them into the mainline with a suitable, consistent interface for configuring to use it (such as how it currently is a no-auth open public relay by default currently, but if you set AUTH_REQUIRED it requires nip-42 auth, and if you put your npub in OWNERS it will allow everyone on your follow list, once it's published to the relay, to publish notes to your relay and use it as an outbox 
 May I suggest to use XDG based .config/relay instead of home "pollution" 🙏🏻 
 geez i go through all that effort to explain you can put it anywhere and how to do it and that's not enough

i'm fine with it this way, most people will just run it alone on a VPS maybe with lerproxy (my reverse proxy with nip-05) which just uses a file wherever "mapping.txt"

`.realy` is not going to be confusing or conflict with anything, that's part of the reason why i picked the name as i did, short, and unambiguous

my home folder barely has 50 files/folders in it, i wouldn't call it pollution, and on a VPS, XDG is irrelevant 
 Your code, your decision 🤟 
 I like that standard because it's easier to backup .config folder instead of whole home exluding things you don't want to. 
 well, i might change it, i want to avoid making too many high level changes from here on 
 yeah i'm changing it now, easy enough to do

it's actually the appdata library where that is designed in... on windows and mac it goes into special folders... should be the same for linux methinks 
 hah, it was a bit more of a dumpster fire than that actually... fixed now, will need to revise documents i guess maybe 
 Let me just change this little function it's no biggie.

last words before overnight debugging session 😂 
 haha... fortunately i'm a bit more experienced than that...

i had literally just done a shortcut on this part of the configuration and it wasn't set up to use the proper OS application data directory scheme

so i just had to revise the appdata library, so it conforms to XDG, and then fiddle with my configuration so i'd moved all the files and pointed all the configs in the right place

thanks for your advising on this, this is definitely better 
 i don't like the xdg convention for server apps because you kinda want to be able to remember where to look for it

when you install a fresh ubuntu server, it doesn't have a .config folder, this is mostly used by GUIs

i could be mistaken but the D in XDG stands for "Desktop" 
 idk, I'm fedora person. .config is part of skell there afaik.

but hey, no big deal at all. I'm just expressing my personal preference... 
 i'm just building it on single core 1gb VPS and it's kinda taking a while to build haha

i might have to consider making binaries available 
 ok, it was because i had set my GOROOT wrong lol