• Stars
    star
    17
  • Rank 1,257,181 (Top 25 %)
  • Language
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dockerized Nextcloud Server with many customizable options

github.com/tiredofit/docker-nextcloud

GitHub release Build Status Docker Stars Docker Pulls Become a sponsor Paypal Donate

About

This will build a Dockerfile for Nextcloud - a web based groupware solution.

  • Includes fail2ban for bad authentication blocking
  • Includes Nextcloud Hi Performance Files Backend

Maintainer

Table of Contents

Prerequisites and Assumptions

  • Assumes you are using some sort of SSL terminating reverse proxy such as:

Installation

Build from Source

Clone this repository and build the image with docker build <arguments> (imagename) .

Prebuilt Images

Builds of the image are available on Docker Hub and is the recommended method of installation.

The following image tags are available along with their tagged release based on what's written in the Changelog:

Version Container OS Tag
23 Alpine :23-latest
22 Alpine :22-latest
21 Alpine :21-latest

Multi Architecture

Images are built primarily for amd64 architecture, and may also include builds for arm/v6, arm/v7, arm64 and others. These variants are all unsupported. Consider sponsoring my work so that I can work with various hardware. To see if this image supports multiple architecures, type docker manifest (image):(tag)

Configuration

Quick Start

The first boot can take from 2 minutes - 5 minutes depending on your CPU to setup the proper schemas.

Persistent Storage

The following directories are used for configuration and can be mapped for persistent storage.

Upgrading from an earlier version of this image running Nextcloud 20 or earlier? See Upgrading from the 2.x Series

Directory Description
/data/userdata Nextcloud Data
/www/nextcloud/config Nextcloud Configuration Directory
/data/apps Custom Apps downloaded from Plugin Store
/data/themes Custom Themes Directory
/data/cache Cache Directory
/data/tmp Temporary Directory
/data/templates/ Templates Directory
/www/logs Nginx / php-fpm / Nextcloud logfiles

Base Images used

This image relies on an Alpine Linux base image that relies on an init system for added capabilities. Outgoing SMTP capabilities are handlded via msmtp. Individual container performance monitoring is performed by zabbix-agent. Additional tools include: bash,curl,less,logrotate,nano,vim.

Be sure to view the following repositories to understand all the customizable options:

Image Description
OS Base Customized Image based on Alpine Linux
Nginx Nginx webserver
PHP-FPM PHP Interpreter

If you there are features that you wish to override based on the defaults and for some reason the environment variables are not working, create a file called custom.config.php in your data/config directory

Parameter Description Default
ADMIN_USER Admin user e.g. admin
ADMIN_PASS Admin pass e.g. password
DOMAIN The Domain that this is configured for e.g. 'example.org'
DB_TYPE Set the DB_TYPE - e.g. mysql, postgres, sqlite3 sqlite3
DB_HOST Hostname of DB Server e.g. nextcloud-db
DB_NAME Database name e.g. nextcloud
DB_PORT Database port e.g. 3306
DB_USER Username for Database e.g. nextcloud
DB_PASS Password for Database e.g. password
IFRAME_DOMAINS Comma seperated value of domains/hostnames you want to allow loading the site via an IFrame e.g. site.example.com
MONITORING_APPLICATION_TOKEN Monitoring Application Token if 'serverinfo' application installed

This image automatically configures nextcloud with the following options as defined in config.sample.php.

Variable Description Nextcloud Attribute Default
ANIMATED_GIFS_MAX_FILESIZE Max file size for Animated Gifs max_filesize_animated_gifs_public_sharing 10
CACHE_DIRECTORY Cache Directory (leave blank for default) ``
CIPHER Encryption Cipher cipher AES-256-CFB
DATA_DIRECTORY Data Directory ${NGINX_WEBROOT}/data
DEFAULT_APPLICATION Default Application users see defaultapp files
DEFAULT_LANGUAGE Default Language to Install default_language en
DEFAULT_LOCALE Default Locale default_locale en_US
ENABLE_APP_CODE_CHECKER Check for signatures on all code appcodechecker TRUE
ENABLE_APP_STORE Enable App Store appstoreenabled TRUE
ENABLE_BRUTEFORCE_PROTECTION Enable Brute Force Protection auth.bruteforce.protection.enabled TRUE
ENABLE_CHECK_WELLKNOWN Enable .wellknown check in admin TRUE
ENABLE_DISPLAY_NAME_CHANGE Allow user to change name allow_user_to_change_display_name TRUE
ENABLE_FILESYSTEM_CHECK_CHANGES Check changes on Filesystem in Background filesystem_check_changes FALSE
ENABLE_FILE_LOCKING Enable File Locking filelocking.enabled TRUE
ENABLE_KNOWLEDGE_BASE Enable Help Menu knowledgebaseenabled TRUE
ENABLE_LOGIN_FORM_AUTOCOMPLETE Allow Autocomplete on Login Pages login_form_autocomplete TRUE
ENABLE_LOG_QUERY Enable Logging DB Queries log_query FALSE
ENABLE_MYSQL_UTF8MB4 Enable 4 byte strings for MariaDB mysql.utf8mb4 TRUE
ENABLE_PARTFILE_UPLOADS_STORAGE Enable uploading .part files in same location TRUE
ENABLE_PREVIEWS Enable Document Previews enable_previews TRUE
ENABLE_SESSION_KEEPALIVE Enable Keepalive sessions session_keepalive TRUE
ENABLE_SIGN_UP Allow Signups to Instance simpleSignUpLink.shown TRUE
ENABLE_SMTP_AUTHENTICATION Enable SMTP Authentication mail_smtpauth FALSE
ENABLE_TOKEN_AUTH_ENFORCED Enforce logging in with Tokens for Clients token_auth_enforced FALSE
FILE_LOCKING_DEBUG Debug File Locking filelocking.debug FALSE
FORCE_LANGUAGE Force Language force_language en
FORCE_LOCALE Force Locale force_locale en_US
HASHING_COST Performance Cost for Hashing hashingCost 10
LDAP_CLEANUP_INTERVAL How many minutes to cleanup LDAP users ldapUserCleanupInterval 51
LOG_DATE_FORMAT Format for Date and Time in logs logdateformat Y-m-d H:i:s
LOG_DIR Log Directory logfile /www/logs/nextcloud
LOG_FILE_AUDIT Audit Log file audit.log
LOG_FILE_FLOW Workflow Log File flow.log
LOG_LEVEL Log Level loglevel 2
LOG_TIMEZONE Timezone for Logfile logtimezone Container Timezone
OVERWRITE_HOST Override the hostname for URLs overwritehost ``
OVERWRITE_PROTOCOL Override the Protocol if behind proxy overwriteprotocol ``
PREVIEW_MAX_X Maximum Pixels for Previews (X) preview_max_x 200
PREVIEW_MAX_Y Maximum Pixels for Previews (Y) preview_max_y 200
SHARE_FOLDER Change root path of all shares to users /
SHARING_ENABLE_ACCEPT Enable Sharing Acceptance features FALSE
SHARING_ENABLE_MAIL Enable Sharing Mail Notification TRUE
SHARING_FORCE_ACCEPT Force Sharing Acceptance features FALSE
SHARING_MAX_AUTOCOMPLETE_RESULTS Maximum results returned when searching sharing.maxAutocompleteResults 0
SHARING_MIN_SEARCHSTRING_LENGTH How many characters to type before searching sharing.minSearchStringLength 2
SKELETON_DIRECTORY What folder is copied to new users folders on first login skeletondirectory ${NGINX_WEBROOT}/core/skeleton
SMTP_AUTHENTICATION_TYPE Type of SMTP Authentication mail_smtpauthtype NONE
SMTP_DEBUG Debug SMTP activities mail_smtpdebug FALSE
SMTP_DOMAIN Email Domain for Outbound mail mail_domain example.org
SMTP_FROM Account name for Outbound Email, SMTP_DOMAIN will be added mail_from_address noreply
SMTP_HOST Remote SMTP Host mail_smtphost postfix_relay
SMTP_PASS SMTP Password mail_smtppassword ``
SMTP_PORT SMTP Port mail_smtpport 25
SMTP_SECURE tls,ssl if SMTP is TLS/SSL encrypted mail_smtpsecure FALSE
SMTP_SEND_PLAINTEXT_ONLY Send Plaintext Email Only mail_send_plaintext_only FALSE
SMTP_TIMEOUT Timeout for SMTP connections mail_smtptimeout 10
SMTP_USER SMTP Username (user part) mail_smtpname ``
SORT_GROUPS_BY_NAME Sort groups by name as opposed to most users sort_groups_by_name FALSE
TRASHBIN_RETENTION How to deal with users trashbins trashbin_retention_obligation auto
VERSIONS_RETENTION How to deal with File Versions versions_retention_obligation auto

Networking

The following ports are exposed.

Port Description
80 HTTP

Upgrading from the 2.x Series

  • If you are upgrading from the 2.x series of images (Nextcloud 20 and below) please note that the following environment variables have been introduced

  • TEMP_DIRECTORY - For holding temporary files

  • CACHE_DIRECTORY - Moving the "Cache" per user out of their user data folder for those using S3 Backend for performance reasons

  • APP_DIRECTORY - Applications downloaded from the App Store

  • DATA_DIRECTORY - Users Data Directory

  • You will also need to export new volumes if you are using the new defaults to these paths above:

Environment Variable 2.x Images volume mapping New Image mapping
APP_DIRECTORY /www/nextcloud/custom-apps /data/apps
CACHE_DIRECTORY unset /data/cache
DATA_DIRECTORY /www/nextcloud/data /data/userdata
SKELETON_DIRECTORY ${NGINX_WEBROOT}/core/skeleton /data/templates/skeleton
TEMP_DIRECTORY unset /data/tmp
  • Additionally you will need to make a change to the database to support the change of the data location as listed here.

Maintenance

Shell Access

For debugging and maintenance purposes you may want access the containers shell.

bash docker exec -it (whatever your container name is) bash

Support

These images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.

Usage

  • The Discussions board is a great place for working with the community on tips and tricks of using this image.
  • Consider sponsoring me personalized support.

Bugfixes

  • Please, submit a Bug Report if something isn't working as expected. I'll do my best to issue a fix in short order.

Feature Requests

  • Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.
  • Consider sponsoring me regarding development of features.

Updates

  • Best effort to track upstream changes, More priority if I am actively using the image in a production environment.
  • Consider sponsoring me for up to date releases.

License

MIT. See LICENSE for more details.

References

More Repositories

1

docker-freepbx

Dockerized FreePBX 15 w/Asterisk 17, Seperate MySQL Database support, and Data Persistence and UCP
496
star
2

docker-db-backup

Backup multiple database types on a scheduled basis with many customizable options
Dockerfile
472
star
3

docker-traefik-cloudflare-companion

Automatically Create CNAME records for containers served by Traefik
Python
274
star
4

docker-freescout

Dockerized Freescout Helpdesk
Dockerfile
146
star
5

docker-self-service-password

Dockerized LDAP Tollbox Self Service Password Changer with many customizable options
Dockerfile
115
star
6

docker-nginx-php-fpm

Dockerized Nginx + PHP FPM images with many customizable options
Dockerfile
106
star
7

docker-openldap

Dockerized OpenLDAP server with many customizable options
99
star
8

docker-jitsi-meet

Docker Jitsi Meet WebRTC conferencing system w/Prosody XMPP and s6 overlay
Dockerfile
64
star
9

docker-collabora-online

Dockerized Collabora Office Online with customizable options
Dockerfile
62
star
10

docker-osticket

Dockerized Help Desk Software
PHP
48
star
11

docker-tinc

Docker Tinc VPN Mesh server w/S6 Overlay Init, Zabbix Monitoring, and distributed configuration updating based on Alpine
Dockerfile
43
star
12

docker-postal

Dockerized Postal SMTP Server based on Alpine Linux and Ruby
Dockerfile
40
star
13

docker-fusiondirectory

Dockerized FusionDirectory LDAP Manager
Dockerfile
39
star
14

docker-lemonldap

Dockerized Authentication Server with Single Sign On SAML, OpenID Connect, CAS, and Header support
Dockerfile
39
star
15

docker-openldap-fusiondirectory

Dockerized OpenLDAP server with FusionDirectory Schema Support
34
star
16

docker-wordpress

Dockerized Wordpress Image with customizable options
Python
31
star
17

docker-alpine

Docker Alpine Linux Base Images
Dockerfile
30
star
18

docker-traefik

Dockerized Traefik Reverse Proxy with customizable options
Dockerfile
29
star
19

docker-mongodb-backup

Docker MongoDB Backup Container based on Alpine w/S6 init, Zabbix Monitoring
Dockerfile
28
star
20

docker-nginx-proxy-cloudflare-companion

Automatically update CNAME records when Docker container starts via Cloudflare
Python
27
star
21

docker-spamassassin

Docker Spamassassin Spam filtering based on Alpine Linux
Dockerfile
26
star
22

docker-clamav

Docker ClamAV Image with Zabbix Monitoring and Customizable Configuration
Dockerfile
23
star
23

docker-baserow

Dockerized Baserow No/Low code data management application based on Alpine
Dockerfile
22
star
24

docker-nginx

Dockerzed webserver with many customizable options
Dockerfile
22
star
25

docker-gitlab-ee

Dockerized Gitlab Enterprise Edition
Dockerfile
17
star
26

docker-debian

Docker Debian Base Images
Dockerfile
15
star
27

docker-discourse

Dockerized Discourse Forum
Dockerfile
15
star
28

docker-backuppc

Docker BackupPC with Zabbix monitoring support
Perl
15
star
29

docker-gcds

Docker Google Cloud Directory Sync service (GADS) w/S6 Overlay, Zabbix Monitoring
Dockerfile
14
star
30

docker-mariadb-backup

Docker MariaDB Backup Container w/ S6 Overlay, Zabbix Monitoring based on Alpine
Dockerfile
13
star
31

docker-zabbix

Dockerized Zabbix Server, Proxy, and Frontend
Dockerfile
13
star
32

docker-insync

Docker Insync Headless Client
Dockerfile
12
star
33

docker-rspamd

Dockerized Anti Spam Filter
Python
12
star
34

docker-nginx-ldap

Docker Nginx Image w/LDAP Authentication, Zabbix agent monitoring, S6 init, logrotate based on Alpine
Dockerfile
11
star
35

docker-bookstack

Dockerized Information Manager
Dockerfile
11
star
36

docker-mariadb

Docker MariaDB server w/ S6 Overlay, Zabbix Monitoring based on Alpine
11
star
37

docker-gitlab

Dockerized Gitlab CE w/Alpine Linux, Zabbix Monitoring and S6 Overlay
Dockerfile
10
star
38

docker-staytus

Docker Staytus Image w/s6 overlay, zabbix monitoring based on Alpine
HTML
10
star
39

docker-leantime

Dockerized Project Managment tool with many configurable options
Dockerfile
10
star
40

docker-otrs

Dockerized OTRS ITSM Helpdesk/Ticketing System based on Alpine w/Nginx
Dockerfile
9
star
41

docker-unbound

Docker Unbound DNS Resolver based on Alpine
Dockerfile
9
star
42

docker-postgres

Dockerized Postgresql Server with multiple databases/users, replication, and monitoring support
Dockerfile
9
star
43

docker-postfix

Dockerized MTA with many customizable features, LDAP, SASL, Milter, Relay Support
Dockerfile
8
star
44

docker-matomo

Dockerized Matomo (Piwik) Analytics
Dockerfile
8
star
45

docker-yourls

Dockerized YOURLS link shortener based on Alpine
Dockerfile
8
star
46

docker-invoiceninja

Dockerized Invoicing web application
Dockerfile
7
star
47

docker-nodejs

Docker NodeJS Base Images
7
star
48

docker-postfix-relay

Dockerized Postfix Relay for easy SMTP capabilities
Shell
7
star
49

docker-openvpn

Dockerized OpenVPN server w/Alpine+Debian Variants w/s6 overlay, and LDAP Authentication support
7
star
50

docker-rocketchat

Docker Rocketchat Server with S6 Initsystem and Zabbix Monitoring based on Alpine
6
star
51

docker-kopano

Dockerized Kopano Groupware server
Dockerfile
6
star
52

docker-n8n

Dockerized n8n workflow automation tool
Dockerfile
6
star
53

docker-listmonk

Dockerized Listmonk Mailing List server built iwth Alpine w/Zabbix Monitoring
Dockerfile
6
star
54

docker-cpuminer

Cryptocurrency Miner based on Alpine
6
star
55

docker-kopano-core

Dockerized Kopano Groupware Server
6
star
56

docker-grafana

Dockerfile
5
star
57

docker-moodle

Dockerized Moodle Learning Management System
Dockerfile
5
star
58

docker-loki

Dockerized Loki Log Analyzer
Dockerfile
5
star
59

docker-teampass

Dockerized Password Vault for Teams based on Alpine w/nginx,php-fpm
Dockerfile
5
star
60

docker-orbeon

Docker Orbeon Forms CE w/S6 Init, Tomcat, based on Alpine
Dockerfile
5
star
61

docker-redis

Docker Redis Server with S6 Initsystem and Zabbix Monitoring based on Alpine
5
star
62

docker-elasticsearch

Dockerized Elasticsearch based on Alpine linux
4
star
63

fusiondirectory-plugin-kopano

Plugin to manage users/groups for Kopano (fork of Zarafa) within Fusion Directory LDAP Manager
PHP
4
star
64

docker-novnc

Run GUI applications within a browser - Base image
Dockerfile
4
star
65

docker-flarum

Dockerized Flarum Web Forum Software based on Alpine
Shell
4
star
66

docker-registry

Dockerized Docker Registry
Dockerfile
4
star
67

docker-rabbitmq

Dockerized RabbitMQ server
Python
4
star
68

docker-gitlab-runner

Docker Gitlab runner w/ Zabbix monitoring support based on Alpine
4
star
69

docker-openeats

Dockerized Openeats Recipe manager based on Alpine Linux w/Zabbix Monitoring
Dockerfile
3
star
70

docker-restic

Dockerized Backup application
Dockerfile
3
star
71

docker-dovecot

Docker Dovecot IMAP server based on Alpine w/LDAP Support
TSQL
3
star
72

docker-uptimekuma

Dockerized Service availability monitoring system
Dockerfile
3
star
73

docker-draw-io

Docker Draw.IO image based on Alpine and Nginx
3
star
74

docker-logrotate

Docker Logrotate to keep logfiles compressed and rotated based on Alpine
Shell
3
star
75

docker-mailhog

Dockerized SMTP Test server
Dockerfile
3
star
76

docker-cachet

Dockerized Cachet Status monitoring application based on Alpine Linux
Dockerfile
3
star
77

docker-sentry

Dockerized Sentry.IO Exception tracking system based on Debian w/LDAP and SAML
Python
3
star
78

docker-airsonic-advanced

Dockerized Airsonic Advanced Server based on Alpine
Dockerfile
3
star
79

docker-limesurvey

Dockerized Limesurvey application based on Alpine
Dockerfile
3
star
80

docker-mongo

Docker MongoDB server w/ S6 Overlay, Zabbix Monitoring based on Alpine
3
star
81

docker-haraka

Docker Haraka MTA based on Alpine
JavaScript
3
star
82

docker-ruby

Docker Ruby base images w/ S6 Overlay and Zabbix monitoring support
3
star
83

docker-ubuntu

Dockerized Ubuntu Base Images
Dockerfile
2
star
84

docker-memcached

Docker Memcached Server w/ S6 Initsystem and Zabbix Monitoring based on Alpine
Dockerfile
2
star
85

home

Home-Manager configuration ala Nix flakes
Nix
2
star
86

docker-kopano-meet

Dockerfile
2
star
87

docker-soulseek

Dockerized Soulseek Client
Dockerfile
2
star
88

docker-kopano-kapi

Dockerfile
2
star
89

docker-kopano-konnect

Dockerfile
2
star
90

docker-olefy

Dockerized Olefy TCP listener for OLE Tools
Dockerfile
2
star
91

docker-logchimp

Dockerized Logchimp Application
Dockerfile
2
star
92

docker-transmission

Dockerized Transmission client
Dockerfile
2
star
93

docker-dind

Docker in Docker Image with Zabbix monitoring Support and --squash --compress options by default based on Alpine
Dockerfile
2
star
94

docker-matrix-bridges

Dockerized Matrix Bridges to interconnect services
Dockerfile
2
star
95

docker-monica

Dockerized Monica PRM
Dockerfile
2
star
96

tiredofit

2
star
97

docker-minio

Dockerized Minio Server based on Alpine
Dockerfile
2
star
98

docker-tomcat

Docker Apache Tomcat based on Alpine
2
star
99

docker-mongo-builder

Docker Image to build MongoDB and associated tools for Alpine Edge from aports/non-free
Dockerfile
2
star
100

nixos-config

NixOS configurations
Nix
1
star