2023-07-14 14:56:23 +00:00
# Ansible Role: nextcloud
2023-07-15 13:46:09 +00:00
This Ansible Role installs a rootless [Nextcloud ](https://github.com/nextcloud/docker ) container using Podman. It is intended to be composed with separate roles for Podman, database, and web proxy.
2023-07-14 14:56:23 +00:00
## Requirements
2023-07-14 17:46:47 +00:00
* [podman ](docs/PODMAN.md )
2023-07-14 14:56:23 +00:00
* [containers.podman ](https://github.com/containers/ansible-podman-collections )
## Dependencies
* [mariadb ](docs/DATABASE.md ) (optional)
2023-07-15 13:30:22 +00:00
* [postgresql ](docs/POSTGRES.md ) (optional)
* [nginx_conf ](docs/examples/nginx_conf.yml ) (optional)
2023-07-14 14:56:23 +00:00
## Role Variables
2023-07-15 13:30:22 +00:00
See the role [defaults ](defaults/main.yml ) and the Nextcloud [environment variable ](https://github.com/nextcloud/docker/blob/master/README.md#auto-configuration-via-environment-variables ) documentation. For a working example, see this [homelab stack ](https://github.com/bleetube/satstack ).
2023-07-14 14:56:23 +00:00
## Example Playbook
```yaml
- hosts: nextcloud
2023-07-15 13:30:22 +00:00
become: true
2023-07-14 14:56:23 +00:00
roles:
2023-07-15 13:30:22 +00:00
- role: nginxinc.nginx_core.nginx
2023-07-14 14:56:23 +00:00
- role: fauust.mariadb
- role: alvistack.podman
2023-07-15 13:30:22 +00:00
- role: bleetube.redis
2023-07-14 14:56:23 +00:00
- role: bleetube.nextcloud
2023-07-15 13:30:22 +00:00
become: false
tasks:
- import_tasks: nginx_conf.yml
2023-07-14 14:56:23 +00:00
```
2023-07-15 14:05:27 +00:00
## Systemd
```
systemctl --user status container-nextcloud.service
```
2023-07-15 13:30:22 +00:00
## Upgrades
Configure `nextcloud_version` .
2023-07-14 14:56:23 +00:00
```bash
2023-07-15 13:30:22 +00:00
ansible-playbook playbooks/nextcloud.yml --tags nextcloud
podman exec -it -u www-data nextcloud /var/www/html/occ app:update --all
podman exec -it -u www-data nextcloud /var/www/html/occ upgrade
2023-07-14 14:56:23 +00:00
```
## Backups
2023-07-15 13:30:22 +00:00
See the [postgres example ](docs/examples/postgres-backup.sh ).
2023-07-14 14:56:23 +00:00
## Monitoring
TODO
## Resources
* [nextcloud.admin ](https://github.com/nextcloud/ansible-collection-nextcloud-admin ) collection
2023-07-15 13:30:22 +00:00
* [Apps ](https://apps.nextcloud.com/ )
* [Admin Manual ](https://docs.nextcloud.com/server/latest/admin_manual/ )
* [User Manual ](https://docs.nextcloud.com/server/latest/user_manual/ )
2023-07-14 14:56:23 +00:00
## Thanks
Based on the original role created by [Joerg Kastning ](https://www.my-it-brain.de/wordpress/zu-meiner-person/ ). Thank you!