{"id":13316361,"url":"https://github.com/krlex/nextcloud-ansible","last_synced_at":"2026-03-17T23:02:39.664Z","repository":{"id":90101785,"uuid":"233271225","full_name":"krlex/nextcloud-ansible","owner":"krlex","description":"Installation nextcloud over ansible ","archived":false,"fork":false,"pushed_at":"2020-08-04T08:21:22.000Z","size":492,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-31T14:58:44.122Z","etag":null,"topics":["ansible","bash","debian10","docker","fedora30","letsencrypt","mariadb","nextcloud","nginx","php73","raspberry-pi","shell","ubuntu1804"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krlex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-11T17:38:19.000Z","updated_at":"2025-08-09T12:38:24.000Z","dependencies_parsed_at":"2023-03-04T18:45:32.253Z","dependency_job_id":null,"html_url":"https://github.com/krlex/nextcloud-ansible","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krlex/nextcloud-ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlex%2Fnextcloud-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlex%2Fnextcloud-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlex%2Fnextcloud-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlex%2Fnextcloud-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krlex","download_url":"https://codeload.github.com/krlex/nextcloud-ansible/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlex%2Fnextcloud-ansible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","bash","debian10","docker","fedora30","letsencrypt","mariadb","nextcloud","nginx","php73","raspberry-pi","shell","ubuntu1804"],"created_at":"2024-07-29T18:21:32.298Z","updated_at":"2026-03-17T23:02:39.639Z","avatar_url":"https://github.com/krlex.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Nextcloud (Latest)\r\n=========\r\n\r\nAnsible Playbook to install\r\n\r\n* [Nextcloud (Latest)](https://nextcloud.com/)\r\n* [nginx 1.17](https://nginx.org/)\r\n* [PHP 7.x](http://www.php.net/)\r\n* [MariaDB 10](https://mariadb.org/) or [PostgreSQL 10](https://www.postgresql.org/)\r\n* [redis](https://redis.io/)\r\n* [restic backup](https://restic.readthedocs.io)\r\n* Nextcloud Talk\r\n* [Collabora Online](https://www.collaboraoffice.com/)\r\nor\r\n* [Onlyoffice](https://www.onlyoffice.com)\r\n\r\nIn less than 20 minutes.\r\n\r\nWarning: Your existing nginx/php/mariadb setup will be over written. Up to now I tested this only on newly installed AWS EC2 Ubuntu, Dedian, Fedora and CentOS machines. So backup of your existing configuration is a good advice.\r\n\r\nRequirements\r\n------------\r\n\r\nUbuntu 16.04 und 18.04, CentOS 7, Debian 9 und 10, Amazon Linux 2, Fedora 30\r\n\r\nNot yet tested with other versions and flavours of Linux.\r\n\r\nInstall\r\n-------\r\n\r\n```bash\r\n# prepare your os and install ansible\r\ncurl -s https://raw.githubusercontent.com/krlex/nextcloud/master/prepare_system.sh | /bin/bash\r\n\r\n# clone this repo\r\ngit clone https://github.com/krlex/nextcloud-ansible\r\n\r\n# change to nextcloud directory\r\ncd nextcloud-ansible\r\n\r\n# edit variables\r\nvim inventory\r\n\r\n# run the playbook\r\n./nextcloud.yml\r\n\r\n# on debian use sudo\r\nsudo ./nextcloud.yml\r\n\r\n# on Fedora use\r\n./nextcloud.yml -e 'ansible_python_interpreter=/usr/bin/python3'\r\n\r\n# if your are fine with the defaults in the inventory (e.g. db version) just provide the ssl parameter\r\n./nextcloud.yml -e fqdn=nc.example.org -e ssl_certificate_type=letsencrypt -e 'cert_email=nc@example.org'\r\nor\r\n./nextcloud.yml -e fqdn=nc.example.org -e ssl_certificate_type=selfsigned\r\nor\r\n./nextcloud.yml -e fqdn=nc.example.org -e ssl_certificate_type=selfsigned -e nc_db_type=mysql\r\n```\r\n\r\n\u003e **WARNING**: Remember to update the inventory file if you want to run the playbook later again. E.g. to update the system. If you don't the defaults in the inventory file will be apply during the second run.\r\n\r\nLogin to your nextcloud web site \u003chttps://nc.example.org\u003e\r\n\r\nUsers and passwords have been set according to the entries in the inventory if defined there. Otherwise the admin password will be displayed at the end of playbook. Additional you can find them in the credential_store = /etc/nextcloud\r\n\r\nRole Variables\r\n--------------\r\n\r\nAll variables are defined in inventory file.\r\n\r\n```ini\r\n# Server domain name\r\n# Default is the fqdn of the machine\r\n# fqdn       = nc.example.org\r\n\r\n# selfsigned certificate as default\r\nssl_certificate_type  = 'selfsigned'\r\n\r\n# Letsencrypt or selfsigned certificate\r\n# ssl_certificate_type  = 'letsencrypt'\r\n\r\n\r\n# Your email adresse for letsencrypt\r\n# cert_email = nc@example.org\r\n\r\n# receive a certificate from staging\r\n# uncomment if you want to use letsencrypt staging environment\r\n# cert_stage = '--staging'\r\n\r\n#\r\n# Nextcloud varibales\r\n\r\n# data dir\r\nnc_datadir           = /var/nc-data\r\n\r\n# admin user\r\nnc_admin             = 'admin'\r\nnc_passwd            = ''             # leave empty to generate random password\r\n\r\n# database settings\r\n# nc_db_type          = 'mysql'        # (MariaDB)\r\n# nc_db_host          = 'localhost'\r\nnc_db_type           = 'pgsql'        # (PostgreSQL)\r\nnc_db_host           = ''\r\nnc_db                = 'nextcloud'\r\nnc_db_user           = 'nextcloud'\r\nnc_db_passwd         = ''             # leave empty to generate random password\r\nnc_db_prefix         = 'oc_'\r\n\r\n# Nextcloud mail setup\r\nnc_configure_mail    = false\r\nnc_mail_from         =\r\nnc_mail_smtpmode     = smtp\r\nnc_mail_smtpauthtype = LOGIN\r\nnc_mail_domain       =\r\nnc_mail_smtpname     =\r\nnc_mail_smtpsecure   = tls\r\nnc_mail_smtpauth     = 1\r\nnc_mail_smtphost     =\r\nnc_mail_smtpport     = 587\r\nnc_mail_smtpname     =\r\nnc_mail_smtppwd      =\r\n\r\n# php Version\r\nphp_version          = '7.3'\r\n\r\n# Install turn server for Nextcloud Talk\r\ntalk_install         = false\r\n\r\n# Allways get the latest version of Nextcloud\r\nnext_archive         = https://download.nextcloud.com/server/releases/latest.tar.bz2\r\n\r\n# Install restic backup tool if backup_folder is not empty\r\n# more info about restic: https://restic.readthedocs.io/en/latest/\r\n# to use a local directory as a restic repository (not a good idea anyway)\r\nrestic_repo          = '/var/backups/nextcloud'\r\n\r\n# use rclone to backup a cloud storage, see https://rclone.org for more details\r\n# configure also rclone_remote in group_vars/all.yml\r\n# restic_repo         = \"rclone:backup-selfhosted:selfhosted-{{ lookup('password', '{{ credential_store }}/restic_backup_s3_bucket_uid chars=ascii_lowercase,digits length=12') }}/backup\"\r\n\r\n# crontab setings for the backup script - default daily at 3pm\r\nrestic_backup_day    = '*'\r\nrestic_backup_minute = '0'\r\nrestic_backup_hour:  = '3'\r\n\r\n# Install Collabra Online\r\n# more info about collabora office: https://www.collaboraoffice.com/\r\ninstall_collabora     = false\r\n\r\n# Install Online Office\r\n# more info about onlyoffice office: https://www.onlyoffice.com\r\ninstall_onlyoffice    = false\r\n\r\n#\r\n# defaults path of your generated credentials (e.g. database, talk, onlyoffice)\r\ncredential_store      = /etc/nextcloud\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlex%2Fnextcloud-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrlex%2Fnextcloud-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlex%2Fnextcloud-ansible/lists"}