How to Install Fathom Privacy-Focused Web Analytics on Ubuntu
Installing Fathom on your VPS server is a straightforward process. Follow the steps below to set up Fathom for your web analytics needs.
Step 1: Update Your System
sudo apt update && sudo apt upgrade -y
Step 2: Install Required Dependencies
You need to install Docker and Docker Compose:
sudo apt install docker.io docker-compose -y
Step 3: Create a Directory for Fathom
Create a directory where Fathom will be installed:
mkdir ~/fathom
cd ~/fathom
Step 4: Create a Docker Compose File
Create a file named docker-compose.yml in the Fathom directory:
nano docker-compose.yml
And add the following configuration:
version: '3'
services:
fathom:
image: usefathom/fathom
ports:
- "8000:8000"
environment:
- FATHOM_DB_HOST=db
- FATHOM_DB_USER=fathom
- FATHOM_DB_PASSWORD=your_password
- FATHOM_DB_NAME=fathom
depends_on:
- db
db:
image: postgres
environment:
- POSTGRES_USER=fathom
- POSTGRES_PASSWORD=your_password
- POSTGRES_DB=fathom
Replace your_password with a secure password.
Step 5: Start Fathom
Run the following command to start Fathom:
sudo docker-compose up -d
Step 6: Access Fathom
Fathom should now be running on your VPS server. You can access it by navigating to http://your_server_ip:8000 in your web browser.
Conclusion
By following these steps, you have successfully installed Fathom on your VPS server. You can now start using Fathom for privacy-focused web analytics!