首页 > 其他 > 详细

Deploy NextCloudPi (ncp) docker on aarch64 (arm64) board

时间:2020-05-18 21:14:08      阅读:89      评论:0      收藏:0      [点我收藏+]

Deploy NextCloudPi(ncp) docker on aarch64 board

在Arm64或aarch64架构的板卡上使用Docker布署NextCloudPi云盘服务

About "arm64 vs aarch64", just Google it.

技术分享图片 技术分享图片

figure source

Reference:

1. Install ncp with docker:

If you wanna firstly have a taste in LAN network env.:

docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v ncdata:/data --name nextcloudpi ownyourbits/nextcloudpi 127.0.0.1

If you have a domain name:

docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v ncdata:/data --name nextcloudpi ownyourbits/nextcloudpi $YOUR_Domain

2. Some useful commands for work with docker:

We recommend to firstly read all the content below, and pick commands for your need during configuration. The procedures of configuration is roughly as below:

Enter the container:
  docker exec -it <container name> /bin/bash
  docker exec -it 6ef91daa0481 /bin/bash
Set the timeZone same with host:

Note: failing synchronizing the timezone of docker-container and host may lead Authorization Fatal
This is a big entraping?? ??

  cp /usr/share/zoneinfo/PRC /etc/localtime
  docker exec -it 6ef91daa0481 date
  docker exec -it 6ef91daa0481 /bin/bash
Install vim for container

You may need to configure config/config.php, but we recommend to use ncp-config as below.

  apt-get update
  apt-get install vim
  vim /var/www/nextcloud/config/config.php
  docker exec -it nextcloudpi ncp-config  #WARNING: note the ‘_‘ everywhere in ‘ncp-config‘!!

ref: https://help.nextcloud.com/t/reset-password-ncp/74207/12

Enlarge the volume for ‘/var/lib/docker‘ directory

WARNING: data may get lost. Do this if you have no data in your ncp account. Do it on your own risk.
WARNING: data may get lost. Do this if you have no data in your ncp account. Do it on your own risk.

ref: https://forums.docker.com/t/how-to-change-var-lib-docker-directory-with-overlay2/43620/9

  1. make the new folder on the other volume, e.g. you mount your Mess-storage HardDisk /sda1 on /data
  2. stop the docker daemon,
  3. move everything, e.g. cp -avr /var/lib/docker/ /data/lib/
  4. Edit the file /etc/docker/daemon.json and add or modfy the “data-root” entry.
    If you configuration is empty, the file will look like this:
	{
	  "data-root": "/data/lib/docker"
	}
  • Restart the docker daemon! Check by: # docker info | grep Root && docker ps -a && docker image ls
    If you meed the data-lost error, just change "data-root": "/data/lib/docker" back.
set the frpc for exposing the local service to public Internet
  • Check the port occupation:
  # lsof -i -P -n | grep LISTEN
  docker-pr  9168    root    4u  IPv6 120391      0t0  TCP *:4443 (LISTEN)
  docker-pr  9183    root    4u  IPv6 119704      0t0  TCP *:443 (LISTEN)
  docker-pr  9197    root    4u  IPv6 122113      0t0  TCP *:80 (LISTEN)
  • config frpc: vim /etc/frp/frpc.ini

    If you‘re not familiar frp(frps & frpc), learn and be practised about it.

e.g.    
    remote: 8282
    local:  80
  • domain name recored: map cloud.yourdomain.com to the IP of frps‘s host.

  • in frps‘s host, add host cloud.yourdomain.com to 8282: vim /etc/caddy/Caddyfile

    Caddy 自动https,确实很香啊~!Nginx 的正向代理配置啥的,这里就按下不表了哈~

cloud.yourdomain.com {
      gzip
      log stdout
      proxy / localhost:8282 {  # ncp, frp 8282 - > 80 @ armbian_chanidBox
        websocket
        transparent
      }
}
  • Add the LAN_IP; Domain; 127.0.0.1 into the trust domain list of ncp:

    add the domain cloud.yourdomain.com

    docker exec -it nextcloudpi ncp-config

create new user:

NextCloud does not support users to register themselves? Funny...

ref: https://docs.nextcloud.com/server/13/admin_manual/configuration_user/user_configuration.html#creating-a-new-user

Deploy NextCloudPi (ncp) docker on aarch64 (arm64) board

原文:https://www.cnblogs.com/sonictl/p/12912866.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!