Jon Neverland

Jon Neverland

Tweet new posts automatically

A must when blogging is of course to post a tweet whenever you publish a new post! It took me literally 15 minutes to set this up with Huginn.

Notifications for failed cron jobs

Cron jobs are a vital part of every sysadmins setup. Backups, log rotation, certificate renewal and whatnot. I've mostly just relied on them working as they should until now, but with my recent Huginn + Matrix obsession I figured I should have some sort of notifications. Crontab supports sending emails for your jobs, all you have to do is add at the top. It defaults (on most distros) to sendmail, which I discovered was kind of a pain to set up. Instead I found t

Nginx default server with https

I have a few domains/vhosts set up on my server and I recently disabled one of them. When I wanted to make sure that it wasn't online anymore and tried to access it I noticed that nginx had picked one of my other vhosts (from dokku) as the default server for https:443. That's no good. It's easy to remedy though, I found the fix here [] but I'll put it here as well for keeping. Create default zone (sudo) touch /etc/nginx/sites-available/00-default ln -s /etc/ngi

My two favourite services

So I do a lot of self-hosting these days. I've always been keen on trying out new stuff that turns up but most of the services I just set up, keep for a couple of weeks and never use. There are two exceptions which makes up most of my self-hosting "base": Huginn [] and Dokku []. They are brilliant! Dokku I'll start with dokku since it's what powers most of my apps today. Huginn for example I run through dokku. > A docker-powered P

Nginx, Ghost and https

When moving this blog from a temporary url to my main I got the dreadful "Too many redirects". There is a simple fix which I found here []. Add proxy_set_header X-Forwarded-Proto https; to the conf. Mine now looks like this: server { listen 443 ssl; ssl_certificate /etc/letsencrypt/live/; ssl_certificate_key /etc/letsencrypt/live/; server_name www.jonnev

Ghost and production

There are 2 things you need to do to get ghost to run in production mode with docker: Add the NODE_ENV docker run -d --name ghost -v /path/to/blog:/var/lib/ghost -e NODE_ENV=production -p 2368:2368 ghost This is for ghost v0.11.x. For v1.x.x have a look at this post []! Note: If you're having trouble with the permissions on files in the volume, for example when trying to pull/add a theme, add this to the command above: -u $(id -u $USER):$(id -g

Blog up and running

So I figured I wanted to have a blog and in the process redo my homepage. A friend recommended Ghost and when trying out their hosted Pro version I thought it looked great! This is for ghost v0.11.x. For v1.x.x have a look at this post []! I wanted a clean and simple theme and when looking through the Ghost marketplace I found Steam []. I had some experience with Handlebars already and I quickly glanced through the