This is a follow-up to Building a mail server with Sakura VPS + Docker + Freenom , in which I tighten up the security a little
If the server from last time is running under docker, stop it
Copy $ docker-compose down Closing imap and submission In the previous article I confirmed that imaps and smtps communication works, so I close imap and submission
docker-compose.yml (only the changed parts are shown)
[Read More]
Building a Docker Mail Server on a Sakura VPS with a Freenom Domain
MailServer(Postfix+Dovecot) on Docker by VPS
TL;DR I tried building a mail server with Docker on a Sakura VPS
I will skip registering a domain on Freenom and how to use Cloudflare
Linux(Debian10) Docker is assumed to be already installed A domain name has been obtained from Freenom and registered in a DNS such as Cloudflare
Freenom : example.com (fictitious name) Sakura VPS: 11.22.33.44 (fictitious IP) For this server build I referred to the sites below
[Read More]
Updating the Hugo Tranquilpeak Theme from 0.4 to 0.5
how to update tranquilpeak-theme for 0.4 to 0.5
I updated the Hugo Tranquilpeak theme on a site I run elsewhere from 0.4.x to 0.5.x
From 0.5BETA onwards a number of fixes were required, so here are my notes
The current Tranquilpeak The theme is managed as a submodule, and I was using 0.4.x
Copy $ pwd ~/hugo/tranquilpeak $ git submodule status e1d2c5d5cb1efb687ed698782f99df576e7db084 themes/tranquilpeak (0.4.8-BETA) Updating to 0.5-BETA Copy $ git submodule update --remote remote: Enumerating objects: 496, done. remote: Counting objects: 100% (493/493), done. remote: Compressing objects: 100% (164/164), done. remote: Total 496 (delta 308), reused 472 (delta 296), pack-reused 3 Receiving objects: 100% (496/496), 214.68 KiB | 7.95 MiB/s, done. Resolving deltas: 100% (308/308), completed with 90 local objects. From https://github.com/kakawait/hugo-tranquilpeak-theme e1d2c5d..37550aa master -> origin/master + 4243bcf...8223447 develop -> origin/develop (forced update) * [new branch] fix-fancybox-3-data-model -> origin/fix-fancybox-3-data-model a065336..902f360 gh-pages -> origin/gh-pages * [new tag] 0.5.0-BETA -> 0.5.0-BETA Submodule path 'themes/tranquilpeak': checked out '37550aa165eec033e34f2e0f89cb0720d72a4c34' Changes and key points To show posts on the front page, mainSection has to be specified explicitly
(I was showing the list of posts on the front page, so nothing appeared unless mainSection was filled in) highlight, jQery, prism and font-awesome have each been upgraded, so entries that load the CDN URLs via [[params.customJS]] are needed The notation changed because font-awesome went from 4 to 5 (v5 notation) A timezone parameter was added in hugo0.87, so I added timezone = "Asia/Tokyo"
(it is not mandatory, and you need to have updated hugo to 0.87 or later) Fixing config.toml The quickest way is to copy the config.toml inside themes/tranquilpeak/exampleSite and change only the parts you need
[Read More]
Upgrading Growi from 4.2 or Earlier to 4.3 with MongoDB 4.4
How to upgrade growi4.2 to 4.3
TR;DR Assume that Growi is running on docker with the configuration below
App Version Growi 4.2.21 mongodb 3.6 There are major changes from Growi 4.3 onwards, so when you upgrade from 4.2 or earlier to 4.3, look through the official articles first
And be sure to take a backup before starting the work!
Updating mongodb Up to Growi 4.2.x it could also run on mongodb 3.x, but 4.3 requires mongodb 4.4, so mongodb has to be updated
I did the work of updating mongodb in the order 3.6->4.0->4.2->4.4
[Read More]
When a Home Server Returns 403 Forbidden from Outside
403 Forbidden Error with UPnP
On my home server I run several nginx-proxy Docker containers, and I also make them accessible from outside on my own domain.
Of course, on the fiber router facing the WAN I have ports 80 and 443 open, and connectivity from outside is confirmed.
In this kind of setup, a symptom where access from outside was not possible started happening at irregular intervals
Symptoms When the problem shows up from outside, access becomes impossible with a 403 Fobidden like the one below
[Read More]
Sending Mail Through Gmail's SMTP Server with msmtp
How to Configure Gmail SMTP in msmtp
I want to install msmtp on Debian10 and send mail through Gmail’s SMTP server
msmtp On hosts that only send mail I used to use sSMTP a lot, but on Debian10 there is no ssmtp package.
The replacement for it is msmtp
Installing msmtp Copy # apt install msmtp msmtp-mta Configuration There is no configuration file in /etc, so copy the sample
Copy # cp /usr/share/doc/msmtp/examples/msmtprc-system.example /etc/msmtprc Incidentally, for a per-user configuration it is
[Read More]
When VirtualBox Vanishes After a Homebrew Upgrade and Vagrant Breaks
Vagrant could not detect VirtualBox!
Symptoms I run several servers in Docker containers with Vagrant on my Mac, but the guest OS I had started with Vagrant stopped coming up, and neither vagrant ssh nor vagrant halt worked any more.
Copy $ vagrant halt The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system. The reason is shown below: Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed. Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires this to be available on the PATH. If VirtualBox is installed, please find the `VBoxManage` binary and add it to the PATH environmental variable. VirtualBox cannot be found? Did it disappear?
[Read More]
Notes on Updating a Hugo Theme Managed as a Git Submodule
How to update submodule theme
On this site I manage the Hugo Beautifulhuigo theme as a submodule on Gitlab.
From time to time the upstream submodue theme gets updated, but git clone and git push do not update the submodule automatically
So it has to be updated by hand, and since this is work I do often, I am writing it down as a note
Cloning my own repository Copy $ git clone --recurse-submodules --depth 1 https://gitlab.com/user/repo.git $ cd repo Updating the submodule The only thing you actually have to do is git submodule update --remote
[Read More]
How to Hide the Author Name in the Beautifulhugo Theme
how to remove author name
On this site there is only one administrator, so going to the trouble of showing the author (Author name) has no meaning.
Setting the Author field to display:none; with CSS might remove only the display, but since it is unnecessary I thought I might as well delete it outright.
Looking into the files right away, I found it written in theme/beautifulhugo/layouts/partials/post_meta.html.
Copy {{ if not .Site.Params.hideAuthor }} {{ if .Params.author }} | <i class="fas fa-user"></i> {{ .Params.author | safeHTML }} {{ else }} | <i class="fas fa-user"></i> {{ .Site.Author.name | safeHTML }} {{ end }} {{ end }} Usually I would delete the relevant part and bring it over to root/layouts/partials/post_meta.html, but looking closely, the condition is the truth value of hideAuthor.
[Read More]
Creating Password-Protected ZIP Files on Linux and macOS
Creating a password-protected zip, and adding a password to an existing zip file
The other day, while self-hosting Bitwarden with Docker , I realised that leaving the data exported from LastPass and 1Password lying around as it is would be dangerous. Deleting it once it is no longer needed is probably the best answer, but I wanted to keep it as a backup, so I decided to save it as a password-protected zip.
Creating a password-protected zip When you want to create a password-protected zip from a file Copy $ zip -e sample.zip sample.txt Enter password:<enter the password> Verify password:<enter the password> adding: test (stored 0%) When you want to create a password-protected zip from a directory When a directory is involved you need to be careful, because if you forget the -r option you end up with an empty zip file
[Read More]
Posts