Debian Unattended Security Updates

Follow these instructions and set your email to receive notifications.

apt-get install unattended-upgrades apt-listchanges

nano /etc/apt/apt.conf.d/50unattended-upgrades

Set your email to receive notificaitons:
-Upgrade::Mail "";

To activate unattended-upgrades, you need to ensure that the apt configuration stub /etc/apt/apt.conf.d/20auto-upgrades contains at least the following lines:

  • # editor /etc/apt/apt.conf.d/20auto-upgrades

    APT::Periodic::Update-Package-Lists "1";
    APT::Periodic::Unattended-Upgrade "1";
    dpkg-reconfigure -plow unattended-upgrades


Alternatively, you can also create the apt configuration file /etc/apt/apt.conf.d/02periodic to activate unattended-upgrades:

  • # nano /etc/apt/apt.conf.d/02periodic


    Below is an example /etc/apt/apt.conf.d/02periodic:

    • // Control parameters for cron jobs by /etc/cron.daily/apt-compat //
      // Enable the update/upgrade script (0=disable)
      APT::Periodic::Enable "1";
      // Do "apt-get update" automatically every n-days (0=disable)
      APT::Periodic::Update-Package-Lists "1";
      // Do "apt-get upgrade --download-only" every n-days (0=disable)
      APT::Periodic::Download-Upgradeable-Packages "1";
      // Run the "unattended-upgrade" security upgrade script
      // every n-days (0=disabled)
      // Requires the package "unattended-upgrades" and will write
      // a log in /var/log/unattended-upgrades
      APT::Periodic::Unattended-Upgrade "1";
      // Do "apt-get autoclean" every n-days (0=disable)
      APT::Periodic::AutocleanInterval "21";
      // Send report mail to root
      //     0:  no report             (or null string)
      //     1:  progress report       (actually any string)
      //     2:  + command outputs     (remove -qq, remove 2>/dev/null, add -d)
      //     3:  + trace on
      APT::Periodic::Verbose "2";
      Unattended-Upgrade::Mail "";

Solve Proxmox CloudLinux Kernel Care GPG Error

apt-key adv --keyserver --recv-key E58FE9B3FE3B0470525159BD6DC3D600CDEF74BB
 apt-get install dirmngr



This issue may be caused by a buggy package installation script causing incorrect repositories to be added to the software sources repository list. If after troubleshooting the issue remains unresolved contact your vendors by opening a support ticket with the error details.


Other error message:

gpg: failed to start the dirmngr ‘/usr/bin/dirmngr’: No such file or directory



Proxmox disable swap unless totally out of RAM

The defautl vm.swappiness value for Proxmox 5.2.x is 60


Run this command in Shell in order to reduce swappiness to an absolute necessity when the system is out of RAM.

 sysctl -w vm.swappiness=0

Other performance tips

Proxmox OpenVZ SWAP and Performance


The public key is not available: NO_PUBKEY 68818C72E52529D4

After adding a mongodb you may experience an error about the GPG PUB KEY like teh following.

W: GPG error: xenial/mongodb-org/testing Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68818C72E52529D4
E: The repository ‘ xenial/mongodb-org/testing Release’ is not signed.

You can fix this issue by adding the PUB KEY for MongoDB’s repository.

apt-key adv --keyserver --recv-keys 68818C72E52529D4

Try update again

apt update

Meteor Remote MongoDB

I don’t like to use big repeating command and I was searching for a solution where I will be setting a variable embedded with something so every time I start my meteor app; the MONGO_URL will set to environment automatically. So this what I did:

In the package.json file I replaced the start parameter as below:

"scripts": {
    "start": "MONGO_URL=mongodb://username:password@host_url:portnumber/dbname meteor run"



Fix: Error: Cannot find module ‘@babel/runtime/helpers/builtin/objectSpread’

Another common error:

Error: Cannot find module ‘@babel/runtime/helpers/builtin/interopRequireDefault’

How to fix:

This has been traced in the forums as an incompatibility with the latest version of @babel/runtime. Change the corresponding line in the package.json file

  "dependencies": {
    "@babel/runtime": "7.0.0-beta.55",

and then do

meteor npm install




Proxmox XFCE4 Setup with Ubuntu + VNC Server

Configure your instance using this guide to install the necessary packages and setup VNC to start on reboot.

Tip: You will want to connect via SSH tunnel to your VNC server. That is the safest way to do it.

Specify the resolution using this format

vncserver :1 -geometry 1600x1200



Fix Gitlab won’t start, database system is shut down, failed to load.

When you have issues with GitLab you will want to check the status to see which component of gitlab is not working as expected. Do this using the following command:

sudo gitlab-ctl status

Verify the log files of the component to obtain details about the failure. Log files for Omnibus installation of gitlab are located under.


Within this location there are several subfolders that container log files.

You will can to examine the file that is named current for the component.

Example, suppose we are fixing database is shutdown error.

sudo nano /var/log/gitlab/postgresql/current

When we examine this log file we discover there is an issue with reading the cacert.pem file. This is causing the database to be unable to startup.

 FATAL: could not load root certificate file "/opt/gitlab/embedded/ssl/certs/cacert.pem": No such file or directory
 LOG: database system is shut down

If the file is missing then you need to restore it from your backups.

If the file is there the error could be caused by a permission error.

Change the files permission  using the commands below and restart gitlab.

sudo chmod 644 /opt/gitlab/embedded/ssl/certs/cacert.pem
sudo gitlab-ctl restart

Verify that gitlab is started correctly

sudo gitlab-ctl status