Skip to content

Add ANONYMIZE_IP env#2

Merged
githubsaturn merged 2 commits into
caprover:mainfrom
rklos:anonymise-ips
Dec 2, 2025
Merged

Add ANONYMIZE_IP env#2
githubsaturn merged 2 commits into
caprover:mainfrom
rklos:anonymise-ips

Conversation

@rklos
Copy link
Copy Markdown
Contributor

@rklos rklos commented Nov 30, 2025

Solution to #1

It should work, however because of https://github.com/caprover/caprover/pull/2182/files#diff-be2d59703cc7a4531af0e468307ee11509b946fad11999b5e1241f2c5870028aR450 it needs to be possible to set it up from the UI, because the server creates a temporary instance each time the user wants to see new stats.
Manually changing the long-running instance will only work for cron jobs, not on-demand ones.

@githubsaturn
Copy link
Copy Markdown
Contributor

Thanks!

By the way, the linked code is no longer in caprover/caprover. The GoAccess image is this very repository!
So all you need to do is to add a config here, and pass it as an env var here and here to make this work.

else
# If anonymization is disabled but database has anonymization marker, remove it
if [ -d "$dbPath" ] && [ -f "$appPath/.anonymize-ip" ]; then
echo "Anonymization disabled but database was created with anonymization, removing to recreate"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're technically changing the current behavior, let's version up to make sure we don't cause issues for existing installs. Change version to 1.9.4 here:

goaccess_version=1.9.3

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants