项目作者: mskian

项目描述 :
Umami Self Hosted Analytics Cloud VPS ☁ Configuration 🔧
高级语言: Shell
项目地址: git://github.com/mskian/umami-conf.git
创建时间: 2020-08-26T04:54:49Z
项目社区:https://github.com/mskian/umami-conf

开源协议:MIT License

下载


umami

Umami Self Hosted Analytics Cloud VPS ☁ Configuration 🔧

Umami is a simple, fast, website analytics alternative to Google Analytics.

Install and Setup Umami on Ubuntu Cloud VPS Server ⚙

Requirements

  • Cloud VPS
  • OS - Ubuntu 20.04 LTS
  • Node.JS LTS Version
  • MYSQL 8
  • Nginx + Reverse Proxy
  • Certbot for Free SSL
  • Systemd Service for Run the APP Permanently
  • Git for Clone and Update the Software

installation

  • install and setup umami
  1. cd /var/www/
  2. git clone https://github.com/mikecao/umami.git
  3. cd umami
  4. npm install
  • Create database tables
  1. cd /var/www/umami
  2. mysql -u username -p databasename < sql/schema.mysql.sql
  • Create .env file for database connection and Hash salt in the umami cloned/downloaded Folder /var/www/umami
  1. touch .env
  2. nano .env
  1. DB_USER=username
  2. DB_PASSWORD=password
  3. DB_HOST=localhost
  4. DB_PORT=3306
  5. DB_NAME=databasename
  6. DATABASE_URL=mysql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
  7. HASH_SALT=somerandomstring

Generate Hash Salt from - https://bitwarden.com/password-generator

  • Build the Package
  1. npm run build
  • Start the server
  1. npm start

Firewall

if you enabled the ufw on your Server then allow the umami port and MYSQL port

  1. ufw allow 3000
  2. ufw allow mysql
  3. ufw reload

LICENSE

MIT