What is Umami?
Umami is a simple, fast, privacy-focused alternative to Google Analytics. -https://github.com/umami-software/umami
Installation
- Log into the Windows device
- Download the latest Umami release Download
- Download NodeJS Download
- Download the latest MySQL .msi installer Download
- Install Microsoft Visual C++
- Run the downloaded MySQL installer, accepting the defaults and selecting the Typical installation when prompted
- When the installation completes, make sure "Run MySQL Configurator" is checked > Click Finish
- Step through the installer accepting all the defaults
- Enter and confirm a root password when prompted
- Launch a Terminal or PowerShell window
- Run the following commands to login into MySQL
# change directory to mysql\bin
cd "C:\Program Files\MySQL\MySQL Server*\bin"
# connect to the database
.\mysql -u root -p - Authenticate with the root password set during the database configuration
- Run the following commands to create the database and database user
CREATE DATABASE umami DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER 'umami_rw'@'localhost' IDENTIFIED BY 'um@m1!';
GRANT ALL ON umami.* TO 'umami_rw'@localhost;
FLUSH PRIVILEGES;
EXIT;
exit - Back in File Explorer, navigate to the Downloads directory
- Install NodeJS, accepting all defaults
- Extract the downloaded Umami files
- Rename the extracted folder Umami
- Cut the Umami folder to a location it can safely run from, C:\apps\Umami in this example
- Hold the SHIFT key and right click in the white space > Open PowerShell windows here...
- Run the following commands in the PowerShell window
# create .env file
notepad .\.env - Paste the following into the .env file
DATABASE_URL=mysql://umami_rw:um@m1!@localhost:3306/umami
HASH_SALT=SomethingSecure - Save the changes to .env and close Notepad
- Continue with the following commands in the PowerShell window
# make sure .env didn't get a .txt extension
mv .\.env.txt .\.env
# install dependencies
npm install --force
# build umami
npm run build
# run umami
npm start - Open a web browser and navigate to http://DNSorIP:3000
- Login with the username admin and password umami
- Navigate to Settings > Profile and click the Change Password button
- Enter the current password (umami) and enter and confirm the new password > Click save
- Welcome to Umami
Run Umami on System Startup (Optional, but recommended)
- Press CTRL + C to kill the running Umami process in the open PowerShell window
- Open a text editor and paste the following
:: Start Umami server
cd /D "%~dp0"
start "Umami" /b npm start - Save the file as umami.bat in the Umami directory, C:\apps\umami in this example
- Click on the Start Button > Type task > Launch Task Scheduler
- Right click the Task Scheduler Library folder in the left pane > Create Basic Task...
- Set the name to Umami and optionally set a Description > Click Next
- For the Trigger, select When the computer starts > Click Next
- For the Action, select Start a program > Click Next
- Complete the form fields as follows:
Program/script: "C:\apps\Umami\umami.bat"
Add arguments:
Start in: - Click Next
- Check the Open the Properties dialog checkbox > Click Finish
- In the Properties dialog, click the Change User or Group... button
- Type System in the Object name field > Click OK
- Check the Run with highest privileges box
- Click OK to create the scheduled task
- Right click the Umami task > Run
- Refresh the open web browser to verify Umami is now running from the scheduled task
Documentation: https://github.com/umami-software/umami