Hosting Pelican on Raspberry Pi and Cloudflare Warp

Posted on Sun 07 January 2018 in misc

Very quickly hosting the blog on a raspberry pi behind cloudflare, using their new warp system.

Overview: 1. Install Nginx 2. Clone the repo 3. Adjust Nginx to look at the pelican output directory 4. Install Cloudflare warp and sign in 5. Point blog.11eight.co.uk to 127.0.0.1 using cloudflare warp 6. Come up with a nice way of the site building automatically (cron job?)

Install Warp

1
2
$ curl https://bin.equinox.io/c/2ovkwS9YHaP/warp-stable-linux-arm.tgz | tar xz
$ sudo mv ./cloudflare-warp /usr/local/bin/cloudflare-warp

Install Nginx

1
sudo apt-get install nginx

Edit Nginx

1
2
3
4
5
6
sudo vim /etc/nginx/sites-available/default
change the line for:
     root /var/www/html;
to:
     root /home/cloned/repo/directory/output;
 sudo nginx restart

Cloudflare warp:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
cloudflare-warp login
    (go to the link provided and enable warp in another browser)

edit ~/.cloudflare-warp/config.yml
---
hostname: blog.11eight.co.uk
url: 127.0.0.1
sudo cloudflare-warp service install

for some reason I have to copy the cert.pem and config.yml files to /etc/cloudflare-warp manuall

sudo cloudflare-warp service install
sudo service cloudflare-warp start