Nextcloud on Raspberry Pi

From CusDeb KB
Jump to: navigation, search
This page is a translated version of the page Nextcloud on Raspberry Pi and the translation is 100% complete.

Introduction

The CusDeb Team has prepared the image with pre-configured Nextcloud 13 for Raspberry Pi. This wiki article describes how to start using the image.

About this image

The image consists of two partitions. The first one is bootable and the second one is intended for rootfs. The image is based on Raspbian Stretch with pre-installed Docker which is intended for running three containers:

Containers are built with MMB. Dockerfiles and assets for building these containers are published on GitHub. There is a list of Nextcloud apps installed:

  • Gallery app for providing a gallery view for private pictures and for those which are available by public links.
  • Calendar and Contacts apps for syncing calendars and contacts with the server respectively.
  • Phone Sync app for syncing text messages with the server.
  • Talk app for having private video calls and chatting using the server.
  • An outdated app files_videoviewer substituted for the modern one.

Please note that initially the image does not use all of the space available on your SD card. There is a script which will run the first time you boot your Pi to expand the root partition and use the SD card's full capacity.

Installation

  1. Purchase Nextcloud for Raspberry Pi here, check your inbox and download gzip'ed image.
  2. Burn the image to SD card using Etcher.
  3. Insert the SD card into your Raspberry Pi and power up the device.
  4. Find your Pi's IP address using one of the methods described here.
  5. Point your Web browser to http://x.x.x.x:8001/nc, where x.x.x.x is the IP-address of Raspberry Pi in the network.
  6. Supply the desired administrative username and password.
  7. Click 'Finish Setup'.

Nextcloud-finish-setup-en.png

Port forwarding

If you want to connect to your Nextcloud over the internet from another computer or a mobile device, you must change the configuration of your router to forward all inbound traffic from the internet on 80 port to the local IP-address of your Raspberry Pi at 8001 port. Most routers have this feature available. However, every router is different so you will need to consult your router's user manual for instructions. The settings can be tricky if your Pi is behind a firewall or if there is more than one router.

It's highly recommended to use Nextcloud only via HTTPS. To do that register a domain and get a certificate, using, for example, Let's Encrypt. Then, open port 443 on your router and forward it to port 8001 and the private IP associated with your Raspberry Pi.

Frequently Asked Questions

What is the default SSH user & password?

The default username is cusdeb, and the password is secret. We strongly recommend you to change that password.

How to change password?

Connect via SSH to your Raspberry Pi then run passwd command and follow its instructions.

Passwd.png

Where is data directory?

Nextcloud stores all uploaded files in /srv/nextcloud/data. Please note, all files in that directory are owned by www-data:www-data.

How to safely shutdown Raspberry Pi?

Connect to Raspberry Pi via SSH and execute one of the the following commands:

sudo systemctl poweroff - for shutting down

sudo systemctl reboot - for rebooting

As an alternative you can use the SSH button app for Android.

How to solve "Access through untrusted domain" issue?

Nextcloud-trusted-domain-en.png

Connect to your Pi via SSH, enter sudo nano /srv/nextcloud/config.php and find the 'trusted_domains' section of config.php.

'trusted_domains' => 
array (
  0 => '192.168.0.81:8001',
),

Then add your white public IP-address to that section, ex:

'trusted_domains' => 
array (
  0 => '192.168.0.81:8001',
  1 => 'xxx.xxx.xxx.xxx:8001',
),

Press Ctrl + X to save changes in config.php

How to set up Wi-Fi

Connect monitor and keyboard to your Pi then boot. Install and run raspi-config via terminal:

sudo apt update
sudo apt install raspi-config
sudo raspi-config

Choose Network Options:

Raspi-config-network-options.png

Choose Wi-Fi:

Raspi-config-wifi.png

Enter the name (SSID) of your Wi-Fi network:

Raspi-config-ssid.png

Enter your Wi-Fi password:

Raspi-config-ssid-pass.png

Need advanced Wi-Fi settings? Email us and we'll help you.

Contact us

Don't hesitate to email us at info@cusdeb.com

See also