Skip to content

Instantly share code, notes, and snippets.

@nitind
Last active November 12, 2022 19:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nitind/ed9581177da35375eb1df43727d6876f to your computer and use it in GitHub Desktop.
- Download an image from https://ownyourbits.com/downloads/ and burn onto a microSD card
- Change the pi user password from 'raspberry' to something else
- Switch locales and keyboard in raspi-config. I still had to manually set it to a 101 keyboard and "us" style, even after going through the raspi-config.
- Enable wifi if needed (RPi3B+ is the first one that supports 5GHz), wait for the unattended upgrade to complete.
- From here you can go through the "web panel" on :4443 and its setup wizard
Alternately:
- Use ncp-config to automount USB drives and move the datadir and database to USB
- You might want to hard-code that drive mounting into `/etc/fstab` so that the mariaDB service always has its files. It's the simplest way to guarantee the start order.
- ncp-config has an option for forwarding ports and setting up ddns. If doing that externally and manually, add the remote hostname that clients will use to /var/www/nextcloud/config/config.php as a trusted domain.
- Use ncp-config to set up letsencrypt, or generate them for the right external host name and overwrite /etc/ssl/certs/ssl-cert-snakeoil.pem and /etc/ssl/private/ssl-cert-snakeoil.key with the full chain cert and private key manually.
- Enable sshd
- Connect to the web UI on :443 and create your user(s)
If you're using an external drive for the data and the database and nextcloud is unresponsive after booting, you might need to restart the mariadb service as there's a potential race condition between it starting and the external drive mounting. Also, make sure any tmp folders specified in /etc/php/*/fpm/php.ini are set to valid paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment