Lindenii

  • e²
    • Specification
      • Informal Description
  • Forge
    • Internals
      • hookc
    • Setup
  • maild
  • MeseIRCd

Setup

System requirements

We currently only support Linux and FreeBSD. Support for other UNIX-like operating systems may be added in the future, but we do not have any plans to support Windows.

Build dependencies

  • Git
  • GNU Make
  • C compiler
  • Recent Go toolchain
  • libgit2
  • A recent mandoc (we recommend using the latest CVS checkout)

Build

Clone the source code and run gmake.

Note that setting GOARCH to cross compile does not completely work, since the hooks handler and Git RPC daemon is written in C. You need to customize CC to point to a proper cross compiler.

Install

We don’t provide an install target yet, so just copy the files to reasonable locations.

Runtime dependencies

  • Git
  • PostgreSQL 14 or later
  • libgit2
  • A runtime copy of your C library, if you are not statically linking

Configuration

Adding a system user

Note that this process may vary depending on your OS distribution.

useradd -rmd /var/lib/lindenii/forge/ lindenii-forge

Allowing the binary to listen to low ports

Since we usually listen on port 22 for SSH, it is necessary to allow the Lindenii Forge binary to use low ports.

setcap 'cap_net_bind_service=+ep' /usr/bin/lindenii-forge

Generating SSH host keys

ssh-keygen -t ed25519 -f /etc/lindenii/forge/ssh_forge_ed25519_key -N ''

Initializing PostgreSQL

Assuming that you use UNIX-domain socket authentication on a local PostgreSQL instance,

su - postgres
createuser lindenii-forge
createdb -O lindenii-forge lindenii-forge
psql -f /usr/share/lindenii/forge/schema.sql -d lindenii-forge

Setting up your SMTP daemon

You’ll need to do this if you want email integration. We’ll assume you’ve already configured your DNS records, rDNS, DKIM, SPF, DMARC, etc.

If you run OpenSMTPD, you’d want something like this in /etc/smtpd/smtpd.conf:

table forge file:/etc/smtpd/forge
action "FORGE" lmtp "/var/run/lindenii/forge/lmtp.sock" rcpt-to virtual <forge>
match from any for domain "forge.lindenii.runxiyu.org" action "FORGE"

And for /etc/smtpd/forge:

@ forge

Editing the configuration file

Copy /usr/share/doc/lindenii/forge/forge.scfg to /etc/lindenii/forge.scfg and edit appropriately.