Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mskian/umami-conf

Umami Self Hosted Analytics Cloud VPS ☁ Configuration 🔧
https://github.com/mskian/umami-conf

analytics analytics-tracking charts google-analytics statistics umami webanalytics

Last synced: 10 days ago
JSON representation

Umami Self Hosted Analytics Cloud VPS ☁ Configuration 🔧

Awesome Lists containing this project

README

        

# 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

```sh
cd /var/www/
git clone https://github.com/mikecao/umami.git
cd umami
npm install
```

- Create database tables

```sh
cd /var/www/umami
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`

```sh
touch .env
nano .env
```

```sh
DB_USER=username
DB_PASSWORD=password
DB_HOST=localhost
DB_PORT=3306
DB_NAME=databasename
DATABASE_URL=mysql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}

HASH_SALT=somerandomstring
```

> Generate Hash Salt from -

- Build the Package

```sh
npm run build
```

- Start the server

```sh
npm start
```

- Bash script for start the app via systemd service -
- create systemd service for Run the App forever -
- Nginx + Reverse Proxy + SSL Setup

## Firewall

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

```sh
ufw allow 3000
ufw allow mysql
ufw reload
```

## LICENSE

MIT