Go to file
Paolo Asperti 66a33f797e
continuous-integration/drone/tag Build is passing Details
test cache_from
2023-11-09 18:17:37 +01:00
.dockerignore dockerignore 2021-04-28 14:35:34 +02:00
.drone.yml test cache_from 2023-11-09 18:17:37 +01:00
.gitignore initial import 2021-04-28 14:25:11 +02:00
Dockerfile splitted entrypoint 2023-11-09 18:05:53 +01:00
LICENSE initial import 2021-04-28 14:25:11 +02:00
README.md sleep timer configuration 2021-05-04 17:13:05 +02:00
entrypoint.sh splitted entrypoint 2023-11-09 18:05:53 +01:00
start.sh splitted entrypoint 2023-11-09 18:05:53 +01:00

README.md

docker nextcloud client

A simple nextcloud client that runs in a docker container.

build

docker build -t docker.asperti.com/paspo/nextcloudclient .

running via docker

docker run -d \
  -v "$PWD/nextcloud:/data" \
  -e "NEXTCLOUD_USERNAME=username" \
  -e "NEXTCLOUD_PASSWORD=password" \
  -e "NEXTCLOUD_URL=https://nextcloud.example.com" \
  -e "NEXTCLOUD_DIR=/data" \
  docker.asperti.com/paspo/nextcloudclient

running with docker-compose

this is a sample docker-compose.yaml:

version: "3"
services:

  nextcloudclient:
    image: docker.asperti.com/paspo/nextcloudclient
    restart: unless-stopped
    volumes:
      - "$PWD/nextcloud:/data"
    environment:
      - NEXTCLOUD_USERNAME=username
      - NEXTCLOUD_PASSWORD=password
      - NEXTCLOUD_URL=https://nextcloud.example.com
      - NEXTCLOUD_DIR=/data

you can run this with:

docker-compose up -d

Parameters

ENV Default Description
NEXTCLOUD_USERNAME username Nextcloud username
NEXTCLOUD_PASSWORD password Nextcloud password
NEXTCLOUD_URL https://nextcloud.example.com Nextcloud instance URL
NEXTCLOUD_DIR /data Location of nextcloud data inside the container
NEXTCLOUD_DIR_CHOWN 1 If set to "1" the entire content of the $NEXTCLOUD_DIR is chown with user ID and GID
NEXTCLOUD_FORCE_TRUST If set to "1" the client will accept untrusted https connections
NEXTCLOUD_HTTPPROXY If set, this proxy will be used to connect to the nextcloud instance. The format is: http://server:port
NEXTCLOUD_UPLIMIT If set, upload speed will be limited. (KB/s)
NEXTCLOUD_DOWNLIMIT If set, download speed will be limited. (KB/s)
NEXTCLOUD_EXCLUDEFILE Path to a file, inside the container, which contains a list of excluded directories/files
NEXTCLOUD_UNSYNCFILE Path to a file, inside the container, which contains a list of remote unsynced folders (selective sync)
NEXTCLOUD_SILENT If set to "1", the client will run in silent mode, with a lot less log messages
NEXTCLOUD_SLEEP 30 Seconds of sleep time between every client runs
USER_NAME nextcloudclient Internal username used by nextcloud client
USER_UID 1000 Internal UID used by nextcloud client
USER_GID 1000 Internal GID used by nextcloud client

Notes

  • If you're using 2FA in nextcloud, please create an application-specific password.
  • It's very important to set correct UID & GID when running for an unprivileged user