The entry point is daily.yml which is supposed to be called ... daily.
(Thank you Mr Obvious!)
Install the required Ansible collections before running the playbooks:
ansible-galaxy collection install -r collections/requirements.yml
vps12.manitra.net is also in the smtp_relay group. Relay accounts are defined in group_vars/smtp_relay.yml under relay_users; each user has its own vaulted password, allowed sender regex, and allowed client IP list.
Before applying daily.yml, make sure every relay user password referenced from group_vars/smtp_relay.yml exists in group_vars/all/vault.yml, under smtp_relay.users. The role fails safely when a relay password is empty or missing.
The coolify role includes restic backup support for every host in the
[coolify] inventory group.
- A wrapper script (
/usr/local/sbin/coolify-backup) is deployed to the Coolify host. - At the scheduled time the script:
- Auto-discovers all running Postgres/MySQL/MariaDB containers and runs logical dumps inside them.
- Auto-discovers mounted Docker host paths from running containers.
- Backs up the resolved paths with
restic, excluding raw DB data directories, which are unsafe for live file snapshots. - Prunes old snapshots (daily/weekly/monthly retention).
- Removes the generated dumps after they are safely stored in restic.
- The restic repositories live on
vps06under/home/backuper/backup/<host>/, accessed over SFTP asbackuper.
restic-coolifystores the Coolify platform data.restic-<public-domain>stores each discovered Coolify application project.
- The role now bootstraps the source host SSH key, trusts
vps06, creates the destination directory onvps06, and authorizes the source host key there. - The
backuperaccount onvps06is managed through themaintainrole, so the backup destination is codified in the repo too.
- Do not rely on live file-level copies of running Postgres/MySQL volumes.
- Back up databases with logical dumps from inside their containers.
- Back up upload/document/application files and Docker volumes with
restic. - Auto-discovery means new Coolify apps are covered without editing host vars.
- Exclude extra paths only when you intentionally want to skip them.
group_vars/coolify/main.ymlenables backup by default for the whole group.group_vars/coolify/main.ymlenables automatic localhost SSH bootstrap for Coolify and keeps primary-user key management non-exclusive on those hosts so the generated Coolify key is not stripped by themaintainrole.group_vars/coolify/vault.ymlis now a whole-file vault, soansible-vault edit group_vars/coolify/vault.ymlworks normally.group_vars/coolify/vault.example.ymlshows the plaintext structure, including wherecoolify_restic_recovery_passwordis stored.- The repository base path is derived automatically as:
sftp:backuper@vps06.manitra.net:/home/backuper/backup/<inventory-short-host> - Each backup run creates or updates one repo per project, for example
restic-coolify,restic-sign.mg, orrestic-mission.eto.mg. - Recovery-key management is enabled for the whole group.
You can still add manual exceptions in host_vars/<host>/main.yml:
coolify_backup_database_dumps_extra:
- name: app1-postgres
type: postgres
container_name_prefix: "app1-postgres-"
user: postgres
password_env: POSTGRES_PASSWORD
output: "{{ coolify_backup_generated_dir }}/app1-postgres.sql.gz"
coolify_restic_excludes:
- "{{ coolify_base_dir }}/databases"
- /var/lib/docker/volumes/app1-cache/_dataSee the How to onboard another Coolify host section at the top of
roles/coolify/tasks/backup.yml for the full checklist. The short version:
- Add the host to
[coolify]ininventory.ini. - Run
daily.yml. - Only add
host_vars/<host>/main.ymlif that host needs exceptions such as manual dump overrides or extra excludes.