blob: 37be79c434e5e26c3e24124f9a37bce206c623d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
---
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/`.
Note that setting `GOARCH` to cross compile does not completely work, since the
hooks handler is written in C. You need to customize `CC` to point to a proper
cross compiler.
## 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.
|