Ubuntu Server Initial Setup

SysAdmin Ubuntu Server Initial Setup

This is the first in a series of posts that will cover from the deployment of a VPS up to the installation of Nextcloud. These are the kind of posts I will write mostly for future memory, but if they will be useful to you, even better. I’m not reinventing the wheel here, these are just the result of the sum of tutorials and lessons I keep learning.

On this post I will cover the use of SSH to connect to a server, the creation of a new user with administrative privileges and the setup of a firewall.

I’m currently using Ubuntu 18.04, but these instructions are equally valid for other Ubuntu versions.

Read the tutorial...

This Blog's Source Code Is Now Public

Blog Web Development This Blog's Source Code Is Now Public

This blog was built following the JAMStack philosophy using Hugo, with its development being done at GitHub and now publicly available under the MIT license. It’s deployed and hosted on Netlify.

Keep in mind that the theme used was tailor-made, and if you decide to use it, you will probably have a lot of work to do to adjust it to your needs.

I am making the source code public so it can be useful to you, but also so it can be audited. So please, if you find any typos, grammar or formatting errors, or any other issue that needs to be addressed, feel free to open a Pull Resquest. On posts you can use the link Edit (below the title) to fix them directly on GitHub.

Enjoy and contribute 😄

How I Ended Up With Vultr to Self Host Nextcloud

SysAdmin How I Ended Up With Vultr to Self Host Nextcloud

In the process of self-hosting Nextcloud the first step was to choose a VPS provider. It wasn’t a straightforward choice and in the process I ended up experiencing, by this order, Hetzner, DigitalOcean and Vultr.

But, first of all, let me advise you that this isn’t intended to be a factual analysis, supported by quantifiable and specific data. It is rather a subjective assessment based on my use case. Therefore, I believe that your experience with these providers could be completely different. If you are into more technical and detailed analyses you can go here and here, for example.

So my first choice was Hetzner. A company with a high reputation and a very inviting features/price ratio. A VPS with 1vCPU, 2GB RAM, 20GB Disk and 20TB Traffic for €2.49 ($2.75) looks great. It seemed a logical choice. So I proceeded with the installation and configuration of Nextcloud and uploaded my files to the server. Everything was going well, until I started to browse through Nextcloud and tried to open some of my videos. The server crashed. I thought it was a one-time event, but I repeated the process always with the same outcome. According to Hetzner’s console the culprit seemed to be the CPU. On idle it remained arround 30% and very often reached 100%. So I upgraded the VPS to 2vCPU, 4GB RAM and 40GB Disk for €4.90 ($5.41) and it all started to work like a charm.

But then I kept wondering, does it take 2vCPU to run a personal Nextcloud? So I decided to give a try with the only provider I had ever worked with, DigitalOcean (DO). Of course I chose a droplet with 1vCPU, 1GB RAM and 25GB Disk ($5, €4.54). The user experience was very similar to Hetzner’s 2vCPU plan. Of course, CPU utilization was higher in DO (1vCPU vs 2vCPU), but with rare peaks and generally never exceeding 60%. One noticeable difference was the higher download/load speed in DO. Something I expected, because by the reviews I read they have a better network performance with higher download and upload speeds.

The same reviews pointed out that Vultr has a network performance on par with DO and a better overall performance. Besides that they have a datacenter in Paris (500km closer to me than Amsterdam) and free snapshots. So I decided to give it a spin. As in DO I deployed a server with 1vCPU, 1GB RAM and 25GB Disk ($5, €4.54). The user experience was slightly better than with DO. The response time was shorter. As a result the pages opened more quickly and the download/load of files was also faster. A better overall experience. This, combined with the ability to create and store snapshots for free, made it easier for me to choose Vultr.

For now I see no advantage in using DO over Vultr. Hetzner can be back in play if I find myself in need of a little more disk space, or of the extra performance the 2vCPUs and 4GB RAM can offer.

Wrapping up

  • Hetzner 1vCPU, 2GB RAM, 20GB Disk at €2.49 ($2.75): High CPU utilization and server crashed when loading videos, aparently because of CPU limitations.
  • Hetzner 2vCPU, 4GB RAM, 40GB Disk at €4.90 ($5.41): Worked like a charm.
  • DigitalOcean 1vCPU, 1GB RAM, 25GB Disk at $5 (€4.54): Similar experience as with Hetzner 2vCPU plan. Download/load of files was faster than Hetzner.
  • Vultr 1vCPU, 1GB RAM, 25GB Disk at $5 (€4.54): Slightly better exeprience than DO. Faster response time and download/load of files. Free snapshots.

Be the Owner of Your Data With Nextcloud

Privacy SysAdmin Be the Owner of Your Data With Nextcloud

Since a few years now I started to get concern with how much of my data was being gathered and how it was being used.

Nowdays we spend a big part of our lives online and over the years companies have grown basing their business on tracking our actions. The searches we made, the sites and pages we visit, the time you spent on them… and so on.

Let’s face it, Google Search was a revolution, and Gmail, OneDrive, iCloud, Facebook or Youtube are excellent products in terms of usability and features. And best of all they’re free, you would say. Are they?

So, how can this companies create and mantain such great products, give them free and be profitable? More than been profitable, all those are now in the top 10 list of the most values companies. How?

Because data is nowdays the most profitable resource. The metadata those companies gather of us can be used, for instance, to place ads or shape what we see when we do a search on Google or view our timeline on Facebook or Youtube. In the end, they can condition us to buy a product or to vote in a certain politic. Do you think I’m being dramatic? Take a look at Netflix documentary The Great Hack about Facebook and Cambridge Analytica actions during Trump and Brexit campaigns.

One question that came up in that documentary and made me think was “how much of Facebook’s profits come from the use of its users’ data?" The answer is all. All of the more than $400 billion dollars that Facebook worth are result of how much of our data they gather and own. That’s disturbing.

What can we do? Well, look for alternative products with privacy in mind. But the first step you need to take is acknowledge the importance of protect your data. Why? Because some of the alternatives to those big companies produtcs don’t offer the same features or don’t come free, or both. Yes, the truth is that presently privacy can be seen in some way as a “luxury” product.

So far, in pursuit for privacy, what changes did I make? A couple years ago I ditched Chrome for Firefox. Gradually stopped using Facebook or Messenger, and recently adopted Signal for messaging and Mastodon as social network. My email, contacts and calendars are now handled by Tutanota.

For now there was still one big piece missing, cloud storage. I was using OneDrive because of his deep integration with Windows and Office. Looking for alternatives I found good, open source, but expensive ones like Least Authority S4 ($25/month), and more affordable, but closed source ones like Sync and Tresorit. Then I decided to take what I already knew on SysAdmin, learn a couple of new things, and give a try on self-hosting Nextcloud. And two weeks later there’s no looking back!

Nextcloud is a community-driven, free and open source software with all is code published on GitHub. It offers server-side encryption and end-to-end encryption is under development. It’s mainly a cloud storage, but groupware capabilities could be easily added. It meets all my most urgent requirements and have room for grow and improvement.

So far, my roadmap on self-hosting Nextcloud:

  • Deploy a Ubuntu server with Nginx, PHP and PostgreSQL installed;
  • Install and tune Nextcloud;
  • Use Restic to automate backups of Nextcloud files and database to Backblaze B2;
  • Use Vultr’s API to automate snapshots management.

I’m no expert, but I will try detail each one of these steps on upcoming posts.

For now I’m using Nextcloud only to store files and notes. As next step I will probably work on the integration with OnlyOffice.

Hello World


Maybe the best way to begin is with a introduction…

I’m a pediatric nurse by ☀ and 🌙, ☕ lover and a 🐕 owner for life!

In between I taught myself a couple of things on web development, currently focused on JAMstack and with more than 15 years of experience on trying to learn JavaScript!

I’m a motorsport fan (F1, WEC, IMSA…) and I do some sim racing on iRacing.

There’re days (less than it should) when I take some time to cycling.

What to expect from this blog? Well, the way I see it I will use it more like a journal. A place to log some thoughts, ideas, events and keep track of things, like tutorials, for future memory.

I hope, if you share my interests, you will find here something enjoyable or useful.

For sure, I have the expectation to ear things from you too. So fell free to reach me out commenting on posts or through this form.

I have accounts on Twitter and Instagram, but I don’t post much by there. I’m more active on Mastodon, so feel free to follow me there 😀