• 돌아가기
  • 아래로
  • 위로
  • 목록
  • 댓글
가이드

Nextcloud AIO(All In One)을 이용한 Nextcloud 구축하기.

달소 달소 1516

5

6

안녕하세요. 달소입니다.

 

앞서 소개해드린 Nextcloud를 이번에는 손쉽게 구축하는 방법입니다.

 

 

 

사실 예전에 구축하는 방법인 Nginx + PHP + MariaDB의 설치방법이 아직 유효하기는 하다고 생각되나

현재는 Docker가 대세일 뿐만아니라 Nextcloud 자체가 볼륨이 커지고 기능이 많아진만큼 여러 컨테이너로 나뉘어져있어서 AIO(All In One) 으로 설치할수 있는 기능을 제공합니다.

 

단순하게 파일공유용 플랫폼으로 볼수도 있지만 그룹웨어성 기능들이 많아져서 여러가지 솔루션을 하나의 플랫폼으로 이용할 수 있다는 장점이 있기때문에 파일공유, 일정관리 등으로 사용하기 좋은 플랫폼입니다.

 

Nextcloud AIO란?

설치하기에 앞서 Nextcloud AIO에 대해서 별도로 한번 더 소개해드리겠습니다.

 

 

Nextcloud AIO는 Nextcloud All-in-One의 약자로 이 하나의 Nextcloud 인스턴스에 포함된 대부분의 기능을 통해 손쉬운 배포 및 유지 관리를 제공합니다.

다음이 포함됩니다.

  • 넥스트클라우드
  • 넥스트클라우드 오피스
  • Nextcloud Files용 고성능 백엔드
  • Nextcloud Talk 및 TURN 서버용 고성능 백엔드
  • 넥스트클라우드 토크녹음서버
  • 백업 솔루션( BorgBackup 기반 )
  • Imaginary(heic, heif, illustrator, pdf, svg, tiff 및 webp 미리보기용)
  • ClamAV(Nextcloud용 안티바이러스 백엔드)
  • 전체 텍스트 검색

image.png.jpg

 

nextcloud를 좀더 쉽게 구축하고자 하는 사용자를 위한 플랫폼으로 보시면됩니다.

 

다만, docker socket을 볼륨매핑하는만큼 구동방식이 특이한데

사용자는 aio의 컨테이너를 실행하지만 그 aio에서 하위에 여러가지 nextcloud 컨테이너들을 관리합니다.
따라서 환경변수과 꽤 어마무시하게 많습니다만 어느정도 최적화된 컨테이너 옵션으로 편의성이나 초보자분들께는 좋은옵션이라고 생각합니다.(저한테도요...)

 

그래서 구동하는방식이 살짝 어렵긴하지만 차근차근 진행해보겠습니다.

 

설치환경 및 사전준비

Ubuntu 22.04 LTS
docker / docker-compose

 

NPM 프록시 사용

도메인 필수! 여기서는 test-nc.dalso.org

 

여러 시행착오를 겪어서 진행한 만큼 설정값을 잘 따라해주셔야합니다.

++기본 구동을 위한 셋팅만을 진행하며 추가적인 옵션은 주석을 참고하여 직접 테스트해보시고 넣으시면되겠습니다.

 

커널의 네트워크 소켓 버퍼의 최대 수신 버퍼 크기를 미리 올려줍니다.

 

sysctl "net.core.rmem_max=2500000"
sysctl -p


설치는 /data/nextcloud 에서 진행합니다.

 

도메인 생성 및 NPM 프록시 설정하기

도메인의 경우 duckdns로 생성하셔도 무방합니다.

 

image.png.jpg

 

그리고 사용하시는 리버스 프록시 설정 입니다.

도메인과 프록시 ip/포트를 지정해주시면 됩니다. 사용할 포트는 11000입니다.

 

image.png.jpg

 

컨테이너 생성하기

이제 본격적으로 AIO 컨테이너를 생성해보겠습니다.

 

mkdir -p /data/nextcloud
vi docker-compose.yml

 

아래 내용을 복붙해주시는데 주석부분은 추후에 변경해주시면 되겠습니다.

여기서는 Reverse Proxy 뒤에 사용하기떄문에 몇가지 옵션이 수정된 상태입니다 원본은 아래 링크에서 참고해주세요.

 

여기서 관리 AIO페이지는 8080으로 접근하고 nextcloud 는 11000번포트로 접근합니다.

 

https://github.com/nextcloud/all-in-one/blob/main/compose.yaml

 

docker-compose.yml 내용

 

services:
  nextcloud:
    image: nextcloud/all-in-one:latest
    restart: always
    container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
      - /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
    ports:
      #- 80:80 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
      - 8080:8080
        #- 8443:8443 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
    environment: # Is needed when using any of the options below
      - SKIP_DOMAIN_VALIDATION=true
      # - AIO_DISABLE_BACKUP_SECTION=false # Setting this to true allows to hide the backup section in the AIO interface. See https://github.com/nextcloud/all-in-one#how-to-disable-the-backup-section
      - APACHE_PORT=11000 # Is needed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
      - APACHE_IP_BINDING=0.0.0.0 # Should be set when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else) that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
      # - BORG_RETENTION_POLICY=--keep-within=7d --keep-weekly=4 --keep-monthly=6 # Allows to adjust borgs retention policy. See https://github.com/nextcloud/all-in-one#how-to-adjust-borgs-retention-policy
      # - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature
      # - NEXTCLOUD_DATADIR=/mnt/ncdata # Allows to set the host directory for Nextcloud's datadir. ⚠️⚠️⚠️ Warning: do not set or adjust this value after the initial Nextcloud installation is done! See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
      # - NEXTCLOUD_MOUNT=/mnt/ # Allows the Nextcloud container to access the chosen directory on the host. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host
      # - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud
      # - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud
      # - NEXTCLOUD_MEMORY_LIMIT=512M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud
      # - NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defined-certification-authorities-ca
      # - NEXTCLOUD_STARTUP_APPS=deck twofactor_totp tasks calendar contacts notes # Allows to modify the Nextcloud apps that are installed on starting AIO the first time. See https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup
      # - NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-os-packages-permanently-to-the-nextcloud-container
      # - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container
      # - NEXTCLOUD_ENABLE_DRI_DEVICE=true # This allows to enable the /dev/dri device in the Nextcloud container. ⚠️⚠️⚠️ Warning: this only works if the '/dev/dri' device is present on the host! If it should not exist on your host, don't set this to true as otherwise the Nextcloud container will fail to start! See https://github.com/nextcloud/all-in-one#how-to-enable-hardware-transcoding-for-nextcloud
      # - TALK_PORT=3478 # This allows to adjust the port that the talk container is using. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-talk-port
      # - WATCHTOWER_DOCKER_SOCKET_PATH=/var/run/docker.sock # Needs to be specified if the docker socket on the host is not located in the default '/var/run/docker.sock'. Otherwise mastercontainer updates will fail. For macos it needs to be '/var/run/docker.sock'
    # networks: # Is needed when you want to create the nextcloud-aio network with ipv6-support using this file, see the network config at the bottom of the file
      # - nextcloud-aio # Is needed when you want to create the nextcloud-aio network with ipv6-support using this file, see the network config at the bottom of the file

  # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
  # # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588
  # caddy:
  #   image: caddy:alpine
  #   restart: always
  #   container_name: caddy
  #   volumes:
  #     - ./Caddyfile:/etc/caddy/Caddyfile
  #     - ./certs:/certs
  #     - ./config:/config
  #     - ./data:/data
  #     - ./sites:/srv
  #   network_mode: "host"

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work

# # Optional: If you need ipv6, follow step 1 and 2 of https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md first and then uncomment the below config in order to activate ipv6 for the internal nextcloud-aio network.
# # Please make sure to uncomment also the networking lines of the mastercontainer above in order to actually create the network with docker-compose
# networks:
#   nextcloud-aio:
#     name: nextcloud-aio # This line is not allowed to be changed as otherwise the created network will not be used by the other containers of AIO
#     driver: bridge
#     enable_ipv6: true
#     ipam:
#       driver: default
#       config:
#         - subnet: fd12:3456:789a:2::/64 # IPv6 subnet to use

 

이미지를 받고 컨테이너를 실행합니다.

 

image.png.jpg

 

컨테이너가 실행되면 https://ip:8080 포트로 접속해주세요.

 

첫화면에서 AIO Admin의 패스워드가 나오는데 기록해주시면되겠습니다.

복사해주셔야 로그인이 가능합니다.

image.png.jpg

 

image.png.jpg

 

이제 아까 생성한 도메인을 넣어서 제출을 해줍니다. (nc-test.dalso.org)

 

image.png.jpg

 

제출하고나면 설치 버전이나 애드온등 선택이 가능합니다. 

불필요한걸 설치하게되면 부거워지니.. 참고하시면되겠습니다.

 

시간대 변경은 하면 오류가 나서 설치후에 백업한번 하시고 Asia/Seoul로 바꿔주시면됩니다.

 

image.png.jpg

 

애드온 선택까지 완료되면 컨테이너 다운로드 및 시작해주시면됩니다.

여기서 시간이 꽤 소요됩니다.

 

컨테이너가 전체다 실행될때까지 기다려주세요.(진짜 오래걸립니다..)

 

image.png.jpg

 

백업또한 AIO에서 가능하며 아래 내용을 참고하시어 진행해주시면됩니다.

 

image.png.jpg

 

정상적으로 모두 Running이 되면 아래처럼 Admin 계정정보가 나옵니다.

 

이제 처음 셋팅한 도메인으로 접속해주세요.

 

https://nc-test.dalso.org 가 되겠죠?

 

image.png.jpg

 

최신버전으로 잘 설치되었습니다.

 

image.png.jpg

 

앱들도있으니 ㅎㅎ 사용하시면 되겠습니다

 

image.png.jpg

 

끝...!!

 

image.png.jpg

 

PHP 버전이나 DB 현재 시스템 상태들 모두 확인가능합니다.

image.png.jpg

 

image.png.jpg

 

 

 

 

신고공유스크랩
6
1등
니속사정 2023.07.16. 18:58
수없이 들었던 nextcloud 궁긍하지만 필요없을것같아 신경 안쓰고 있었는데 이렇게 쉽게 풀어주시니 설치를 안 해볼 수가 없네요!
감사합니다.
profile image
달소 글쓴이 2023.07.17. 09:46
니속사정
ㅎㅎ 생각보다 파일공유의 비중이 많지않은 그룹웨어 플랫폼으로 바뀐것같습니다
3등
붙박이별 2023.08.11. 22:07
늘 감사합니다. 친절한 가이드 따라서 한방에 어려움 없이 설치했습니다.
현제 ubuntu os용량 120기가 ssd에 설치되어 있습니다. 이것을4테라 2개 {전체4베이]를
용량 추가할려고 하는데 멈추어 있습니다. 예전 가이드에서 추가방법과 AIO 는 차이가 있는것 같은데
추가 방법이 궁금합니다. 많은 지도 부탁 드립니다...감사합니다..

댓글 쓰기 권한이 없습니다. 로그인

취소 댓글 등록

cmt alert

신고

"님의 댓글"

이 댓글을 신고하시겠습니까?

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story
번호 분류 제목 글쓴이 날짜 조회 추천
오픈소스 개인 구독 추적기 Wallos 7 달소 1일 전23:26 270 +2
질문 /var/www 폴더가 삭제되었습니다. ㅜ,.ㅜ 2 니속사정 3일 전20:42 275 +1
잡담 jellyfin 자원 진짜 안쓰네요 1 kmw_ 3일 전19:26 409 +1
131 가이드
image
달소 23.09.05.15:56 2738 0
130 가이드
image
달소 23.09.09.21:34 2177 +2
129 가이드
image
달소 23.09.04.01:16 2037 0
128 가이드
image
DarkAcid 24.01.26.08:17 1984 +2
127 가이드
image
달소 23.07.04.20:38 1942 +7
126 가이드
image
달소 23.07.24.01:10 1937 +4
125 가이드
image
달소 23.04.01.02:40 1866 +4
124 가이드
image
달소 23.11.07.00:00 1584 +6
가이드
image
달소 23.07.15.16:34 1516 +5
122 가이드
image
달소 23.09.27.14:22 1481 +5
121 가이드
image
앨런임더 23.04.02.15:52 1453 +3
120 가이드
image
빨간물약 23.12.17.21:51 1258 +2
119 가이드
image
ExpBox 23.04.23.02:29 1249 +6
118 가이드
image
화정큐삼 23.08.07.12:40 1176 +4
117 가이드
image
미오뜨 23.10.16.15:05 1116 +6
116 가이드
image
화정큐삼 23.08.08.09:33 1059 +5
115 가이드
image
달소 23.11.14.22:22 1039 +3
114 가이드
image
달소 23.09.03.17:07 1030 0
113 가이드
image
달소 23.09.26.11:36 1005 +1
112 가이드
image
달소 23.09.17.15:55 949 +4