#share#Umami: Simple and easy-to-use website statistics system, using docker deployment tutorial

888u

Last update at :2024-02-27,Edit by888u

This site used Baidu statistics before, but Baidu statistics always had problems. Then I bought Pagoda statistics. I found that the data collected by Pagoda statistics was too high. I wanted to find another statistical system for comparison, so online After searching for a while, I actually found one called Umami, which has a Chinese interface and is simple and easy to use. I will share the installation process with you below. If you need it, you can take a look.

Interface demonstration picture:

Deployment process

The webmaster is using Virmach's 512M package. There is still a $7 annual payment package: https://www.kxceping.com/18206.htm

VPS system: Debian 9 64bit Minimal

Umami has relatively small hardware requirements and can run on a machine with 256M memory.

Install necessary tools such as docker, curl, git, nginx, etc.

apt -y update apt -y install curl git nginx python-certbot-nginx curl -sSL https://get.docker.com/ | sh systemctl enable docker nginx curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose

Then go to github to pick up the project, and the second line is to enter the directory

git clone https://github.com/mikecao/umami.git cd umami/

Edit configuration file

nano docker-compose.yml

It is recommended to modify the default code and then use the domain name to access it instead. If you use Xshell, you can edit and paste directly into the text file, press CTRL+O to save, and then press CTRL+X to exit

version: '3' services: umami: image: ghcr.io/mikecao/umami:postgresql-latest ports: - "127.0.0.1:3000:3000" # Only listen locally environment: DATABASE_URL: postgresql://username:password@db-umami:5432/umami # The database and password here should be the same as those you modified below DATABASE_TYPE: postgresql HASH_SALT: replace-me-with-a-random-string depends_on: -db-umami db-umami: image: postgres:12-alpine environment: POSTGRES_DB:umami POSTGRES_USER: username # Database user POSTGRES_PASSWORD: password # Database password volumes: - ./sql/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro -umami-db-data:/var/lib/postgresql/data volumes: umami-db-data:

Start up

docker-compose up -d

Create a new anti-generation configuration file

nano /etc/nginx/conf.d/umami.conf

Configure your domain name and remember to resolve your domain name to the IP of this VPS.

server { listen 80; server_name domain name; # Replace with your domain name client_max_body_size 0; location/{ proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }

If you want to use HTTP to automatically issue a certificate, use the following command. During the process, you need to enter your email address and Y for confirmation.

certbot --nginx

Check nginx configuration

nginx -t

If there is no problem, you can access your domain name. The English interface is opened. The user name is admin and the password is umami

Click the upper right corner to switch languages. In the settings, you can add websites that require statistics. Activate the shared link to make the statistics public.

After the addition is completed, click behind the domain name to get the statistical code, put it into your website and use it. I have been using it for two days now and I feel that the effect is good. The only thing is that the search keywords cannot be counted. However, There is no way. At present, Baidu’s keywords can’t be counted except for his statistics.

Recommended site searches: hosting services, IP proxy free version 2.80, PHP space purchase, which high-defense game server is the best, virtual host trial for 30 days, Hong Kong virtual host space, registration-free virtual space, check IP, US host Comments, Foshan high defense server,

#share#Umami: Simple and easy-to-use website statistics system, using docker deployment tutorial

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码