Image by Mohamed Hassan from Pixabay

The theme I’m using in Hugo hides list numbers and bullets. Not sure why anyone would ever want that, but that’s why the text after The Solution is indented. If you were to inspect the code, you’d see that it’s actually an ordered list, the numbers are just not visible. So, until I fix the theme…

The “Why”

I used to pay Zoho for their Desk product (I don’t remember what level) that included a custom domain. This was also before my switch to Netlify so my URL was not going to work. I did have to have Zoho remove my domain entirely since my DNS settings weren’t correct and I could no longer access the portal at all!

What I didn’t want, however, was to have to give customers and clients the entire non-custom URL

The Solution

  1. Use “Deploy manually” to create a super-simple new site on Netlify; download a landing page demo that is offered as an example. This site will never be seen.
  2. Unzip the downloaded file to your local computer.
  3. Add a file named _redirects to the root of that unzipped folder.
  4. Add the following line to that file:* 301!
  5. Drag-and-drop the entire folder, with the new file, into the Netlify “Deploy manually” page. This will create the page which could be accessed at their special subdomain, but that’s unlikely, and could probably be blocked with some other trickery that I’m not interested in today.
  6. Add the custom domain under “Domain management.” Netlify will recognize that the domain is already managed by them, so it will be more than happy to manage the subdomain.

That should be all of it. It might take a minute for all of the DNS stuff to update properly and the certificate may need to be renewed to handle the new subdomain, but it should start working. Anytime someone tries to go, they’ll automatically be redirected.

That should be everything. Unless I think of something else…

Image by 3D Animation Production Company from Pixabay

Basic Steps

Create Non-Root User and Adjust Permissions

See Initial Server Setup with Ubuntu 22.04

Setup User

adduser karl
usermod -aG sudo karl
ufw app list
ufw allow OpenSSH
ufw enable
ufw status

Test access

SSH Settings

rsync --archive --chown=karl:karl ~/.ssh /home/karl

Setup Docker and Docker Compose

See Install the Compose plugin

Setup Repository

See Install Docker Engine on Ubuntu

sudo apt install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update

Install Docker Engine

sudo apt-get install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin
sudo docker run hello-world

Install Plugin

Should already be installed with Docker Engine above.

docker compose version

Image by 구본근 구 from Pixabay

This is just so I can be consistent. Hope this helps!

How to configure automatic updates in Ubuntu Server

For some reason, this is harder to find than it should be, so here’s a GoEngineer link and the actual link to the MS page.

SOLIDWORKS PDM Upgrading SQL 2014 to Service Pack 3 | GoEngineer

Download Microsoft® SQL Server® 2014 Service Pack 3 (SP3) from Official Microsoft Download Center

Create a persistent TUN

SSH into your NAS

ssh user@local-ip

The following setup steps must be run as root

sudo -i

Write script to /usr/local/etc/rc.d/ that will setup /dev/net/tun on startup

echo -e '#!/bin/sh -e \ninsmod /lib/modules/tun.ko' > /usr/local/etc/rc.d/

Set executable permissions on script

chmod a+x /usr/local/etc/rc.d/

Run script once to create a TUN


Check for the TUN

ls /dev/net/tun

If you experience trouble getting the TUN to work check out Rui Marinho’s guide

Install docker on your NAS

Package Center -> Search ‘Docker’ -> Install

Set up container

Make directory to store ZeroTier’s identity and config

mkdir /var/lib/zerotier-one

In the next step we bind mount to the host’s /var/lib/zerotier-one created above in order to store ZeroTier’s identity. This is not guaranteed to survive DSM updates. I would suggest placing this on an automatically-mounted volume where your other private user data resides. The location you choose to store your identities should be kept secure and never placed on a shared volume that others can access.

Make Docker container called zt (Repo: zerotier/zerotier-synology)

docker run -d          \
 --name zt             \
 --restart=always      \
 --device=/dev/net/tun \
 --net=host            \
 --cap-add=NET_ADMIN   \
 --cap-add=SYS_ADMIN   \
 -v /var/lib/zerotier-one:/var/lib/zerotier-one zerotier/zerotier-synology:latest</pre>


Previous versions of our package contained a GUI, however this is no longer the case and it is for the better. The CLI can be used as follows:

View node status

docker exec -it zt zerotier-cli status

Join your network

docker exec -it zt zerotier-cli join <network id>

Authorize the NAS on your network. Then view the network status:

docker exec -it zt zerotier-cli listnetworks

Show running container (optional)

docker ps

Enter the container (optional)

docker exec -it zt bash

Upgrading ZeroTier

To upgrade ZeroTier you’ll need to stop and remove the container, then pull latest and start a new container:

docker ps

Example output:

CONTAINER ID   IMAGE                               COMMAND          CREATED          STATUS   PORTS NAMES
52c7cb58a1dd   zerotier/zerotier-synology:latest   "zerotier-one"   5 weeks ago Up   9 days   zt

Stop the container

docker stop 52c7cb58a1dd

Remove the container

docker container rm 52c7cb58a1dd

Pull latest updates

docker pull zerotier/zerotier-synology:latest

Now, re-run the commands from the Set up container section.

Stolen word-for-word, command-for-command from Synology NAS