Deploy Fathom Analytics
Fathom Analytics provides simple, useful websites stats without tracking or storing personal data of your users. It is open source and can be hosted on Render in just a few clicks.
- Create a new PostgreSQL database on Render. Set the Name, Database, and User to
- Fork render-examples/fathom-analytics and create a new Web Service on Render, giving Render permission to access your forked repo.
On the service creation page, click on Advanced and add a new secret file with filename
fathom.envand the following content:Make sure to update the values in the highlighted lines below.
FATHOM_GZIP=true FATHOM_DEBUG=false FATHOM_DATABASE_DRIVER="postgres" FATHOM_DATABASE_NAME="fathom" FATHOM_DATABASE_USER="fathom" FATHOM_DATABASE_PASSWORD="db password from step 1"FATHOM_DATABASE_HOST="internal db hostname from step 1"FATHOM_SECRET="a sufficiently strong secret"
See Fathom configuration for more details.
Click on Save web service and Fathom will be available on your
onrender.comURL in less than a minute.
Once Fathom is built, go to the Shell tab in your Render dashboard and create a Fathom admin user by entering this command:Make sure to replace the email and password.
./fathom --config /etc/secrets/fathom.env user add --email="firstname.lastname@example.org" --password="strong-password"
That’s it! You can now create a new site by visiting your Fathom
onrender.com URL. Fathom will start displaying analytics as soon as you copy the tracking snippet to your website.
You can also add a custom domain to your service and Render will automatically issue and manage SSL certificates for your domain.