<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Server Archives - jiaa.io Blog</title>
	<atom:link href="https://blog.jiaa.io/category/server/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.jiaa.io/category/server/</link>
	<description>Digital madness and beyond</description>
	<lastBuildDate>Wed, 07 May 2025 13:00:43 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.jiaa.io/wp-content/uploads/2017/01/cropped-favicon-2-150x150.png</url>
	<title>Server Archives - jiaa.io Blog</title>
	<link>https://blog.jiaa.io/category/server/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Performance gains from offloading WordPress Media to S3 / DigitalOcean Spaces</title>
		<link>https://blog.jiaa.io/2021/03/02/performance-gains-from-offloading-wordpress-media-to-s3-digitalocean-spaces/</link>
		
		<dc:creator><![CDATA[michael_goldbeck]]></dc:creator>
		<pubDate>Tue, 02 Mar 2021 05:41:39 +0000</pubDate>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://blog.jiaa.io/?p=3047</guid>

					<description><![CDATA[<p>WordPress and performance. If one follows the ongoing battle between aficionados and adversaries of the most used content management system on the Web, the extremes could not be more pronounced. One side argues that the ecosystem surrounding WordPress justifies some trade-offs when it comes to performance &#8211; while the other argues that legacy code sustaining [&#8230;]</p>
<p>The post <a href="https://blog.jiaa.io/2021/03/02/performance-gains-from-offloading-wordpress-media-to-s3-digitalocean-spaces/">Performance gains from offloading WordPress Media to S3 / DigitalOcean Spaces</a> appeared first on <a href="https://blog.jiaa.io">jiaa.io Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-drop-cap">WordPress and performance. If one follows the ongoing battle between aficionados and adversaries of the most used content management system on the Web, the extremes could not be more pronounced. One side argues that the ecosystem surrounding WordPress justifies some trade-offs when it comes to performance &#8211; while the other argues that legacy code sustaining the CMS is dragging down the Web as a whole. However valid both of these arguments seem to be, I think that doing your homework can make your WordPress installation fly &#8211; to a surprising degree. So let&#8217;s roll and see what we can do <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<span id="more-3047"></span>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" src="https://media.giphy.com/media/lcySndwSDLxC4eOU86/giphy.gif" alt="" width="351" height="215"/></figure></div>



<p>One of the simplest ways to ensure WordPress speed grandeur is to focus on the things that can clog down your web server: media files. Every page has loads of them. Images, videos and too many stupid GIFs. I know, I know &#8211; who am I to talk. But let&#8217;s face it: text is not the most satisfying content out there any more. But what to do if you already have exhausted all the common strategies of improving performance &#8211; such as using proper caching or optimising all images? </p>



<h2 class="wp-block-heading">Offloading media to the rescue!</h2>



<p>Offloading media means to save your images not only in the &#8222;<em>/wp-content/uploads</em>/&#8220; folder &#8211; a.k.a. your web server &#8211; but also on a specialised service providing you with cheap storage and fast delivery &#8211; a Content Delivery Network or CDN for short. </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>But why &#8211; in the name of Tim Berners-Lee &#8211; would I waste any more of my hard-earned golden nuggets on hosting?</p><cite>Anyone hosting websites on the cheap</cite></blockquote>



<p><strong><em>Good that you ask.</em></strong> Because first and foremost your users will thank you for improved speed and better user experience &#8211; and <a href="https://yoast.com/does-site-speed-influence-seo/" target="_blank" rel="noreferrer noopener nofollow">Google will rank you better</a>. If that alone does not tickle your buttons, then listen to this: </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Spending money on offloading media and a proper CDN setup will actually save you some bucks as you scale up.</p><cite>Lonely Austrian Nerd</cite></blockquote>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://media.giphy.com/media/gTURHJs4e2Ies/source.gif" alt=""/></figure></div>



<p><strong><em>Spending money to save money?</em></strong> No, I am not entirely crazy. Let me explain.</p>



<p>Let&#8217;s say you host the Website of a medium sized company aiming for signups to a service &#8211; and assume that you regularly send out newsletters which lead to spikes in visitors. These spikes turn your website sluggish &#8211; the reason why your conversions are <em><strong>down 25%</strong></em> in comparison to any normal day. That sucks, mate.</p>



<h2 class="wp-block-heading">So how do we fix this? </h2>



<p>Well, doubling server resources would most certainly take care of things. But it seems crazy to basically double server costs just to handle one spike every couple of months. Going static rocks hard when it comes to performance &#8211; but would also require a full rewrite of the Website.</p>



<p><strong>I say let&#8217;s get rid of media.</strong> But not by getting rid of the images itself but rather offloading them to a CDN. For this Proof-of-Concept I ran a WordPress Multisite installation on a basic tier droplet of <a href="https://www.digitalocean.com/products/droplets/" target="_blank" rel="noreferrer noopener nofollow">DigitalOcean</a> ($5/month) using a managed database (MySQL, $15/month) &#8211; using <a href="https://www.flood.io/" target="_blank" rel="noreferrer noopener nofollow">flood.io</a> to load test three pages with multiple images and 100 concurrent users &#8211; resulting in thousands of requests per minute. </p>



<h2 class="wp-block-heading">Initial run without offloading media</h2>



<p>I hear you say &#8222;<em>are you barking mad? 100 concurrent users on a tiny droplet like that?</em>&#8222;. Well &#8211; if caching is used (in this test I use the <a href="https://wordpress.org/plugins/w3-total-cache/" target="_blank" rel="noreferrer noopener nofollow">W3 Total Cache plugin</a>), this fares relatively well:</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="1024" height="337" src="https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-performance-without-CDN-offloading-1024x337.jpg" alt="" class="wp-image-3083" srcset="https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-performance-without-CDN-offloading-1024x337.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-performance-without-CDN-offloading-300x99.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-performance-without-CDN-offloading-768x253.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-performance-without-CDN-offloading-800x263.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-performance-without-CDN-offloading.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Performance of WordPress on a small server without CDN</figcaption></figure></div>



<p><strong><em>So, what do we have here?</em></strong> As you can see by the lack of red, the rate of failed requests was actually 0 &#8211; so no failed requests at all. That&#8217;s good. However, what becomes painfully obvious is the influence of concurrency on response time &#8211; after the ramp up period the perfectly acceptable 250ms jump up to a &#8222;<em>I-will-bounce-from-this-site</em>&#8220; 8500ms; a bloody disgrace to any professional Website. All in all, this should not come as a surprise &#8211; using a $5/month server to be bombarded with almost 2,500,000 requests a day (approx. 1,760 requests per minute) seems to go a bit overboard <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://media.giphy.com/media/B86lxbrMSZ0SQ/source.gif" alt=""/></figure></div>



<h2 class="wp-block-heading">Performance of WordPress with media offloading to a CDN</h2>



<p class="has-drop-cap"><strong>New the moment of truth: </strong>how does WordPress fare when offloading all media to a CDN? Well, great. But before diving into the data let me explain what exactly I offloaded &#8211; so that you can judge the possible impact offloading media to a CDN can have for your WordPress installation. </p>



<p>First of all, I used DigitalOcean&#8217;s &#8222;<a href="https://www.digitalocean.com/products/spaces/" target="_blank" rel="noreferrer noopener nofollow">Spaces Object Storage</a>&#8220; with a custom subdomain to offload media from my server. The process of uploading all media automatically to this object storage is done &#8211; quite unusually &#8211; not by plugin, but by using a combination of <a href="https://axkibe.github.io/lsyncd/" target="_blank" rel="noreferrer noopener nofollow">Lsyncd</a> and <a href="https://s3tools.org/s3cmd" target="_blank" rel="noreferrer noopener nofollow">s3cmd</a>. But let&#8217;s not get distracted by the more exciting parts of this PoC and get back to the boring data <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> &#8211; a post will follow on how to build a similar setup.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="1024" height="446" src="https://blog.jiaa.io/wp-content/uploads/2021/03/performance-comparison-wordpress-media-offloading-1024x446.jpg" alt="" class="wp-image-3099" srcset="https://blog.jiaa.io/wp-content/uploads/2021/03/performance-comparison-wordpress-media-offloading-1024x446.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2021/03/performance-comparison-wordpress-media-offloading-300x131.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2021/03/performance-comparison-wordpress-media-offloading-768x335.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2021/03/performance-comparison-wordpress-media-offloading-800x349.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2021/03/performance-comparison-wordpress-media-offloading.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Performance of WordPress on a small server with CDN</figcaption></figure></div>



<p>Same testing period, same ramp-up period &#8211; and most important of all, same amount of concurrent users. As you can see in the comparison above, the results are quite striking. Not only was the test able to run at a substantially higher transaction rate of 2,250 requests per minute &#8211; an increase of well over 25% &#8211; but also the response times decreased mindbogglingly: from a catastrophic 4.7 seconds to an average of 166ms. I cannot stress this improvement enough: <strong>while serving approximately 3,240,000 requests a day the response time decreased to an average of 3,5% of the initial reaction time &#8211; all at the negligible cost increase of $5/month.</strong></p>



<h2 class="wp-block-heading">How far can we push this?</h2>



<p class="has-drop-cap">So, now we have seen a direct comparison of WordPress running on a small server without and with CDN. We saw that offloading media to a CDN yields substantial benefits to anyone trying to squeeze out every inch of performance from good ol&#8216; WordPress. </p>



<p>Well &#8211; to be perfectly honest, this has nothing to do with WordPress itself. The reason why this works so well is simple: by offloading media to a managed service hosted somewhere else, there is no need for our server to flex its muscles. As the images are not loaded from the same host as WordPress, the web server (Apache in this case) does not have to work as hard due to fewer requests made (about half actually &#8211; but this greatly depends on your site/workload). Consequentially, with less requests the CPU does not need to work as hard, the memory does not fill up as quickly and the drives hum along softly as there are very few files to serve.</p>



<p class="has-text-align-center"><strong><em>This is all great. But when are we finally going to break things? </em></strong><br><strong><em>Patience, young coder.</em></strong></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://media.giphy.com/media/H8F81L6AsOaNCYCVv7/source.gif" alt=""/></figure></div>



<p>Alright &#8211; how far can we push this? Let&#8217;s give this another run &#8211; and triple the number of concurrent users to 300.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="288" src="https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-cdn-performance-comparison-max-load-1024x288.jpg" alt="" class="wp-image-3120" srcset="https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-cdn-performance-comparison-max-load-1024x288.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-cdn-performance-comparison-max-load-300x84.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-cdn-performance-comparison-max-load-768x216.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-cdn-performance-comparison-max-load-800x225.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2021/03/wordpress-cdn-performance-comparison-max-load.jpg 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption>Pushing a $5/month server with 300 concurrent users</figcaption></figure></div>



<p>While it still amazes me that this setup can handle over 6.2 million requests per day without returning a single error, one thing becomes clear: with an average response time of almost 10 seconds we won&#8217;t be winning any medals from our customers. Nevertheless, this PoC strengthens my view that scaling WordPress is not only a matter of pushing more money to a better hosting provider but substantially depends on your ability to optimise. </p>



<h2 class="wp-block-heading">Summa summarum</h2>



<p>In this post we used Object Storage to offload our WordPress media. This enabled us to more than double the amount of concurrent users our server can handle &#8211; and still leaves some room for further optimisation, such as offloading CSS and JavaScript files, offloading minified files generated by T3 Total Cache, switching from Apache to nginx, &#8230; </p>



<p>Your Website experiences spikes and you want to save a buck while still being able to handle more users? Go ahead and use a CDN &#8211; your visitors will thank you with higher sign-up rates.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" src="https://media.giphy.com/media/a0h7sAqON67nO/source.gif" alt=""/></figure></div>



<p class="has-text-align-center"><strong>How do you optimise your WordPress installations? </strong></p>
<p>The post <a href="https://blog.jiaa.io/2021/03/02/performance-gains-from-offloading-wordpress-media-to-s3-digitalocean-spaces/">Performance gains from offloading WordPress Media to S3 / DigitalOcean Spaces</a> appeared first on <a href="https://blog.jiaa.io">jiaa.io Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Upgrading Ubuntu 16.04 LTS to Ubuntu 18.04 LTS on DigitalOcean</title>
		<link>https://blog.jiaa.io/2019/10/06/upgrading-ubuntu-16-04-lts-to-ubuntu-18-04-lts-on-digitalocean/</link>
		
		<dc:creator><![CDATA[michael_goldbeck]]></dc:creator>
		<pubDate>Sun, 06 Oct 2019 14:24:27 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Websites]]></category>
		<guid isPermaLink="false">https://blog.jiaa.io/?p=2787</guid>

					<description><![CDATA[<p>With Ubuntu 18.04 LTS (BionicBeaver) having been released on the 8th of August 2019, everyone using its predecessor Ubuntu 16.04 LTS (XenialXerus) stands before the annoying decision of when to upgrade. With a proven track record of upgrading screw ups (allegedly ?), this is not a decision made lightly &#8211; especially, when End of Support [&#8230;]</p>
<p>The post <a href="https://blog.jiaa.io/2019/10/06/upgrading-ubuntu-16-04-lts-to-ubuntu-18-04-lts-on-digitalocean/">Upgrading Ubuntu 16.04 LTS to Ubuntu 18.04 LTS on DigitalOcean</a> appeared first on <a href="https://blog.jiaa.io">jiaa.io Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-drop-cap">With Ubuntu 18.04 LTS (<a rel="noreferrer noopener" aria-label="BionicBeaver (opens in a new tab)" data-bcup-haslogintext="no" href="https://wiki.ubuntu.com/BionicBeaver" target="_blank">BionicBeaver</a>) having been released on the 8th of August 2019, everyone using its predecessor Ubuntu 16.04 LTS (<a rel="noreferrer noopener" aria-label="XenialXerus (opens in a new tab)" data-bcup-haslogintext="no" href="https://wiki.ubuntu.com/XenialXerus" target="_blank">XenialXerus</a>) stands before the annoying decision of when to upgrade. With a proven track record of upgrading screw ups (allegedly ?), this is not a decision made lightly &#8211; especially, when End of Support (April 2021) as well as End of Life (April 2024) seem to be still quite far off.</p>



<span id="more-2787"></span>



<p>However, as peace of mind prevails, I tend to upgrade once the main upgrading related issues have been sorted out &#8211; or at least have been discussed in the community forums. For me the sweet spot to jump on a new release is around 2-3 months after its roll out. If you have to support something mission critical, this might take a bit longer.</p>



<p>Be that as it may, let&#8217;s get Ubuntu 16.04 upgraded to Ubuntu 18.04 on DigitalOcean ?.</p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://media.giphy.com/media/MGaacoiAlAti0/source.gif" alt="" /></figure></div>



<h2 class="wp-block-heading">Step 1: Snapshots, Snapshots, Snapshots</h2>



<p>It seems redundant to write this &#8211; but it&#8217;s unfortunately still common practice to just wing it when upgrading a system. But it should go without saying that losing all of your data is a bit more than potentially problematic. As I run all of my infrastructure on virtual servers (Droplets) provided by <a rel="noreferrer noopener" aria-label="DigitalOcean (opens in a new tab)" data-bcup-haslogintext="no" href="https://www.digitalocean.com/" target="_blank">DigitalOcean</a>, it&#8217;s very easy to not only back-up all of my data, but to make a functional snapshot of the full machine.</p>



<p>If you want to take a snapshot of your droplet, you simply go to the droplet in question, select &#8222;Snapshots&#8220; in the sidebar menu and click the &#8222;Take live snapshot&#8220; button &#8211; and wait for it to finish. </p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="662" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2019/10/1-do-snapshot-1024x662.png" alt="" class="wp-image-2794" srcset="https://blog.jiaa.io/wp-content/uploads/2019/10/1-do-snapshot-1024x662.png 1024w, https://blog.jiaa.io/wp-content/uploads/2019/10/1-do-snapshot-300x194.png 300w, https://blog.jiaa.io/wp-content/uploads/2019/10/1-do-snapshot-768x496.png 768w, https://blog.jiaa.io/wp-content/uploads/2019/10/1-do-snapshot-800x517.png 800w, https://blog.jiaa.io/wp-content/uploads/2019/10/1-do-snapshot.png 1380w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>It&#8217;s good practice to shutdown the droplet before doing so as well as ensuring that the snapshot actually works, so you don&#8217;t have any surprises if something does go wrong&#8230;</p>



<h2 class="wp-block-heading">Step 2: Installing updates</h2>



<p>Let&#8217;s start with the fun part: installing stuff. Hop onto your machine with the nice SSH access of yours. </p>



<pre class="wp-block-code"><code>$ ssh user@1.2.3.4</code></pre>



<p>I hope for you, that you have a nice <a rel="noreferrer noopener" aria-label="SSH key (opens in a new tab)" data-bcup-haslogintext="no" href="https://www.cyberciti.biz/faq/ubuntu-18-04-setup-ssh-public-key-authentication/" target="_blank">SSH key</a> already installed so you don&#8217;t waste precious time thinking about your password. </p>



<p><strong>Update already:</strong></p>



<pre class="wp-block-code"><code>$ sudo apt update
$ sudo apt upgrade
$ sudo apt full-upgrade</code></pre>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://media.giphy.com/media/YlZCtRuanxPV4h0RBU/giphy.gif" alt="" /></figure></div>



<p>I know, I know &#8211; the last one might be redundant. Sue me ?</p>



<h2 class="wp-block-heading">Step 3: Upgrading to that hot new version</h2>



<p>And here we are, finally ready to upgrade to Ubuntu 18.04. </p>



<pre class="wp-block-code"><code>$ sudo do-release-upgrade</code></pre>



<p>You will be asked some questions before the upgrading process starts. Just hop along with <em>&#8218;y&#8216;</em> and everything will be fine (hopefully^^). A healthy dose of reading the output and thinking about what it means will do the trick. Just be aware that this might take a while. You&#8217;ll also be prompted with a SSH config step &#8211; as I have modified my <em>sshd_config</em> I will stick to my current one.</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="1014" height="346" src="https://blog.jiaa.io/wp-content/uploads/2019/10/ssh-config.png" alt="" class="wp-image-2802" srcset="https://blog.jiaa.io/wp-content/uploads/2019/10/ssh-config.png 1014w, https://blog.jiaa.io/wp-content/uploads/2019/10/ssh-config-300x102.png 300w, https://blog.jiaa.io/wp-content/uploads/2019/10/ssh-config-768x262.png 768w, https://blog.jiaa.io/wp-content/uploads/2019/10/ssh-config-800x273.png 800w" sizes="auto, (max-width: 1014px) 100vw, 1014px" /></figure></div>



<p>After some time your happy little machine should be telling you that the upgrade is complete &#8211; otherwise you will have encountered some error. As this requires a restart, continue with <em>&#8218;y&#8216;</em>.</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="400" height="157" src="https://blog.jiaa.io/wp-content/uploads/2019/10/upgrade-complete.png" alt="" class="wp-image-2805" srcset="https://blog.jiaa.io/wp-content/uploads/2019/10/upgrade-complete.png 400w, https://blog.jiaa.io/wp-content/uploads/2019/10/upgrade-complete-300x118.png 300w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure></div>



<p>After accepting this, you will be disconnected. Give your machine a couple of seconds to reboot and reconnect.</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="573" height="441" src="https://blog.jiaa.io/wp-content/uploads/2019/10/ubuntu-1804-login-screen.png" alt="" class="wp-image-2806" srcset="https://blog.jiaa.io/wp-content/uploads/2019/10/ubuntu-1804-login-screen.png 573w, https://blog.jiaa.io/wp-content/uploads/2019/10/ubuntu-1804-login-screen-300x231.png 300w" sizes="auto, (max-width: 573px) 100vw, 573px" /></figure></div>



<p>And there we go &#8211; 18.04 LTS (XenialXerus) runs smoothly, including all services that were hosted on the machine before upgrading. For peace of heart, it&#8217;s not unreasonable to check ones firewall, so that just the needed ports are open to the public.</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="428" height="217" src="https://blog.jiaa.io/wp-content/uploads/2019/10/ufw-status.png" alt="" class="wp-image-2807" srcset="https://blog.jiaa.io/wp-content/uploads/2019/10/ufw-status.png 428w, https://blog.jiaa.io/wp-content/uploads/2019/10/ufw-status-300x152.png 300w" sizes="auto, (max-width: 428px) 100vw, 428px" /></figure></div>



<p>And that&#8217;s that ????</p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://media.giphy.com/media/huPOaNv3v2krwpD4Zh/giphy.gif" alt="" /></figure></div>
<p>The post <a href="https://blog.jiaa.io/2019/10/06/upgrading-ubuntu-16-04-lts-to-ubuntu-18-04-lts-on-digitalocean/">Upgrading Ubuntu 16.04 LTS to Ubuntu 18.04 LTS on DigitalOcean</a> appeared first on <a href="https://blog.jiaa.io">jiaa.io Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How To Install Piwik on an Ubuntu 16.04 Cloud Server (DigitalOcean)</title>
		<link>https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/</link>
					<comments>https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/#comments</comments>
		
		<dc:creator><![CDATA[michael_goldbeck]]></dc:creator>
		<pubDate>Sun, 05 Feb 2017 15:40:52 +0000</pubDate>
				<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server]]></category>
		<guid isPermaLink="false">https://blog.jiaa.io/?p=172</guid>

					<description><![CDATA[<p>Even-though I&#8217;ve been a Web-Designer and Web-Developer for a couple of years, starting out new projects has always been challenging. Which technology stack should I use, which requirements should I tackle first and how the heck should I finish this interface? This. Happens. Every. Single. Time.  So I started learning from data. As misleading data driven design [&#8230;]</p>
<p>The post <a href="https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/">How To Install Piwik on an Ubuntu 16.04 Cloud Server (DigitalOcean)</a> appeared first on <a href="https://blog.jiaa.io">jiaa.io Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Even-though I&#8217;ve been a Web-Designer and Web-Developer for a couple of years, starting out new projects has always been challenging. Which technology stack should I use, which requirements should I tackle first and how the heck should I finish this interface?</p>
<p><strong>This. Happens. Every. Single. Time. </strong></p>
<p>So I started learning from data. As <a href="https://www.fastcodesign.com/1662273/google-equates-design-with-endless-testing-theyre-wrong" target="_blank" rel="noopener">misleading</a> data driven design can be, it gives one a heck of a fast start. That&#8217;s why I analyse my personal pages as well &#8211; I want to make them better by improving gradually. <em>But which tool should I use?  </em>On first sight services such as Google Analytics seem like a great deal: easy to implement, easy to use as well as extensive &#8211; and above all &#8222;<a href="https://moz.com/ugc/is-google-analytics-hurting-your-business" target="_blank" rel="noopener"><em>free</em></a>&#8222;. But it does come at a heavy price &#8211; your users privacy.</p>
<p><span id="more-172"></span></p>
<p><strong>Open source to the rescue! </strong></p>
<p><a href="https://piwik.org/" target="_blank" rel="noopener">Piwik</a> is an open source analytics platform you can host yourself. You have full ownership &amp; control over the collected data; so no snooping around from corporations at least. For this <strong>tutorial</strong> I chose <a href="https://m.do.co/c/f092253c77b4" target="_blank" rel="noopener">DigitalOcean</a> as the host &#8211; a <a href="http://searchcloudcomputing.techtarget.com/definition/cloud-infrastructure" target="_blank" rel="noopener">cloud infrastructure</a> provider where I have most of my <a href="https://en.wikipedia.org/wiki/Virtual_machine" target="_blank" rel="noopener">virtual machines</a>.</p>
<p><strong>Step 1:</strong> Starting a droplet</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-182 aligncenter" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2017/02/digitalocean-choose-droplet-672x1024.jpg" alt="" width="672" height="1024" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-672x1024.jpg 672w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-197x300.jpg 197w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-768x1170.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-1009x1536.jpg 1009w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-1345x2048.jpg 1345w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet-800x1218.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-choose-droplet.jpg 1400w" sizes="auto, (max-width: 672px) 100vw, 672px" /></p>
<p>Choosing the right droplet for this project almost couldn&#8217;t be simpler: the host operating system of this machine is going to be <a href="http://releases.ubuntu.com/16.04/" target="_blank" rel="noopener">Ubuntu 16.04</a>, with the smallest size available. 512mb of <a href="https://en.wikipedia.org/wiki/Random-access_memory" target="_blank" rel="noopener">RAM</a> might not be enough for a lot of sites, but as this is only a test it&#8217;s plenty. I also like to have things around Europe &#8211; so I chose <a href="https://en.wikipedia.org/wiki/Frankfurt" target="_blank" rel="noopener">Frankfurt</a>, Germany as the datacenter region. Don&#8217;t overlook that &#8222;<em>One-click apps</em>&#8220; tab on top &#8211; there&#8217;s a lot of open source awesomeness in there! In order to save us some server setup hassle, I went for the &#8222;<em>LAMP 16.04</em>&#8220; image provided by <a href="https://m.do.co/c/f092253c77b4" target="_blank" rel="noopener">DigitalOcean</a>. It comes with a properly set up firewall and some security best-practices per default &#8211; <em>kudos to that DigitalOcean</em>! Hitting the &#8222;<em>create</em>&#8220; button will do everything we need.</p>
<p>&nbsp;</p>
<p><strong>Step 2:</strong> Server Setup</p>
<p>So the droplet is up and running &#8211; let&#8217;s give it a purpose. First you&#8217;ll want to log into the machine. Being a <a href="https://en.wikipedia.org/wiki/Terminal_(macOS)" target="_blank" rel="noopener">terminal</a> kind of guy I&#8217;ll do just that &#8211; but you can use <a href="http://www.putty.org/" target="_blank" rel="noopener">PuTTY</a> or anything else as well if you want to.</p>
<p><code>ssh root@YOUR_IP_ADDRESS</code></p>
<p>If you have set up your droplet without a SSH key, then you have an email with the login credentials in your inbox. <strong>But be aware:</strong> using SSH keys to login on servers is way more convenient and secure. DigitalOcean has a nice <a href="https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets" target="_blank" rel="noopener">tutorial</a> to do that. After login you&#8217;ll be greeted with a lot of info:</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-190 aligncenter" src="https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login.jpg" alt="" width="995" height="729" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login.jpg 995w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login-300x220.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login-768x563.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/digitalocean-first-login-800x586.jpg 800w" sizes="auto, (max-width: 995px) 100vw, 995px" /></p>
<p>The first thing to do is to update the system:</p>
<p><code>apt update</code></p>
<p>and</p>
<p><code>apt upgrade</code></p>
<p>will do the trick. But only keeping the system up to date will not help you being reasonably secure &#8211; follow <a href="https://www.digitalocean.com/community/tutorials/7-security-measures-to-protect-your-servers" target="_blank" rel="noopener">this tutorial</a> to secure your droplet right from the beginning. <em>Especially changing to a non-root user is a smart move</em>.</p>
<p><strong><em>You&#8217;re doing great so far</em> <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></strong></p>
<p>&nbsp;</p>
<p><strong>Step 3: </strong>Setting up <a href="https://letsencrypt.org/" target="_blank" rel="noopener">Let&#8217;s Encrypt</a> certificates</p>
<p>I did a lot of complaining in <a href="https://blog.jiaa.io/2017/01/28/shopping-e-commerce-auf-osterreichisch/" target="_blank" rel="noopener">my last post</a>, that <a href="https://www.shoepping.at/" target="_blank" rel="noopener">shöpping.at</a> &#8211; the new online market for Austrian goods &#8211; hasn&#8217;t set up <a href="https://en.wikipedia.org/wiki/Transport_Layer_Security" target="_blank" rel="noopener">SSL</a> certificates properly (they have <em>now</em>). So <a href="https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04" target="_blank" rel="noopener">here&#8217;s a quick one how to do so</a>. Because Digital Ocean droplets with LAMP come with everything needed pre-installed, it&#8217;s as simple as:</p>
<p><code>sudo letsencrypt --apache -d yourdomain.org</code></p>
<p>To renew your certificate you simply do:</p>
<p><code>sudo letsencrypt renew</code></p>
<p>To set up auto-renewal you can follow <a href="https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04" target="_blank" rel="noopener">this tutorial</a>.</p>
<p>&nbsp;</p>
<p><strong>Step 4: </strong>Setting up PIWIK</p>
<p>In order to install PIWIK on our Ubuntu 16.04 droplet, we have to change to the <em>www</em> folder:<br />
<code>cd /var/www</code></p>
<p>There we download the latest PIWIK build and unzip afterwards:<br />
<code>wget https://builds.piwik.org/latest.zip</code><br />
<code>unzip latest.zip</code></p>
<p>Then we transfer all files from the <em>PIWIK</em> folder to the <em>html</em> folder and setup the rights properly:<br />
<code>mv piwik/. html/</code><br />
<code>chown -R www-data:www-data /var/www/html</code></p>
<p>If you hit the IP of your server in your browser you should get this.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-198 size-large" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2017/02/piwik-welcome-screen-e1486307418935-1024x383.jpg" width="672" height="251" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935-1024x383.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935-300x112.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935-768x288.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935-800x299.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-welcome-screen-e1486307418935.jpg 1373w" sizes="auto, (max-width: 672px) 100vw, 672px" /></p>
<p>Well, the first battle seems to be won! So let&#8217;s configure it. Hit the <strong>next button</strong>.</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-200 aligncenter" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2017/02/piwik-setup-step2-1024x648.jpg" alt="" width="672" height="425" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2-1024x648.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2-300x190.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2-768x486.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2-800x506.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-setup-step2.jpg 1227w" sizes="auto, (max-width: 672px) 100vw, 672px" /></p>
<p>And there it is &#8211; a missing PHP extension appeared! Almost as easy as catching a Pokèmon this error can be fixed:</p>
<p><code>sudo apt install php7.0-mbstring</code></p>
<p><em>Take that, Magikarp of PHP. </em></p>
<p>&nbsp;</p>
<p><strong>Step 4: </strong>Setting up a database</p>
<p>The next step leads us to the database credentials. If you read the server login message carefully, you know the password of the MySQL root-User can be found with:<br />
<code>nano /root/.digitalocean_password</code></p>
<p>So we have the database server (127.0.0.1), the username (root) and the password. But we lack the database name, because we haven&#8217;t set up a database so far. So let&#8217;s do just that:<br />
<code>mysql -u root -p</code><br />
<code>CREATE DATABASE databaseName;</code></p>
<p><strong>We&#8217;re almost there.</strong></p>
<p>Enter your data in the database form in your browser and hit the next button. After a success-message telling you your tables were created, hit next again. Then you can add a super admin user &#8211; be smart and add a safe password!</p>
<p><em>Just a little further</em> &#8211; enter some details about the website you want to start to analyse and hit next. Then you&#8217;ll be provided with the code that needs to be included on all sites of your website. If you user a CMS such as WordPress, you can use a <a href="https://wordpress.org/plugins/wp-piwik/" target="_blank" rel="noopener">plugin</a> to achieve that.</p>
<p><strong>And there you go:</strong></p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-203 aligncenter" src="https://network.jiaa.io/jiaa-blog/wp-content/uploads/sites/5/2017/02/piwik-successfully-installed-1024x705.jpg" alt="" width="672" height="463" srcset="https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed-1024x705.jpg 1024w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed-300x207.jpg 300w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed-768x529.jpg 768w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed-800x551.jpg 800w, https://blog.jiaa.io/wp-content/uploads/2017/02/piwik-successfully-installed.jpg 1245w" sizes="auto, (max-width: 672px) 100vw, 672px" /></p>
<p><strong>Now, wasn&#8217;t that easy? </strong></p>
<p>As enjoyable as this his been, you&#8217;re not done yet. Learn how the thing works, <a href="https://www.rackaid.com/blog/server-security-tips/" target="_blank" rel="noopener">secure your server</a> properly and give hands up to the guys over at <a href="https://piwik.org/" target="_blank" rel="noopener">PIWIK</a> and <a href="https://letsencrypt.org" target="_blank" rel="noopener">Let&#8217;s Encrypt</a> for providing you with all of this for free!</p>
<p><em>Image from <a href="https://stocksnap.io/photo/VFQGMU3RL9" target="_blank" rel="noopener">stocksnap.io</a>, CC0 License.</em></p>
<p>The post <a href="https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/">How To Install Piwik on an Ubuntu 16.04 Cloud Server (DigitalOcean)</a> appeared first on <a href="https://blog.jiaa.io">jiaa.io Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.jiaa.io/2017/02/05/install-piwik-ubuntu-16-04-cloud-server-digitalocean/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
