summaryrefslogtreecommitdiff
path: root/content/forge/setup.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/forge/setup.md')
-rw-r--r--content/forge/setup.md63
1 files changed, 63 insertions, 0 deletions
diff --git a/content/forge/setup.md b/content/forge/setup.md
new file mode 100644
index 0000000..4125b98
--- /dev/null
+++ b/content/forge/setup.md
@@ -0,0 +1,63 @@
+---
+title: Setup
+---
+
+## Build dependencies
+
+* Git
+* GNU Make
+* C compiler
+* Recent Go toolchain
+
+## Build and install
+
+Clone the source code and run `make`.
+
+Then run `make install` to install it. By default, it installs to `/usr/local/`.
+
+## Runtime dependencies
+
+* Git
+* PostgreSQL 14 or later
+
+## 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
+```
+
+### Editing the configuration file
+
+Copy `/usr/share/doc/lindenii/forge/forge.scfg` to `/etc/lindenii/forge.scfg`
+and edit appropriately.