Acadia National Park

While in Bar Harbor, Maine over the past weekend, I had a chance to make a stop at Acadia National Park and sneak in a few shots. Since I didn’t get to arrive early or stay late for the sunset, I had to make do with the light I had. Good thing I always pack my Lee Big Stopper 😉

How To Create And Secure An Ubuntu Server 20.04 VM On ESXi 7.0

Introduction

In this guide I will show you how to create an Ubuntu Server 20.04 VM on ESXi 7.0 and setup basic security such as firewall and SSH key.

Download Ubuntu Server 20.04

Head over to the releases page and download the image. For this guide, we will be using the “64-bit PC (AMD64) server install image”.

Continue reading

How To Fix Memcache \OC\Memcache\APCu not available for local cache – Nextcloud

Today I updated my self install of Nextcloud from version 22.2.3 to 23.0.0 and after the update I visited the status (Settings->Overview) page in order to see if there are any pending issues and saw the following warning:

    The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
        Missing index "fs_id_storage_size" in table "oc_filecache".
        Missing index "fs_storage_path_prefix" in table "oc_filecache".

Please double check the installation guides, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan

The error indicates that I can simply run “occ db:add-missing-indices” at the command line and the error should be resolved so I navigated to the occ directory and issued the command “sudo -u www-data php occ db:add-missing-indices” but received another error instead:

An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

Some research led to this github issue which suggested adding apc.enable_cli = 1 to the file apcu.ini located in /etc/php/7.4/mods-available (please note that your version of php may be different) which turns out, it solved the issue allowing me to successfully run sudo -u www-data php occ db:add-missing-indices again.

I now have a clean status page!

Nextcloud status page

Configure Tautulli To Send Real-Time Notifications To Pushover

I recently configured Tautulli to send notifications through Pushover for when there’s activity on my Plex server such as Play Start/Stop, Plex Server Status etc. and works fantastically well so I decided to write a quick guide on how to do it.

Sign up for Pushover

First sign up for an account at Pushover (just remember that after a trial period, there’s a one time fee of $5 USD) and login where you will be greeted with a page showing your User Key on the right side of the screen. Take note of this as you will need it later. Now towards the bottom of the page you should see Your Applications. Click on Create an Application/API Token. Give it a name, click on the checkbox and Create Application.

Continue reading

Send ESXi Host Logs To Remote Syslog Server

Under the ESXi host, navigate to Host->Manage->System->Advanced Settings and search for Syslog.global.logHost and click edit. Now input the address of the syslog server, in my case, a Graylog VM:

udp://192.168.139.11:8515
ESXi Host Advanced Settings

Enable SSH on the host and login. Navigate to /etc/vmware/firewall and create a file name.xml and add the following editing as needed:

<ConfigRoot>
  <service id="0000">
    <id>graylog</id>
    <rule id='0000'>
      <direction>outbound</direction>
      <protocol>udp</protocol>
      <porttype>dst</porttype>
      <port>8515</port>
    </rule>
    <enabled>true</enabled>
    <required>true</required>
  </service>
</ConfigRoot>

Save the file and reload the firewall by issuing

esxcli network firewall unload

esxcli network firewall load

You should now start seeing logs in your syslog server. Just be warned that it is not persistent across reboots.


How to force passthrough of internal USB controller on a Dell PowerEdge Server

Dell and vmware logo

Recently I’ve decided to give Frigate a try since as some of you already know, motion detection on most cameras can be very flaky at times and I was looking for a permanent solution to false alerts outside my home. One of the issues I encountered during the process was Frigate suggests the use of a Google Coral Accelerator for object detection (which I was lucky enough to score one during the chip shortage) but since my Frigate instance is running under a VM on ESXi, I needed to passthrough the Coral to the VM which turns out it doesn’t work under ESXi 7.x. Simply plugging in the Coral to my PowerEdge R330 server and passing it through to the VM wasn’t enough.

ESXi Host PCI devices settings