{"id":12619,"date":"2023-04-25T06:00:13","date_gmt":"2023-04-25T10:00:13","guid":{"rendered":"https:\/\/blog.litespeedtech.com\/?p=12619"},"modified":"2023-04-25T06:00:13","modified_gmt":"2023-04-25T10:00:13","slug":"openlitespeed-metabase","status":"publish","type":"post","link":"https:\/\/lswp.store\/index.php\/2023\/04\/25\/openlitespeed-metabase\/","title":{"rendered":"OpenLiteSpeed + Metabase"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-12629\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase.png\" alt=\"OpenLiteSpeed and Metabase\" width=\"1000\" height=\"500\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase.png 1000w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-300x150.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-768x384.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-600x300.png 600w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p><a href=\"https:\/\/openlitespeed.org\/\">OpenLiteSpeed Web Server<\/a> is great for building and deploying web applications. The WebAdmin Console enables you to quickly configure features that allow you to deliver a fast web application that your users will love.<\/p>\n<p><a href=\"https:\/\/www.metabase.com\/\">Metabase<\/a> is a business intelligence web application that can be deployed on an OpenLiteSpeed Web Server. It is a java-based web app that can connect to almost any database and has a built-in question builder tool that allows you to get intelligent insights on your data.<\/p>\n<h2>OpenLiteSpeed and Metabase<\/h2>\n<p>In this guide, you will learn how to install and configure OpenLiteSpeed as a reverse proxy for Metabase. That means the web server will sit in front of Metabase and intercept requests made by clients. Upon completion of this guide you will have a business intelligence web based application powered by OpenLiteSpeed web server.<\/p>\n<p>Below are 7 steps covered in this tutorial:<\/p>\n<ol>\n<li>Installing OpenLiteSpeed with MariaDB<\/li>\n<li>Installing Java<\/li>\n<li>Creating a MariaDB database<\/li>\n<li>Downloading Metabase<\/li>\n<li>Creating a <code>systemd<\/code> configuration file for Metabase<\/li>\n<li>Configuring a Let\u2019s Encrypt SSL Certificate<\/li>\n<li>Completing the post-installation setup<\/li>\n<\/ol>\n<h2>Requirements<\/h2>\n<p>Here is what you will need to complete this setup:<\/p>\n<ol>\n<li>An SSH client such as Putty or the macOS terminal app.<\/li>\n<li>A server running a Debian-based operating system such as Ubuntu Server<\/li>\n<li>A fully qualified domain name pointing to the public IP address of your server.<\/li>\n<\/ol>\n<h2>Step 1: Install OpenLiteSpeed with MariaDB<\/h2>\n<p>The first step is to install OpenLiteSpeed. We will use the 1-click installation script, which is a single command that will install OpenLiteSpeed, set up the virtualhost, add the reverse proxy configuration and install MariaDB.<\/p>\n<p>On a newly deployed debian-based server, run the command below to install OpenLiteSpeed with a reverse proxy configuration:<\/p>\n<pre>bash &lt;( curl -k https:\/\/raw.githubusercontent.com\/litespeedtech\/ols1clk\/master\/ols1clk.sh) --proxy-c --pure-mariadb\n<\/pre>\n<p>This command will automatically create a reverse proxy configuration using the example virtualhost, and install MariaDB.<\/p>\n<p>Log in to the OpenLiteSpeed WebAdminConsole. Click\u00a0<b data-stringify-type=\"bold\">Server Configuration\u00a0<\/b>&gt;<b data-stringify-type=\"bold\">\u00a0External App.\u00a0<\/b><\/p>\n<p>Click <strong>Edit<\/strong> on the <code>Web Server<\/code> external app, update <strong>Address<\/strong> <code>*<\/code> to <code>http:\/\/127.0.0.1:3000<\/code>, and click <strong>Save<\/strong>.<\/p>\n<p>Restart OpenLiteSpeed for the changes to take effect.<\/p>\n<h2>Step 2: Install Java<\/h2>\n<p>The second step is to install the Java development kit (JDK), and the Java runtime environment (JRE). Run the command below to install:<\/p>\n<pre>sudo apt-get install openjdk-11-jdk openjdk-11-jre -y\n<\/pre>\n<h2>Step 3: Create a MariaDB database<\/h2>\n<p>The third step is to create a MariaDB database for Metabase.<\/p>\n<p>Run the commands below to connect to the MariaDB shell and create a new database:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-12621\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-1-1024x648.png\" alt=\"\" width=\"1024\" height=\"648\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-1-1024x648.png 1024w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-1-300x190.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-1-768x486.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-1-1320x835.png 1320w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-1-600x379.png 600w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-1.png 1537w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<pre>mysql -u root -p\nCREATE DATABASE metabasesysdb;\nGRANT ALL PRIVILEGES ON metabasesysdb.* TO 'metabase_db_usr'@'localhost' IDENTIFIED BY \"SecurePassword\";\nFLUSH PRIVILEGES;\nEXIT;\n<\/pre>\n<h2>Step 4: Download Metabase<\/h2>\n<p>You have successfully installed OpenLiteSpeed and added reverse proxy configuration. Follow the next few steps to start using Metabase with OpenLiteSpeed.<\/p>\n<p>Create a folder for Metabase in the <code>\/opt<\/code> directory, and download the latest version of Metabase from the official download page:<\/p>\n<pre>sudo mkdir \/opt\/metabase\ncd \/opt\/metabase\nwget https:\/\/downloads.metabase.com\/v0.45.2\/metabase.jar\n<\/pre>\n<p>Change the owner of the <code>\/opt\/metabase<\/code> directory and all files in this directory to <code>nobody<\/code> and <code>nogroup<\/code> by running this command:<\/p>\n<pre>chown -R nobody:nogroup \/opt\/metabase\n<\/pre>\n<p>Set the permissions of the <code>\/opt\/metabase<\/code> directory and all files in the directory:<\/p>\n<pre>chmod -R 755 \/opt\/metabase\n<\/pre>\n<h2>Step 5: Create a <code>systemd<\/code> configuration file.<\/h2>\n<p>To ensure Metabase is always running on your server, and to simplify stopping and starting the business intelligence web app, you can create a <code>systemd<\/code> configuration file. Run the commands below to create a service file in the <code>\/etc\/systemd\/system<\/code> directory:<\/p>\n<pre>sudo apt install nano\nsudo nano \/etc\/systemd\/system\/metabase.service\n<\/pre>\n<p>Edit the <code>metabase.service<\/code> file, and copy and paste the following configuration below into it:<\/p>\n<pre>[Unit]\nDescription=Metabase Business Intelligence Web App Powered By OpenLiteSpeed Web Server\n[Service]\nWorkingDirectory=\/opt\/metabase\/\nExecStart=\/usr\/bin\/java -jar \/opt\/metabase\/metabase.jar\nUser=nobody\nType=simple\nRestart=on-failure\nRestartSec=10\n[Install]\nWantedBy=multi-user.target\n<\/pre>\n<p>Save the file and exit out of it.<\/p>\n<p>Reload the system daemon, start the Metabase service, and set it to start automatically at system boot:<\/p>\n<pre>systemctl daemon-reload\nsystemctl start metabase\nsystemctl enable metabase\n<\/pre>\n<p>You also need to ensure the newly created metabase service is marked as active and running. Run the command<\/p>\n<pre>systemctl status metabase\n<\/pre>\n<p>If Metabase is active and running, the command will return the following output:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-12623\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-2-1024x480.png\" alt=\"\" width=\"1024\" height=\"480\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-2-1024x480.png 1024w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-2-300x141.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-2-768x360.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-2-1536x720.png 1536w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-2-1320x619.png 1320w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-2-600x281.png 600w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-2.png 1957w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<pre>metabase.service - Metabase Business Intelligence Web App Powered By OpenLiteSpeed Web Server\n      Loaded: loaded (\/etc\/systemd\/system\/metabase.service;\n      Active: active (running)\n<\/pre>\n<h2>Step 6: Configure a Let&#8217;s Encrypt SSL Certificate.<\/h2>\n<p>The next step is to configure a Let\u2019s Encrypt SSL Certificate. This ensures that you always access Metabase using a secure HTTPS connection. Follow the steps below:<\/p>\n<p>Install the certbot utility:<\/p>\n<pre>sudo apt-get install certbot -y\n<\/pre>\n<p>Generate the SSL certificate by following the instructions in the <a href=\"https:\/\/openlitespeed.org\/kb\/lets-encrypt-ssl-on-openlitespeed\/#Proxy_case\">OpenLiteSpeed KB<\/a>.<\/p>\n<h2>Step 7: Complete the post installation setup<\/h2>\n<p>Open a new browser window and enter the domain name for the metabase server in the browser address bar.<\/p>\n<p>You will see the Metabase welcome page. Click <strong>Let\u2019s get started<\/strong>.<\/p>\n<p>Choose your preferred language and click <strong>Next<\/strong><\/p>\n<p>Enter your personal details and ensure you set a secure password. Click <strong>Next<\/strong>, select <code>I\u2019ll add my data later<\/code> and click <strong>Next. <\/strong><\/p>\n<p>Click <strong>Finish<\/strong>, and click <strong>Take me to Metabase<\/strong>. This will open the dashboard where you can perform business intelligence tasks using the builtin features.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-12627\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-4-1024x433.png\" alt=\"\" width=\"1024\" height=\"433\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-4-1024x433.png 1024w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-4-300x127.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-4-768x324.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-4-1536x649.png 1536w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-4-2048x865.png 2048w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-4-1320x558.png 1320w, https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase-4-600x254.png 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>You can also configure the database that you created on Step 3. Click <strong>Add your own data<\/strong> to open the <strong>Add Database<\/strong> wizard.<\/p>\n<p>Select the type of database you would like to add on the <strong>Database type<\/strong> drop down, configure your database details, and click <strong>Save<\/strong><\/p>\n<h2>Conclusion<\/h2>\n<p>You have successfully installed the Metabase Business Intelligence web app on an OpenLiteSpeed Web Server. For more details about OpenLiteSpeed features that you can configure to further enhance web app performance please <a href=\"https:\/\/openlitespeed.org\/kb\/\">visit our knowledge base<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use OpenLiteSpeed and Metabase business intelligence software together, with OLS set up as a reverse proxy.<\/p>\n","protected":false},"author":1,"featured_media":12629,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[29],"tags":[185],"class_list":["post-12619","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-openlitespeed","tag-metabase"],"jetpack_featured_media_url":"https:\/\/lswp.store\/wp-content\/uploads\/2023\/04\/ols-metabase.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/12619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/comments?post=12619"}],"version-history":[{"count":0,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/12619\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media\/12629"}],"wp:attachment":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media?parent=12619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/categories?post=12619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/tags?post=12619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}