{"id":13578164,"url":"https://github.com/nickjg1/homeserver-ansible","last_synced_at":"2025-04-05T16:31:58.314Z","repository":{"id":168797741,"uuid":"644595268","full_name":"nickjg1/homeserver-ansible","owner":"nickjg1","description":"Quickly setup your own HomeServer/NAS with these playbooks","archived":false,"fork":false,"pushed_at":"2023-09-29T14:36:32.000Z","size":58,"stargazers_count":61,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-05T15:49:25.349Z","etag":null,"topics":["ansible","automation","bash","homelab","homeserver","linux","server","shell","ubuntu"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickjg1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-05-23T21:15:14.000Z","updated_at":"2024-10-27T11:57:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"84731c7f-cea5-451a-8425-9bb8417cbca4","html_url":"https://github.com/nickjg1/homeserver-ansible","commit_stats":null,"previous_names":["nickjg1/homeserver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjg1%2Fhomeserver-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjg1%2Fhomeserver-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjg1%2Fhomeserver-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickjg1%2Fhomeserver-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickjg1","download_url":"https://codeload.github.com/nickjg1/homeserver-ansible/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247366372,"owners_count":20927499,"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":["ansible","automation","bash","homelab","homeserver","linux","server","shell","ubuntu"],"created_at":"2024-08-01T15:01:28.060Z","updated_at":"2025-04-05T16:31:57.950Z","avatar_url":"https://github.com/nickjg1.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# Home Server Ansible Playbooks\n\n## Ansible Playbooks to help you set up your own server at home\n\nThese playbooks will configure and update Ubuntu, install Docker, and deploy the containers.\nIt uses Traefik as it's reverse proxy manager and Authelia for Two Factor Authentication. See the services list [here](serviceslist.md). All of the services will be accessible at https://\\\u003cservice\u003e.\\\u003cyourdomain\u003e\n\n**Important**: Make sure you set SSL/TLS encryption mode to **full** in Cloudflare.\n\n## Acknowledgments\n\nThis project is based heavily on [Rishav Nandi's Ansible Homelab.](https://github.com/rishavnandi/ansible_homelab)\n\n## Prerequisites\n\nIn order for you to use these playbooks, you'll need a couple things:\n\n- Basic knowledge of internet protocols (SSH, TCP/UDP etc.), Ansible and Linux\n- Router with ports 80 and 443 forwarded to your servers IP address\n- Google Account\n- Domain name\n- Cloudflare account with your domain name [nameservers](https://www.youtube.com/watch?v=uqlo3lCqiy0) pointed to their DNS Servers\n- A [supported VPN](https://haugene.github.io/docker-transmission-openvpn/supported-providers/) to use with Transmission*\n- A fresh install of Ubuntu Server LTS 22.04\n\n*If you don't plan on using Transmission then the VPN is not needed.\n\n## Setup\n\nOnce you've installed Ubuntu, you'll need an SSH Key for Ansible to use. You will need to create an one and copy it to the server. This can be done with the following commands:\n\n```bash\nssh-keygen -o -a 100 -t ed25519 -f \u003cpath to ssh file\u003e -C \u003cyour_email\u003e\nssh-copy-id -i ~/.ssh/homeserver \u003cuser\u003e@\u003cserver\u003e\n```\n\nNote: I'd recommend storing the ssh file at `~/.ssh/homeserver`\n\nFork this repository, then clone it to your local machine and run the following command to install the required roles:\n\n```bash\ngit clone https://github.com/nickjg1/homeserver-ansible\nansible-galaxy install -r requirements.yml\n```\n\nChange directories and create an ansible vault file with the following command and enter a password when prompted:\n\n```bash\ncd homeserver-ansible\nansible-vault create group_vars/all/vault.yml\n```\n\nOpen the vault file with the following command:\n\n```bash\nansible-vault edit group_vars/all/vault.yml\n```\n\nPaste the following into the vault file and replace the values with your own:\n\n```yaml\nuser_password: \"\u003cyour sudo password\u003e\"\n```\n\n## Configuration\n\nMake all the necessary changes to the `group_vars/all/vars.yml` and `hosts/hosts` files to match your environment. Extra packages can be added to `group_vars/all/vars.yml`. Any unwanted services can be removed in the `services/tasks/main.yml` file. See [variable help](variablehelp.md) for more information.\n\n## Notes and Disclaimers\n\nThis playbook opens your server up to the internet and potentially malicious attacks. Two factor authentication, Cloudflare and [Jeff Geerling's Security Role](https://github.com/geerlingguy/ansible-role-security) offer good layers of protection, but it's always good practice to be mindful of the risks. Further configuration in Cloudflare can strengthen your security.\n\nThis also changes the default listening port of SSH to 69. It can be changed in `group_vars/all/vars.yml`.\n\n## Installation\n\nRun this command, enter your sudo password and vault password when prompted:\n\n```bash\nansible-playbook run.yml -K --ask-vault-pass\n```\n\n## Post Installation and Troubleshooting\n\nIf you need help setting services up or have any issues with your installation, see [post installation help](postinstallation.md).\n\n## Credit\n\n- [Rishav Nandi](https://github.com/rishavnandi)\n- [Jeff Geerling](https://github.com/geerlingguy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickjg1%2Fhomeserver-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickjg1%2Fhomeserver-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickjg1%2Fhomeserver-ansible/lists"}