12/27/2021

Nextcloud Docker Install

69

This tutorial shows how to install Collabora online server on Ubuntu using a Docker image built by Collabora and Nextcloud. Then integrate it with an existing Nextcloud server. Step 1: Install Docker on Ubuntu. If you want the latest Docker version, you can install Docker from Docker’s APT repository. For simplicity, this tutorial installs. Nov 04, 2020 Grab a coffee ☕. Sudo apt update && sudo apt upgrade. Make sure you have docker-compose installed. Sudo apt install docker-compose. Create your Nextcloud Directory. Sudo mkdir nextcloud && cd nextcloud. Create docker-compose.yaml file. Use the following as a template. Grab a coffee ☕. Sudo apt update && sudo apt upgrade. Make sure you have docker-compose installed. Sudo apt install docker-compose. Create your Nextcloud Directory. Sudo mkdir nextcloud && cd nextcloud. Create docker-compose.yaml file. Use the following as a template. The installation is really straightforward: docker run -d -p 3310:3310 -name clamav mk0x/docker-clamav. Clamav container will be accessible on port 3310. Next step is to link your nextcloud container to the clamav container, use the –link flag with your nextcloud container.link clamav:av.

Install Docker

I used the docker documentation for Debian which worked fine, but you’ll find instructions for other Linux flavors, MacOS and Windows there too.

Download and start

The x86 version of NextCloudPi docker container features the latest Nextcloudpi networking and system management extras.

Download it with:

  1. docker pull ownyourbits/nextcloudpi (Should now work for all architectures)
    Leaving the original pull commands below, just in case, they can be used with :version, if older versions are needed
  • docker pull ownyourbits/nextcloudpi-x86
  • docker pull ownyourbits/nextcloudpi-armhf (If using RPI ot other armfs SBC)
Run it with:
  • docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /path/to/ncdata:/data –name nextcloudpi ownyourbits/nextcloudpi DOMAIN

DOMAIN should be your trusted domain: the URL or IP that will be used to access.

Any folder can be used instead of the volume ncdata to hold the Nextcloud data. Without full PATH ncdata will be in /var/lib/docker/volumes/ of the host.

Optionally for nc-backups you can insert:

  • -v /path/on/your/host/to/ncp-backups:/path/inside/the/container/to/ncp-backups

That’s it. Visit https://DOMAIN//activate/ copy and save auto generated passwords, and start using your Nextcloud instance.

Check and manage

Check for and list running containers with:

  • docker ps

Check for and list created containers with:

Nextcloud docker server
  • docker ps -a

Stop, start and remove an existing container

  • docker stop nextcloudpi
  • docker start nextcloudpi
  • docker rm nextcloudpi

Update to latest NCP version with:

  • docker exec -it nextcloudpi ncp-update

Run NCP-config to access all NCP apps with:

  • docker exec -it nextcloudpi ncp-config
Nextcloud Docker Install

Make sure container re-start, unless manually stopped with:

  • docker update –restart=unless-stopped nextcloudpi

View other options with:

  • docker help

Start docker with custom storage volume with:

  • sudo mkdir /media/myUsbDrive/ncdata
  • docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /media/myUsbDrive/ncdata:/data –name nextcloudpi ownyourbits/nextcloudpi sub.domain.tld

Add IP or domain to trusted domains array with:

  • docker exec -it nextcloudpi ncc config:system:set trusted_domains 9 –value=”sub.domain.tld”

Reload apache2 webservice with:

  • docker exec -it nextcloudpi service apache2 reload

Docker Commandline Reference

  • https://docs.docker.com/engine/reference/commandline/docker/

Mounting an external drive

As nc-datadir and nc-automount are not available in ncp’s docker image
This is how I mount ncdata persistently.
Preparations:

  • Create a mountpoint for the external drive and ncdata
sudo mkdir /media/ncp
  • Find UUID of external drive
ls -lh /dev/disk/by-uuid/

(Mine looks like this)
total 0
lrwxrwxrwx 1 root root 15 Aug 11 09:10 29075e46-f0d4-44e2-a9e7-55ac02d6e6cc -> …/…/mmcblk0p2
lrwxrwxrwx 1 root root 10 Aug 11 09:10 35e98a80-8895-41f4-93e7-39940a1fda70 -> …/…/sda1
lrwxrwxrwx 1 root root 15 Aug 11 09:10 9304-D9FD -> …/…/mmcblk0p1

  • Add a ligne to /etc/fstab
InstallDocker
sudo nano /etc/fstab

add line for your drive (copy/paste your drive’s UUID and change ext4 to btrfs if needed):

UUID=YourDrive’sUUID /media/ncp ext4 rw,users 0 0
  • mount the drive
sudo mount -a

Now you can :

  • remove existing container,
docker rm nextcloudpi
  • create a new directory for ncdata as for example
sudo mkdir /media/ncp/ncdata
  • then create and start the container with
docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /media/ncp/ncdata:/data –name nextcloudpi ownyourbits/nextcloudpi-armhf 192.168.n.nn
  • wait for init done with
docker logs -f nextcloudpi
(ctrl+c to exit log)

——————————————————————————

Nextcloud Docker Install App

extended quide to getting stared with docker is available on the forum at https://help.nextcloud.com/t/guide-to-getting-started-with-nextcloudpi-docker-in-2020/93396

  • Most Viewed News

    • Mac Os X Snow Leopard Virtualbox Image Download
    • Hp Officejet Pro 8710 Driver Mac
    • Acapella App For Mac
    • Reiboot Pro Download For Mac