Setup your private photo servers
always sync with your iPhone
井民全 Jing, mqjing@gmail.com
請注意: 這裡只是展示 owncloud 與 iphone 的功能, 所以使用 Docker evaluation. 如果要保存你在 server 上的資料, 記得要在 docker 與 owncloud 做相關的儲存設定. 否則重新開啟 docker 資料會全部消失.
Google Photo 開始收費了, 應該有很多人急著尋找 Google Photo 替代方案. 但我的照片和影片用量非常大, 如果全部放在 public cloud, 那麼不管是哪一家的雲服務, 都會非常昂貴.
錢不是這樣花的.
購買一台 NAS 是一個解決方法, 可是, 明明只是想把手機的照片與影片備份到硬碟, 而且能隨時在手機上顯示這些珍貴的記憶, 真的需要花個 2~3 萬買 NAS 再買硬碟嗎?
所以, 乾脆自己架設一個類似的系統, 讓家裡的儲存空間與手機的照片庫, 自動同步備份. 徹底的解決 金錢, 容量, 的問題.
我要的功能很簡單, 只要
Automated upload iPhone Photo folder in the Background
To replace the backing up photos to Google Photos.
Ideally, the app would back things up to the NAS when you captured an image/video.
Just setup a ownCloud server at home
with DDNS and then install download the owncloud App to your iPhone. You get a
simple private iPhone "Photo/Video Backup" solution.
Here is the procedure.
1. Setup your
Server for Privacy Storage Service
1.1. The
ownCloud Server
Note, you should follow the instructions [1] or a brief way[3] to install your privacy ownCloud. Here, I show you how to install the owncloud using Docker[2]. If you want to preserve the uploaded data in server, you should setup the docker volumes and owncloud storage options.
Docer version Access only works with
http, not https.
Check the version
Here was my tested configurations.
Currently, by the dates 2022/08/27, it still has issue (maybe) on the
Ubuntu 22.04 with the latest docker tage owncloud/server. If you cannot
successful to install the service. Switch to the other tag, it's would work.
Ubuntu 20.04 with docker tag
owncloud/server:ok Ubuntu 22.04:with docker tag
owncloud/server:10.10.0: ok Ubuntu 22.04 with docker tag
owncloud/server, failure |
On Ubuntu 22.04
Step 1: Install Docker
# install sudo curl -sSL https://get.docker.io/
| sh # check docker -v |
Step 2: Setup Docker User with Rootless Mode
The rootless mode is is the only way to
run ownCloud’s command-line interface occ in a docker container.
# add $USER to the docker group sudo usermod -aG docker ${USER} su - ${USER} # apply the new group membership # check groups # check to see the docker group docker run hello-world # test the docker command |
Step 3: Pull ownCloud & Run
docker run --rm --name oc-eval -d -e
OWNCLOUD_DOMAIN=localhost:8080 -p8080:8080 owncloud/server:10.10.0 docker logs oc-eval # view log |
Test
2. iPhone
Site
2.1. Install the
owncloud app
In AppStore, search and install
[ownCloud]
2.2. Setup to
automaticaly sync with Photo
It's very easy to enable automatic
upload function for your photo and video from iPhone to your ownCloud service.
Only 3 steps.
Result
3.
Additional
3.1. Enable
External Driver
Step 1: goto Setting
admin -> [Settings]
Step 2: Select [Storage]
Step 3: Config [External Storage]
4. References
- Official Site, Install
owncloud on ubuntu, https://doc.owncloud.com/server/next/admin_manual/installation/manual_installation/manual_installation.html
- Official Site, Install
owncloud on ubuntu using Docker, https://doc.owncloud.com/server/next/admin_manual/installation/docker/
- A brief way to install
owncloud on ubuntu, https://kifarunix.com/install-owncloud-server-on-ubuntu-22-04/