Let’s have a look a the old and simple “cgi-bin” stuff on OpenBSD. The Webserver is written by the OpenBSD Guys, and it runs in a chrooted environment.
switch to cgi-bin dir cd /var/www/cgi-bin/ ip.cgi create the file under /var/www/cgi-bin called ‘ip.cgi’
cat << 'EOG' > ip.cgi #!/bin/sh cat << EOF Content-type: text/html <html><head> <title>IP: $REMOTE_ADDR</title> </head><body> <p>Your IP address is: $REMOTE_ADDR</p> </body></html> EOF EOG Set Owner & Permission chmod 500 ip.
Requirements Fresh VM, running OpenBSD 7.2, fully patched
Public IP, all Ports allowed
FQDN pointing to your IP
run all the commands as root (or with ‘doas’ prepending …)
add Package as usual with OpenBSD
pkg_add minio Extend File Limits we need some more current open files …
cat << EOF >> /etc/login.conf # Minio, added $(date) EOF cat << 'EOF' >> /etc/login.conf minio:\ :openfiles-cur=4096:\ :openfiles-max=8192:\ :tc=daemon: EOF # Rebuild capdb cap_mkdb /etc/login.
Intro Wanna run your own Nextcloud Server on OpenBSD … ? Give a Try ! It’s quite trivial as you can see. Just fireup an empty machine, assign an Hostname / DNS Record, and follow the Examples below. This Setup is done on the current Version, 6.9. Have Fun !
Inspired by: https://dev.to/nabbisen/nextcloud-on-openbsd-installation-15d6
Packages install some packages. i use sqlite as db because i don’t expect a lot of users/traffic/files.