-- Leo's gemini proxy

-- Connecting to gemlog.blue:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

NetBSD on a Raspberry Pi 3B+ running Nextcloud


Last weekend I had a go at installing NetBSD on a Raspberry Pi 3B+. In the end, it was successful, but there were a few hurdles to overcome.


Getting the image on the SD card


The first step was to get an appropriate image. I chose the arm64.img.gz image, unzipped it, and tried my best to put it on the SD card using dd. However, several attempts with dd were unsuccessful. Of course, I blame macOS 100% for this and not myself! With the Raspberry Pi Imager I could finally put the image on the SD card without any problems. I spent some more time trying to mount the ffs partition on the card to modify some config files to be able to start up the Raspberry Pi headless from scratch. However, I did not succeed in this. Again, macOS is to blame, of course!


Suitable images for the Raspberry Pi

Raspberry Pi Imager


Starting up NetBSD


Since I could not modify the appropriate configuration files to enable SSH, I now had to connect a display and a keyboard to the Raspberry Pi. The display did not pose a problem but the keyboard did. I could not get the Ducky One Mini to enter even one character. The Keychron K6 was initially more successful. However, after a few minutes, keystrokes were only registered sporadically or repeated infinitely. Until the network connection was prepared, I had to switch the keyboard on and off several times to make the necessary inputs. Anyway, I was very happy when the network was finally set up and I could finish the setup via SSH.


Nextcloud


At the end of the day, the Raspberry Pi should, of course, do something useful. And what can be more useful than a small Nextclound instance to exchange files with one's wife ;-) The installation was very easy thanks to pkgin:


sudo pkgin in php80-nextcloud

The installation routine was kind enough to let me know what else I'd need, accompanied by further instructions:


- Install nginx and modify the config

- Install a database service (e.g., mysql), create a new user and a new database

- php-fpm (php80-fpm)


What the routine didn't tell me:


You have to modify /usr/pkg/etc/php-fpm.d/www.conf to make nginx to work with php-fpm:


user = nginx
group = nginx

You have to change the owner of /usr/pkg/share/nextcloud accordingly:


chown -r nginx:nginx /usr/pkg/share/nextcloud

You have to append the following line to /usr/pkg/share/nextcloud/config/config.php:


  'openssl' => [
        'config' => '/usr/pkg/etc/openssl/openssl.cnf',
  ],

You have to add some services to /etc/rc.d/ by copying them from the according examples directory:


cp /usr/pkg/share/examples/rc.d/mysqld /etc/rc.d/
cp /usr/pkg/share/examples/rc.d/nginx /etc/rc.d/
cp /usr/pkg/share/examples/rc.d/php_fpm /etc/rc.d/

And, lastly, you have to enable them by adding the following to /etc/rc.conf:


mysqld=YES
php_fpm=YES
nginx=YES

Conclusion


NetBSD does run very smoothly. Nextcloud, especially the webinterface, is a little bit on the slow side but usable.


This post is also available via LBRY:

NetBSD on a Raspberry Pi 3B+ running Nextcloud (odysee)

-- Response ended

-- Page fetched on Sun Jun 2 09:28:44 2024