Since we have already learned how to set up a single Jekyll sever, the question may come up how to run two or more Jekyll instances in parallel on the same server. This is what we’ll explain in the following.

First, we create a new blog in our existing home directory:

sudo -i
su - jekyll
export GEM_HOME="/home/jekyll/gems"
export PATH="home/jekyll/gems/bin:$PATH"
jekyll new blog1

Now, we have to create the second jekyll service unit file as /lib/systemd/system/jekyll1.service:

Description=Jekyll service

# Added solution -- add WorkingDirectory to directory where you clone your markdown files for Jekyll to render
# Name of the user account that is running the Jekyll server
# Location (source) of the markdown files to be rendered
ExecStart=/usr/bin/bash /home/jekyll/


where the script reads as

export GEM_HOME='/home/jekyll/gems' 
export PATH='/home/jekyll/gems/bin:$PATH'

cd /home/jekyll/blog1 
export BUNDLE_GEMFILE='/home/jekyll/blog1/Gemfile' 
bundle exec jekyll serve --host --port 4001 

For automated start on boot, we again have to link this service under /etc/systemd/system/

cd /etc/systemd/system/
sudo ln -s /lib/systemd/system/jekyll1.service .
sudo systemctl daemon-reload

For now, we can start the service manually by sudo service jekyll1 start.

We leave the reverse proxy configuration for the jekyll instance on port 4001 as an exercise to the reader.

That’s it! Now we have a second Jekyll blog running SSL encrypted behind an Apache reverse proxy.