123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Roll Your Own Google Analytics Alternative with Umami on Windows</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta charset="UTF-8">
- <meta name="keywords" content="Browser Based,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Alternative To Google Analytics,Analytics,FOSS,Google Analytics,Google Analytics Alternative,MariaDB,MySQL,NodeJS,Open Source,Self-hosted Web Analytics,Umami,Umami Analytics,Web Analytics,Web Traffic,Windows,Microsoft Windows,How To,Tutorial,i12bretro">
- <meta name="author" content="i12bretro">
- <meta name="description" content="Roll Your Own Google Analytics Alternative with Umami on Windows">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="revised" content="07/20/2024 04:55:22 AM" />
- <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="includes/js/steps.js"></script>
- <link href="css/steps.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="gridContainer">
- <div class="topMargin"></div>
- <div id="listName" class="topMargin">
- <h1>Roll Your Own Google Analytics Alternative with Umami on Windows</h1>
- </div>
- <div></div>
- <div id="content">
- <h2>What is Umami?</h2>
- <blockquote><em>Umami is a simple, fast, privacy-focused alternative to Google Analytics. -<a href="https://github.com/umami-software/umami" target="_blank">https://github.com/umami-software/umami</a></em></blockquote>
- <h2>Installation</h2>
- <ol>
- <li>Log into the Windows device</li>
- <li>Download the latest Umami release <a href="https://github.com/umami-software/umami/releases/latest" target="_blank">Download</a></li>
- <li>Download NodeJS <a href="https://nodejs.org/en/download/prebuilt-installer/current" target="_blank">Download</a></li>
- <li>Download the latest MySQL .msi installer <a href="https://dev.mysql.com/downloads/mysql/" target="_blank">Download</a></li>
- <li><label for="cb_li_917989_0">Download Microsoft Visual C++ </label><label for="cb_li_917989_0"><a href="https://aka.ms/vs/16/release/vc_redist.x64.exe" target="_blank">Download</a></label></li>
- <li>Install Microsoft Visual C++</li>
- <li>Run the downloaded MySQL installer, accepting the defaults and selecting the Typical installation when prompted</li>
- <li>When the installation completes, make sure "Run MySQL Configurator" is checked > Click Finish</li>
- <li>Step through the installer accepting all the defaults</li>
- <li>Enter and confirm a root password when prompted</li>
- <li>Launch a Terminal or PowerShell window</li>
- <li>Run the following commands to login into MySQL
- <div class="codeBlock PS"># change directory to mysql\bin<br />
- cd "C:\Program Files\MySQL\MySQL Server*\bin"<br />
- # connect to the database<br />
- .\mysql -u root -p</div>
- </li>
- <li>Authenticate with the root password set during the database configuration</li>
- <li>Run the following commands to create the database and database user
- <div class="codeBlock PS">CREATE DATABASE umami DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;<br />
- CREATE USER 'umami_rw'@'localhost' IDENTIFIED BY 'um@m1!';<br />
- GRANT ALL ON umami.* TO 'umami_rw'@localhost;<br />
- FLUSH PRIVILEGES;<br />
- EXIT;<br />
- exit</div>
- </li>
- <li>Back in File Explorer, navigate to the Downloads directory</li>
- <li>Install NodeJS, accepting all defaults</li>
- <li>Extract the downloaded Umami files</li>
- <li>Rename the extracted folder Umami</li>
- <li>Cut the Umami folder to a location it can safely run from, C:\apps\Umami in this example</li>
- <li>Hold the SHIFT key and right click in the white space > Open PowerShell windows here...</li>
- <li>Run the following commands in the PowerShell window
- <div class="codeBlock PS"># create .env file<br />
- notepad .\.env</div>
- </li>
- <li>Paste the following into the .env file
- <p>DATABASE_URL=mysql://umami_rw:um@m1!@localhost:3306/umami<br />
- HASH_SALT=SomethingSecure</p>
- </li>
- <li>Save the changes to .env and close Notepad</li>
- <li>Continue with the following commands in the PowerShell window
- <div class="codeBlock PS"># make sure .env didn't get a .txt extension<br />
- mv .\.env.txt .\.env<br />
- # install dependencies<br />
- npm install --force<br />
- # build umami<br />
- npm run build<br />
- # run umami<br />
- npm start</div>
- </li>
- <li>Open a web browser and navigate to http://DNSorIP:3000</li>
- <li>Login with the username admin and password umami</li>
- <li>Navigate to Settings > Profile and click the Change Password button</li>
- <li>Enter the current password (umami) and enter and confirm the new password > Click save</li>
- <li>Welcome to Umami</li>
- </ol>
- <h2>Run Umami on System Startup (Optional, but recommended)</h2>
- <ol>
- <li>Press CTRL + C to kill the running Umami process in the open PowerShell window</li>
- <li>Open a text editor and paste the following
- <p>:: Start Umami server<br />
- cd /D "%~dp0"<br />
- start "Umami" /b npm start</p>
- </li>
- <li>Save the file as umami.bat in the Umami directory, C:\apps\umami in this example</li>
- <li>Click on the Start Button > Type task > Launch Task Scheduler</li>
- <li>Right click the Task Scheduler Library folder in the left pane > Create Basic Task...</li>
- <li>Set the name to Umami and optionally set a Description > Click Next</li>
- <li>For the Trigger, select When the computer starts > Click Next</li>
- <li>For the Action, select Start a program > Click Next</li>
- <li>Complete the form fields as follows:
- <p>Program/script: "C:\apps\Umami\umami.bat"<br />
- Add arguments:<br />
- Start in:</p>
- </li>
- <li>Click Next</li>
- <li>Check the Open the Properties dialog checkbox > Click Finish</li>
- <li>In the Properties dialog, click the Change User or Group... button</li>
- <li>Type System in the Object name field > Click OK</li>
- <li>Check the Run with highest privileges box</li>
- <li>Click OK to create the scheduled task</li>
- <li>Right click the Umami task > Run</li>
- <li>Refresh the open web browser to verify Umami is now running from the scheduled task</li>
- </ol>
- <p>Documentation: <a href="https://github.com/umami-software/umami" target="_blank">https://github.com/umami-software/umami</a></p> </div>
- </div>
- </body>
- </html>
-
|