Deploy Fathom Analytics – Render Docs

  1. Create a new PostgreSQL database on Render. Set the Name, Database, and User to fathom.

  2. Fork render-examples/fathom-analytics and create a new Web Service on Render, giving Render permission to access your forked repo.

  3. On the service creation page, click on Advanced and add a new secret file with filename fathom.env and 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.com URL in less than a minute.

  1. Once Fathom is built, go to the Shell tab in your Render Dashboard and create a Fathom admin user by entering this command:
$ ./fathom --config /etc/secrets/fathom.env user add --email="you@your-email.com" --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 TLS certificates for your domain.