Blob


1 version=pmwiki-2.2.130 ordered=1 urlencoded=1
2 agent=Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.0.0 Mobile Safari/537.36
3 author=Yonle
4 charset=UTF-8
5 csum=A message about simple to build is not needed
6 ctime=1648832353
7 host=114.125.63.157
8 name=Soju.Install
9 rev=3
10 targets=
11 text=(:title Install & Chroot Soju:)%0a%0a!! Overview%0a%0a[[https://soju.im/|Soju]] is a user-friendly IRC bouncer that has the following features:%0a* Multi-user%0a* Support multiple clients for a single user, with proper backlog sychronization%0a* Support connecting to multiple upstream servers via a single IRC connection to the bouncer%0a%0a!! Compiling from Source%0a%0aAs of OpenBSD 7.0, soju is not packaged yet so you'll have to compile it from source.%0a%0a[@%0apkg_add git go%0agit clone https://git.sr.ht/~emersion/soju%0acd soju%0amake soju sojuctl%0a@]%0a%0aGolang is only a build-time dependency so it can be removed after the make command finishes.%0a%0a!! Configuration and Running without Chroot%0a%0aYou can now use it as is by creating a user with sojuctl and then running soju,%0aor you can create and use a config file.%0a%0aExample config file:%0a%0a[@%0alisten ircs://:6999%0atls /etc/soju/yourhostname.crt /etc/soju/yourhostname.key%0ahostname yourhostname%0adb sqlite3 /etc/soju/soju.db%0atitle A Soju Instance%0a@]%0a%0aAnd to run that (assuming you're still in soju's repository directory):%0a%0a[@%0a./sojuctl -config /path/to/soju.conf create-user someuser -admin%0a./soju -config /path/to/soju.conf%0a@]%0a%0a!! Chroot%0a%0aFor additional security/peace of mind, you can run it under it's own unprivileged account and in a chroot.%0a%0aYou can run these commands to create the user and populate the chroot (replace the placeholder paths) and then running it:%0a%0a[@%0a# populating chroot%0auseradd -m -d /home/soju -s /sbin/nologin -k /var/empty -L daemon soju%0acd /home/soju%0amkdir -p etc/{soju,ssl} usr/bin usr/lib{,exec}%0acp /usr/lib/libc.so.* /usr/lib/libpthread.so.* usr/lib%0acp /usr/libexec/ld.so usr/libexec%0acp /etc/resolv.conf etc%0acp /etc/ssl/cert.pem etc/ssl%0acp /path/to/soju_repo/soju{,ctl} usr/bin%0acp /path/to/soju_repo/soju.{conf,db} etc/soju%0acp /etc/ssl/yourhostname.crt /etc/ssl/private/yourhostname.key etc/soju%0achown -R soju etc/soju/%0a# running soju from the chroot%0achroot -u soju -g soju /home/soju soju -config /etc/soju/soju.conf >>/var/log/soju.log 2>&1 &%0a@]%0a%0aIf you want to run sojuctl from the chroot, then you can run:%0a%0a[@%0achroot -u soju -g soju /home/soju sojuctl -config /etc/soju/soju.conf yourarguments%0a@]%0a%0aAlternatively, if soju is already running and you are connected under an admin%0aaccount, you can run `/msg BouncerServ help` to see its available commands.%0aFor example, if you want to create a new user or add a new IRC network to it,%0athen you can message BouncerServ and its appropriate command.%0a%0a!! Autostart and Logging%0a%0aTo run it automatically on startup or whenever it stops, you can run it from a cron job.%0a%0aYou can add something like this to root's crontab (attempts to run soju every 5 minutes)%0a%0a[@%0a*/5 * * * * /usr/sbin/chroot -u soju -g soju /home/soju soju -config /etc/soju/soju.conf >>/var/log/soju.log 2>&1%0a@]
12 time=1648832824
13 title=Install & Chroot Soju
14 author:1648832824=Yonle
15 csum:1648832824=A message about simple to build is not needed
16 diff:1648832824:1648832395:=12c12%0a%3c As of OpenBSD 7.0, soju is not packaged yet so you'll have to compile it from source.%0a---%0a> As of OpenBSD 7.0, soju is not packaged yet so you'll have to compile it from source. Fortunately it's really simple to build.%0a
17 host:1648832824=114.125.63.157
18 author:1648832395=shokara
19 csum:1648832395=forgot ending colon for title
20 diff:1648832395:1648832353:=1c1%0a%3c (:title Install & Chroot Soju:)%0a---%0a> (:title Install & Chroot Soju)%0a
21 host:1648832395=99.234.70.39
22 author:1648832353=shokara
23 csum:1648832353=Create a wiki page for soju, detailing install and chroot install instructions.
24 diff:1648832353:1648832353:=1,87d0%0a%3c (:title Install & Chroot Soju)%0a%3c %0a%3c !! Overview%0a%3c %0a%3c [[https://soju.im/|Soju]] is a user-friendly IRC bouncer that has the following features:%0a%3c * Multi-user%0a%3c * Support multiple clients for a single user, with proper backlog sychronization%0a%3c * Support connecting to multiple upstream servers via a single IRC connection to the bouncer%0a%3c %0a%3c !! Compiling from Source%0a%3c %0a%3c As of OpenBSD 7.0, soju is not packaged yet so you'll have to compile it from source. Fortunately it's really simple to build.%0a%3c %0a%3c [@%0a%3c pkg_add git go%0a%3c git clone https://git.sr.ht/~emersion/soju%0a%3c cd soju%0a%3c make soju sojuctl%0a%3c @]%0a%3c %0a%3c Golang is only a build-time dependency so it can be removed after the make command finishes.%0a%3c %0a%3c !! Configuration and Running without Chroot%0a%3c %0a%3c You can now use it as is by creating a user with sojuctl and then running soju,%0a%3c or you can create and use a config file.%0a%3c %0a%3c Example config file:%0a%3c %0a%3c [@%0a%3c listen ircs://:6999%0a%3c tls /etc/soju/yourhostname.crt /etc/soju/yourhostname.key%0a%3c hostname yourhostname%0a%3c db sqlite3 /etc/soju/soju.db%0a%3c title A Soju Instance%0a%3c @]%0a%3c %0a%3c And to run that (assuming you're still in soju's repository directory):%0a%3c %0a%3c [@%0a%3c ./sojuctl -config /path/to/soju.conf create-user someuser -admin%0a%3c ./soju -config /path/to/soju.conf%0a%3c @]%0a%3c %0a%3c !! Chroot%0a%3c %0a%3c For additional security/peace of mind, you can run it under it's own unprivileged account and in a chroot.%0a%3c %0a%3c You can run these commands to create the user and populate the chroot (replace the placeholder paths) and then running it:%0a%3c %0a%3c [@%0a%3c # populating chroot%0a%3c useradd -m -d /home/soju -s /sbin/nologin -k /var/empty -L daemon soju%0a%3c cd /home/soju%0a%3c mkdir -p etc/{soju,ssl} usr/bin usr/lib{,exec}%0a%3c cp /usr/lib/libc.so.* /usr/lib/libpthread.so.* usr/lib%0a%3c cp /usr/libexec/ld.so usr/libexec%0a%3c cp /etc/resolv.conf etc%0a%3c cp /etc/ssl/cert.pem etc/ssl%0a%3c cp /path/to/soju_repo/soju{,ctl} usr/bin%0a%3c cp /path/to/soju_repo/soju.{conf,db} etc/soju%0a%3c cp /etc/ssl/yourhostname.crt /etc/ssl/private/yourhostname.key etc/soju%0a%3c chown -R soju etc/soju/%0a%3c # running soju from the chroot%0a%3c chroot -u soju -g soju /home/soju soju -config /etc/soju/soju.conf >>/var/log/soju.log 2>&1 &%0a%3c @]%0a%3c %0a%3c If you want to run sojuctl from the chroot, then you can run:%0a%3c %0a%3c [@%0a%3c chroot -u soju -g soju /home/soju sojuctl -config /etc/soju/soju.conf yourarguments%0a%3c @]%0a%3c %0a%3c Alternatively, if soju is already running and you are connected under an admin%0a%3c account, you can run `/msg BouncerServ help` to see its available commands.%0a%3c For example, if you want to create a new user or add a new IRC network to it,%0a%3c then you can message BouncerServ and its appropriate command.%0a%3c %0a%3c !! Autostart and Logging%0a%3c %0a%3c To run it automatically on startup or whenever it stops, you can run it from a cron job.%0a%3c %0a%3c You can add something like this to root's crontab (attempts to run soju every 5 minutes)%0a%3c %0a%3c [@%0a%3c */5 * * * * /usr/sbin/chroot -u soju -g soju /home/soju soju -config /etc/soju/soju.conf >>/var/log/soju.log 2>&1%0a%3c @]%0a\ No newline at end of file%0a
25 host:1648832353=99.234.70.39