|
@@ -1,136 +1,123 @@
|
|
|
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
+ <!DOCTYPE html>
|
|
|
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
|
<head>
|
|
|
- <title>Running LibrePhotos in Docker on Debian 10</title>
|
|
|
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
|
|
- <script type="text/javascript">
|
|
|
- $(function(){
|
|
|
- $('textarea').each(function(i,e){
|
|
|
- theTextarea = $(this);
|
|
|
- theTextarea.height((theTextarea[0].scrollHeight-5) +'px');
|
|
|
- });
|
|
|
-
|
|
|
- $('li').each(function(i,e){
|
|
|
- if(!$(this).hasClass('noCheckbox')){
|
|
|
- var uuid = 'li_' + Math.floor(Math.random() * Math.floor(1000000)).toString() + '_' + i.toString();
|
|
|
- $(this).contents().wrap('<span id="'+ uuid +'"><label for="cb_'+ uuid +'"></label></span>');
|
|
|
- $(this).prepend('<input type="checkbox" class="completeBox" id="cb_' + uuid +'" rel="'+ uuid +'" />')
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- $('code,div.codeBlock,textarea.codeBlock').each(function(i,e){
|
|
|
- theElement = $(this);
|
|
|
- var lines = theElement.html().split("\n");
|
|
|
- theElement.empty();
|
|
|
- for(l=0;l<lines.length;l++){
|
|
|
- if($.trim(lines[l]) != '' && $.trim(lines[l]).substr(0,1) != '#' && $.trim(lines[l]).indexOf(' #') == -1 && lines[l].substr(0, 4).toUpperCase() != 'REM '){
|
|
|
- theElement.append('<input type="image" src="images/clipboard.png" value="" class="copy-text" rel="copy_'+ i +'_'+ l +'" data-clipboard-text="'+ $.trim(lines[l].replace(/"/g, '"')) +'" /><span id="copy_'+ i +'_'+ l +'">'+ lines[l] +'</span>');
|
|
|
- } else {
|
|
|
- theElement.append(lines[l]);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- $(document).on('click','input.copy-text',function(){
|
|
|
- theButton = $(this);
|
|
|
- $('input.copy-text').attr('src','images/clipboard.png');
|
|
|
- $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
|
|
|
- try {
|
|
|
- if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
|
|
|
- $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
|
|
|
- } else if($('#'+ theButton.attr('rel')).parent('div').hasClass('CMD')){
|
|
|
- $('#'+ theButton.attr('rel')).addClass('copy-animation-cmd');
|
|
|
- } else {
|
|
|
- $('#'+ theButton.attr('rel')).addClass('copy-animation');
|
|
|
- }
|
|
|
- navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
|
|
|
- theButton.attr('src','images/clipboard_active.png');
|
|
|
- } catch(err) {
|
|
|
- }
|
|
|
- return false;
|
|
|
- });
|
|
|
-
|
|
|
- $(document).on('click','input.completeBox',function(){
|
|
|
- theBox = $(this);
|
|
|
- $('#'+ theBox.attr('rel')).addClass('strikethrough');
|
|
|
- theBox.prop('disabled',true);
|
|
|
- theBox.parent('li').prevAll().each(function(i,e){
|
|
|
- theLI = $(this);
|
|
|
- if(theLI.find('input[type=checkbox]').not(':checked')){
|
|
|
- $('#'+ theLI.find('input[type=checkbox]').attr('rel')).addClass('strikethrough');
|
|
|
- theLI.find('input[type=checkbox]').prop('checked',true).prop('disabled',true);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- if(window.self !== window.top){
|
|
|
- window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
|
|
|
- }
|
|
|
- });
|
|
|
- </script>
|
|
|
+ <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>Running LibrePhotos in Docker on Debian 10</h1>
|
|
|
+ <h1>Roll Your Own Google Analytics Alternative with Umami on Windows</h1>
|
|
|
</div>
|
|
|
<div></div>
|
|
|
<div id="content">
|
|
|
- <h2>Install Docker</h2>
|
|
|
+ <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 Linux device</li>
|
|
|
- <li>Execute the following commands in a terminal:
|
|
|
- <div class="codeBlock"># update software repositories<br />
|
|
|
- sudo apt update<br />
|
|
|
- # install necessary packages for https apt calls<br />
|
|
|
- sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common<br />
|
|
|
- # add docker GPG key<br />
|
|
|
- curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -<br />
|
|
|
- # add docker software repository<br />
|
|
|
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"<br />
|
|
|
- # install docker<br />
|
|
|
- sudo apt update<br />
|
|
|
- sudo apt install docker-ce docker-ce-cli containerd.io<br />
|
|
|
- # create a docker group<br />
|
|
|
- sudo groupadd docker<br />
|
|
|
- # add the current user to the docker group<br />
|
|
|
- sudo usermod -aG docker $USER<br />
|
|
|
- # install docker-compose<br />
|
|
|
- sudo curl -L "https://github.com/docker/compose/releases/download/1.28.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose<br />
|
|
|
- # make docker-compose executable<br />
|
|
|
- sudo chmod +x /usr/local/bin/docker-compose</div>
|
|
|
+ <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>Running the LibrePhoto Docker Container</h2>
|
|
|
+<h2>Run Umami on System Startup (Optional, but recommended)</h2>
|
|
|
|
|
|
<ol>
|
|
|
- <li>After installing Docker, continue with the following commands in terminal:
|
|
|
- <div class="codeBlock"># download librephotos compose.yml and sample .env<br />
|
|
|
- wget https://raw.githubusercontent.com/LibrePhotos/librephotos/dev/docker-compose.yml<br />
|
|
|
- wget https://raw.githubusercontent.com/LibrePhotos/librephotos/dev/librephotos.env<br />
|
|
|
- # create a copy of the sample .env<br />
|
|
|
- cp librephotos.env .env<br />
|
|
|
- # edit the .env<br />
|
|
|
- nano .env</div>
|
|
|
+ <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>Scroll down the .env file and change the /home/username/ text to ~/</li>
|
|
|
- <li>Open a web browser and navigate to https://rb.gy/emgmwo to generate a new shhhhKey</li>
|
|
|
- <li>Set the correct timezone</li>
|
|
|
- <li>Press CTRL+O, Enter, CTRL+X to write the changes to .env</li>
|
|
|
- <li>Run the following command in terminal to start LibrePhoto
|
|
|
- <div class="codeBlock">sudo docker-compose up -d</div>
|
|
|
+ <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>Open a web browser and navigate to http://DNSorIP:3000</li>
|
|
|
- <li>Welcome to LibrePhoto</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>Source: https://github.com/LibrePhotos/librephotos</p>
|
|
|
- </div>
|
|
|
+<p>Documentation: <a href="https://github.com/umami-software/umami" target="_blank">https://github.com/umami-software/umami</a></p> </div>
|
|
|
</div>
|
|
|
</body>
|
|
|
</html>
|