# docker nextcloud client A simple nextcloud client that runs in a docker container. ## build ```bash docker build -t docker.asperti.com/paspo/nextcloudclient . ``` ## running via docker ```bash 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: ```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: ```bash 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