Kategorien
Blog Software

Nextcloud Memories

Nextcloud Memories is an excellent alternative to Google Photos. It is hosted on your own cloud, where you really own your data.

You can cover the following use cases:

  • Store the pictures in your own cloud
  • Upload new pictures automatically from your mobile phone into your Nextcloud
  • Create Albums
  • Share photos with users or the public
  • Embed Photos or Albums in your blog
  • Edit Photos on the mobile or Server via ImageMagick
Nextcloud Memories

Also, be aware that Google is using the content of your photos to target you with specific advertisements based on that content.

Just make sure that you have all the prerequisites for Memories installed.

If you are running your Nextcloud Memories on a small server, make sure to adapt some settings for creating smaller preview images, best already before you watch them.

Make sure also that the cron job for creating the preview images is running.

The PHP Imagick extension can be installed based on https://cyberpanel.net/blog/how-to-install-imagick-php-on-linux

If you are running multiple PHP versions on your server, make sure that you are installing the package for the PHP version you are running Nextcloud, and also that you are enabling the PHP module for the correct version via

phpenmod -v 8.3 imagick
Kategorien
Software

Nextcloud with an RPi

To complete my home network, I installed Nextcloud with an RPi.

The bigger vision is to get independent of the big companies, specifically from the US companies.

Let’s see which services I will provide with my own cloud, options are:

  • Files
  • Contacts
  • Calendar
  • Photos

It’s quite easy to use a package specifically built for the RPi called Nextcloudpi.

Nextcloud with an RPi

However, it does not run in a docker container, as the providers stopped creating an image. On the other hand, you can adjust much more on the LAMP system itself.

I just followed https://help.nextcloud.com/t/raspberry-pi-4-booting-from-usb-device-no-microsd/126320 and https://help.nextcloud.com/t/how-to-access-nextcloudpi-first-time-activation/126309 for the setup.

After that, everything was running locally already.

It became tricky with accessing the nextcloud server from outside my local network, as I had to configure the Reverse Proxy (NPM) accordingly.

The prerequisite is that you have configured a domain and routed that to the Dynamic DNS server.

At the NPM side the configuration looks like that:

Proxy Host:

  • Scheme: http
  • Cache Assets: On
  • Block Common Exploits: On
  • Websockets Support: On

SSL Certificate:

  • Force SSL: On
  • HTTP/2 Support: On
  • HSTS Enabled: On
  • HSTS Subdomains: Off

Advanced:

location / {
    proxy_pass http://yourIP_of_the_Nextcloud;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }

location /.well-known/carddav {
    return 301 $scheme://$host/remote.php/dav;
}

location /.well-known/caldav {
    return 301 $scheme://$host/remote.php/dav;
}

location ^~ /.well-known {
    return 301 $scheme://$host/index.php$uri;
}
proxy_hide_header Upgrade;

At nextcloudpi configure the following parameters:

nc-trusted-domains
nc-trusted-proxies

Very important is also to switch off the Force SSL at the Nextcloudpi configuration!

This means we are now terminating the SSL at the Reverse Proxy (NPM), as usual. The communication between the Reverse Proxy and the Nextcloud server runs via http.