-
Add your SSH public key: Ensure your public key is available at
~/.ssh/id_ed25519.pub
. -
Create the inventory file: Create
inventory.ini
with the following content:[home_server] SERVER_IP ansible_user=SSH_USER
Replace
SERVER_IP
with your server's IP andSSH_USER
with your SSH username. -
Create the secrets file:
The Cloudflare script updates your dynamic IP to ensure your domain always points to your server. Create
secrets.yaml
with your Cloudflare details:zone_id: "YOUR_ZONE_ID" dns_record_id: "YOUR_DNS_RECORD_ID" api_token: "YOUR_API_TOKEN" domain: "yourdomain.com"
-
Run the playbook:
ansible-playbook playbook.yaml -i inventory.ini --ask-become-pass --ask-pass
casantosmu/home-server
Automated setup for a home server using Ansible. Includes SSH configuration, Docker Compose template, and instructions to simplify server management.
Jinja