geerlingguy.fathom
Ansible Role: Fathom
This role sets up Fathom, a website analytics tool built with Go.
Once the playbook runs, you can access the Fathom interface on port 9000 by default. There, you will find instructions for linking your websites to your Fathom server for analytics.
Requirements
None required, but it's a good idea to install and set up Nginx for better security and stability. Also, consider using Certbot to get a valid TLS certificate for HTTPS (recommended roles: geerlingguy.nginx
and geerlingguy.certbot
).
Role Variables
Here are some important variables you can use (default values are in defaults/main.yml
):
fathom_binary_url: URL for downloading Fathom. You can change this to get a different version.
fathom_force_update: Set to
false
. Change totrue
if you want to force Ansible to update Fathom to a different version.fathom_manage_service: Set to
true
. Controls whether to manage the Fathom service.fathom_service_state: Set to
started
. This controls if the Fathom service is running.fathom_service_enabled: Set to
true
. This determines if the Fathom service starts on boot.fathom_service_user: Set to
root
, the user running the Fathom service.fathom_directory: Location:
/opt/fathom
. This folder contains Fathom’s configuration and database.fathom_http_port: Default is
"9000"
.fathom_database_name: Default is
fathom.db
.fathom_secret: Use a unique string here for better security! Replace
secret-string-here
.
Dependencies
None.
Example Playbook
- hosts: analytics
vars_files:
- vars/main.yml
roles:
- geerlingguy.fathom
Inside vars/main.yml
:
fathom_secret: insert-a-secret-string-here
Using with Nginx as a Proxy
See: Fathom playbook example using Nginx as a proxy.
You can also include the role geerlingguy.certbot
if you want to set up Certbot for managing HTTPS certificates with Nginx for your Fathom installation.
License
MIT / BSD
Author Information
This role was created in 2019 by Jeff Geerling, who wrote Ansible for DevOps.
ansible-galaxy install geerlingguy.fathom