{"id":19331089,"url":"https://github.com/systemli/ansible-role-nextcloud","last_synced_at":"2025-04-22T23:31:47.380Z","repository":{"id":37005653,"uuid":"215246970","full_name":"systemli/ansible-role-nextcloud","owner":"systemli","description":"Ansible role to maintain (install and upgrade) Nextcloud instances on Debian","archived":false,"fork":false,"pushed_at":"2025-03-04T18:21:19.000Z","size":288,"stargazers_count":13,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-02T04:47:25.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemli.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":"2019-10-15T08:28:54.000Z","updated_at":"2025-03-04T18:21:21.000Z","dependencies_parsed_at":"2023-02-14T10:01:09.610Z","dependency_job_id":"cdeabe5f-7701-4d12-8ef1-cb9e2296f7f5","html_url":"https://github.com/systemli/ansible-role-nextcloud","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fansible-role-nextcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fansible-role-nextcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fansible-role-nextcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemli%2Fansible-role-nextcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemli","download_url":"https://codeload.github.com/systemli/ansible-role-nextcloud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250340291,"owners_count":21414517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-10T02:39:00.916Z","updated_at":"2025-04-22T23:31:47.040Z","avatar_url":"https://github.com/systemli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible role to install and maintain Nextcloud setups\n\n[![Build Status](https://github.com/systemli/ansible-role-nextcloud/workflows/Integration/badge.svg?branch=main)](https://github.com/systemli/ansible-role-nextcloud/actions?query=workflow%3AIntegration)\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-nextcloud-blue.svg)](https://galaxy.ansible.com/systemli/nextcloud/)\n\nThis role is meant to deploy and upgrade Nextcloud instances to Debian\nsystems.\n\n# Using the Ansible module `nextcloud_app`\n\nThis role uses the Ansible module `nextcloud_app` for managing\nNextcloud apps. There is a [pull request](https://github.com/ansible/ansible/pull/36744)\nto include the module into Ansible.\n\n# How it works\n\n* The requested Nextcloud version is installed into\n  `{{ nextcloud_work_dir }}/nextcloud-{{ nextcloud_version }}`.\n* The symlink `{{ nextcloud_work_dir }}/nextcloud-current` points to the\n  active Nextcloud installation.\n\n# Preliminaries\n\nThe role takes care of installing and upgrading Nextcloud and its apps. It\ndoesn't install or configure MariaDB/MySQL, mail or web service. The latter\nhas to be done separately.\n\nPHP dependencies required for Nextcloud are installed by that role.\n\nSome modules used in this role are new to Ansible 2.2 and it's tested with\nAnsible 2.2, 2.3 and 2.4.\n\nThe following preliminaries need to be met:\n\n* Ansible 2.2 or newer\n* Debian target system with the following requirements:\n  * MariaDB/MySQL server with admin permissions (may be remote)\n  * Webserver (e.g. Apache2/Nginx) with basic PHP support\n  * Mail server if Nextcloud instance shall send out mails (may be\n    remote)\n  * `jmespath` library needs to be installed on the host running the playbook (needed for the `json_query` filter). See `requirements.txt`\n* The Nextcloud `data` directory needs to be located outside\n  `nextcloud_work_dir`\n\n# Usage example\n\n* Integrate the role in your playbook: \n    \n```\n- hosts: cloud.example.org\n  roles:\n    - nextcloud\n  tags:\n    - nextcloud\n```\n\n* Configure role variables in `host_vars` for the target system:\n    \n```\n# Nextcloud settings\n\nnextcloud_workdir: \"/var/www/cloud.example.org/nextcloud\"\nnextcloud_data_dir: \"/srv/nextcloud/data\"\nnextcloud_config:\n  system:\n    memcache.local: '\\OC\\Memcache\\APCu'\n    memcache.distributed: '\\OC\\Memcache\\Redis'\n    memcache.locking: '\\OC\\Memcache\\Redis'\n    redis:\n      host: localhost\n      port: 6379\n    trusted_domains:\n      - cloud.example.org\n  apps:\n    notify_push:\n      base_endpoint: \"https://cloud.example.org/push\"\nnextcloud_mysql_password: \"******\"\nnextcloud_admin_password: \"******\"\nnextcloud_notify_push: True\n\nnextcloud_apps:\n  - admin_audit\n  - calendar\n  - contacts\n```\n\n* Deploy Nextcloud to the target system:  \n    \n  `ansible-playbook site.yml -t nextcloud -l cloud.example.org --diff`\n\n* Configure the VirtualHost in your webserver. The following is an example\n  snippet for a jinja2 Apache2 vhost template:  \n    \n```\n{% set nextcloud_webroot = nextcloud_workdir|d() + '/nextcloud-current' %}\n\tDocumentRoot {{ nextcloud_webroot }}\n\t\u003cDirectory {{ nextcloud_webroot }}\u003e\n\t\tOptions FollowSymlinks\n\t\tAllowOverride All\n\n\t\t\u003cIfModule mod_dav.c\u003e\n\t\t\tDav off\n\t\t\u003c/IfModule\u003e\n\n\t\tSetEnv HOME {{ nextcloud_webroot }}\n\t\tSetEnv HTTP_HOME {{ nextcloud_webroot }}\n\t\u003c/Directory\u003e\n\n    # Proxy rules for the Nextcloud notify_push daemon\n    ProxyPass /push/ws ws://127.0.0.1:7867/ws\n    ProxyPass /push/ http://127.0.0.1:7867/\n    ProxyPassReverse /push/ http://127.0.0.1:7867/\n```\n\n# Upgrading Nextcloud\n\nTo upgrade a Nextcloud instance, it's sufficient to bump the version\nin Role variable `nextcloud_version` and run the role again.\n\n## Manually upgrading Nextcloud\n\nIf you prefer to upgrade Nextcloud manually, you can configure the role to not\nperform any uprades by setting `nextcloud_upgrade` to `False`. Beware that you\nalso have to set `nextcloud_instance` to something that doesn't contain\n`nextcloud_version` in this case:\n\n```\nnextcloud_upgrade: False\nnextcloud_instance: \"{{ nextcloud_workdir }}/nextcloud\"\n```\n\n# Notification push daemon support\n\nWhen `nextcloud_notify_push` is enabled, the [Nextcloud notify_push\ndaemon](https://github.com/nextcloud/notify_push) will be installed, configured\nand enabled.\n\nPlease beware that further configuration might be needed:\n* Redis needs to be configured for caching.\n* Configure your webserver as reverse proxy. See the [upstream\n  documentation](https://github.com/nextcloud/notify_push#reverse-proxy)\n  for details.\n* Set `base_endpoint` for the `notify_push` app accordingly:\n  ```\n  nextcloud_config:\n  [...]\n    apps:\n      notify_push:\n        base_endpoint: \"https://cloud.example.org/push\"\n  ```\n\n# Testing \u0026 Development\n\n## Tests\n\nFor developing and testing the role we use Github Actions, Molecule, and Vagrant. On the local environment you can easily test the role with\n\nRun local tests with:\n\n```\nmolecule test \n```\n\nRequires Molecule, Vagrant and `python-vagrant` to be installed.\n\n# License\n\nThis Ansible role is licensed under the GNU GPLv3 or later.\n\n# Author\n\n[https://www.systemli.org](https://www.systemli.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemli%2Fansible-role-nextcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemli%2Fansible-role-nextcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemli%2Fansible-role-nextcloud/lists"}