Install NextCloud AIO Using Docker

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 setup After installation
image image
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-one

docker 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
latest: Pulling from nextcloud/all-in-one
7264a8db6415: Pull complete
404102781aa3: Pull complete
7410f32c8672: Pull complete
956dc56ebfa1: Pull complete
3f95106f3bdd: Pull complete
9098802ffa48: Pull complete
06d0409205b9: Pull complete
7bb45fa2d48d: Pull complete
d67828a2556d: Pull complete
e5ede5962d91: Pull complete
d86ee673bb09: Pull complete
d640ee80c756: Pull complete
3e8298fe0584: Pull complete
88c10200accc: Pull complete
2c3093024cce: Pull complete
6f6e87149a47: Pull complete
68bcdf3f2a1b: Pull complete
a884c5fe8319: Pull complete
Digest: sha256:b65a2d2aeb7afd4ac5c06893fd6bda4cd06dd56502560a90ea3dacba10c9286e
Status: Downloaded newer image for nextcloud/all-in-one:latest
Trying to fix docker.sock permissions internally...
Creating docker group internally with id 122
....+....+......+.................+.............+.....+.+...+..+.+..+......+.+........+...+....+...+...+.....+....+.....+...............+..........+........+...+.......+...+..+.+............+........+.+.........+............+..+...+.........+.+........+....+...+..+.+++++++++++++++++++++++++++++++++++++++++++++*..+....+..+...+...+....+...+..+...+......+++++++++++++++++++++++++++++++++++++++++++++*.............+++++
...+....+..+.............+..+.+++++++++++++++++++++++++++++++++++++++++++++*..+........+++++++++++++++++++++++++++++++++++++++++++++*...............+..+......+.......+....................+....+...+......+..+...+.+.........+..+.........+...+.....................+......+......+....+......+.....+.......+...+..+...+.........+....+..+.......+.................................+............+........+...+......+.........+....+..+....+.........+......+....................+......+.+.........+.....+..........+...+..+.........+.+.........+.....+......+.+.....+....+...+.....+.+......+...........+...+.+...+............+.....+......+.......+..+++++
-----
Initial startup of Nextcloud All-in-One complete!
You should be able to open the Nextcloud AIO Interface now on port 8080 of this server!
E.g. https://internal.ip.of.this.server:8080
If 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:
https://your-domain-that-points-to-this-server.tld:8443
{"level":"info","ts":1695602198.0527787,"msg":"using provided configuration","config_file":"/Caddyfile","config_adapter":""}
[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
[Mon Sep 25 00:36:38.114466 2023] [core:notice] [pid 103:tid 140428692880200] AH00094: Command line: 'httpd -D FOREGROUND'
[25-Sep-2023 00:36:38] NOTICE: fpm is running, pid 111
[25-Sep-2023 00:36:38] NOTICE: ready to handle connections


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"

版权声明:
作者:cc
链接:https://www.techfm.club/p/71886.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>