There are many different ways to install NextCloud and I had quite a few posts to show the installation. Recently I found this Github AIO (All in One) project and it does give an easy way to install NextCloud with all other addon features. This blog post is to record all steps you will need to get NextCloud AIO up and running. 

Related posts:

Features

Github: https://github.com/nextcloud/all-in-one

Features:

  • Nextcloud
  • Nextcloud Office
  • High performance backend for Nextcloud Files
  • High performance backend for Nextcloud Talk and TURN-server
  • Nextcloud Talk Recording-server
  • Backup solution (based on BorgBackup)
  • Imaginary (for previews of heic, heif, illustrator, pdf, svg, tiff and webp)
  • ClamAV (Antivirus backend for Nextcloud)
  • Fulltextsearch
  • More
First setupAfter installation

Demo site: https://nextcloud.51sec.eu.org/

Requirements

1. Linux vps : 1G RAM, 1vCPU, 30G Hard Drive

2. Public IP

3. Port 80, 443, 8080, 8443 open

4. domain / subdomin point to public ip

Here is how system resources consumed after AIO is fully up and running:

Steps

1 Log into Linux VPS: 

  • sudo -i

2 Get update list

  • apt update

3 Install docker and add 1G swap size

  • apt install docker.io -y
  • SWAP size increase: wget https://raw.githubusercontent.com/51sec/swap/main/swap.sh && bash swap.sh

4 run docker all-in-onedocker run -d \ –init \ –sig-proxy=false \ –name nextcloud-aio-mastercontainer \ –restart always \ –publish 80:80 \ –publish 8080:8080 \ –publish 8443:8443 \ –volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \ –volume /var/run/docker.sock:/var/run/docker.sock:ro \ nextcloud/all-in-one:latest

Docker run output:

root@nctest1:~# docker run \
> –init \
> –sig-proxy=false \
> –name nextcloud-aio-mastercontainer \
> –restart always \
> –publish 80:80 \
> –publish 8080:8080 \
> –publish 8443:8443 \
> –volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
> –volume /var/run/docker.sock:/var/run/docker.sock:ro \
> nextcloud/all-in-one:latest
Unable to find image ‘nextcloud/all-in-one:latest’ locally¨C31Clatest: Pulling from nextcloud/all-in-one¨C32C7264a8db6415: Pull complete¨C33C404102781aa3: Pull complete¨C34C7410f32c8672: Pull complete¨C35C956dc56ebfa1: Pull complete¨C36C3f95106f3bdd: Pull complete¨C37C9098802ffa48: Pull complete¨C38C06d0409205b9: Pull complete¨C39C7bb45fa2d48d: Pull complete¨C40Cd67828a2556d: Pull complete¨C41Ce5ede5962d91: Pull complete¨C42Cd86ee673bb09: Pull complete¨C43Cd640ee80c756: Pull complete¨C44C3e8298fe0584: Pull complete¨C45C88c10200accc: Pull complete¨C46C2c3093024cce: Pull complete¨C47C6f6e87149a47: Pull complete¨C48C68bcdf3f2a1b: Pull complete¨C49Ca884c5fe8319: Pull complete¨C50CDigest: sha256:b65a2d2aeb7afd4ac5c06893fd6bda4cd06dd56502560a90ea3dacba10c9286e¨C51CStatus: Downloaded newer image for nextcloud/all-in-one:latest¨C52CTrying to fix docker.sock permissions internally…¨C53CCreating docker group internally with id 122¨C54C….+….+……+……………..+………….+…..+.+…+..+.+..+……+.+……..+…+….+…+…+…..+….+…..+……………+……….+……..+…+…….+…+..+.+…………+……..+.+………+…………+..+…+………+.+……..+….+…+..+.+++++++++++++++++++++++++++++++++++++++++++++..+….+..+…+…+….+…+..+…+……+++++++++++++++++++++++++++++++++++++++++++++………….+++++¨C55C…+….+..+………….+..+.+++++++++++++++++++++++++++++++++++++++++++++..+……..+++++++++++++++++++++++++++++++++++++++++++++……………+..+……+…….+………………..+….+…+……+..+…+.+………+..+………+…+…………………+……+……+….+……+…..+…….+…+..+…+………+….+..+…….+……………………………+…………+……..+…+……+………+….+..+….+………+……+………………..+……+.+………+…..+……….+…+..+………+.+………+…..+……+.+…..+….+…+…..+.+……+………..+…+.+…+…………+…..+……+…….+..+++++¨C56C—–¨C57CInitial startup of Nextcloud All-in-One complete!¨C58CYou should be able to open the Nextcloud AIO Interface now on port 8080 of this server!¨C59CE.g. https://internal.ip.of.this.server:8080¨C60CIf your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:¨C61Chttps://your-domain-that-points-to-this-server.tld:8443¨C62C{“level”:”info”,”ts”:1695602198.0527787,”msg”:”using provided configuration”,”config_file”:”/Caddyfile”,”config_adapter”:””}¨C63C[Mon Sep 25 00:36:38.113832 2023] [mpm_event:notice] [pid 103:tid 140428692880200] AH00489: Apache/2.4.57 (Unix) OpenSSL/3.1.2 configured — resuming normal operations¨C64C[Mon Sep 25 00:36:38.114466 2023] [core:notice] [pid 103:tid 140428692880200] AH00094: Command line: ‘httpd -D FOREGROUND’¨C65C[25-Sep-2023 00:36:38] NOTICE: fpm is running, pid 111¨C66C[25-Sep-2023 00:36:38] NOTICE: ready to handle connections

¨C67C

5 Open following firewall ports: 80, 443, 8080, 8443

6 Create a DNS A record to point your subdomain to your linux vps public ip

7 Access following url:

  • https://<linux public ip>:8080

or

  • https://<subdomain url>:8443

In this example, I am using  nc.51sec.eu.org as NextCloud AIO’s subdomain

Nextcloud AIO setup

1  click Open Nextcloud AIO login 

2  it opens a new tab for https://nc.51sec.eu.org:8443/login

3  After paste that long password in, click Log in button. You will be prompted a page to either choose new AIO instance or Restore fromer AIO instance from backup

We are going to enter nc.51sec.eu.org and submit domain for a new instance.

4  choose optional addons.

minimal system requirements is 2GB RAM, a dual-core CPU and 40GB system storage. 

5 I unselected all to see if it can be run in a 1GB ram’s VPS. 

After waitied 1-2 minutes, I got following screen to show the system starting process:

Results

After 5 minutes  waiting, once all containers are up and running, you will get admin username and a password for login:

Videos

 1. Change Domain

If for some reasons, the original domain cann’t get certificate, you might need to reset your domain. 

If you find in there an issue like too many certificates already issued for yourdomain.com, you will need to wait until the limit is gone (around a week) or change your domain to e.g. a subdomain: https://github.com/nextcloud/all-in-one#how-to-change-the-domain

command:

  • sudo docker run -it –rm –volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config:rw alpine sh -c “apk add –no-cache nano && nano /mnt/docker-aio-config/data/configuration.json”

References

By Jonny

Leave a Reply