jeffmaxton / gollum-easy-install

An Ansible playbook to install a secure, private Gollum wiki instance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gollum Wiki Easy Install

An Ansible playbook to provision a secure, private Gollum Wiki instance. Tested on Ubuntu 18.04/20.04.

Features

  • HTTPs-enabled via LetsEncrypt/Certbot
  • Uses Apache HTTP Server with mod_proxy.
  • Authentication via Apache Basic Auth
  • UFW Firewall enabled with 443 (SSL) port and rate-limited 22 (SSH) port exposed.
  • Updates to wiki entries are automatically pushed to your Github repo storing wiki entries.

Requirements

Setup

First make sure there is a fresh Ubuntu 18.04 or 20.04 instance where you want to install Gollum on. Also, make sure you can ssh in, e.g. running the command ssh root@my-gollum-wiki.com should be successful.

1 - Create a Blank Github Repo to Store Your Wiki Notes

Create Blank Github Repo

* If you want your notes to be secret, make sure the repo is set to Private.

2 - Copy Clone URL

Copy Clone URL

3 - Update vars/site With Your Settings

For example:

gollum_login_username: jonmbake
gollum_login_password: "ykek88+>Foo"
certbot_contact_email: jonmbake@gmail.com
certbot_domain_name: notes.jonbake.com
github_ssh_repo_url: git@github.com:jonmbake/wiki-notes.git

4 - Update Inventory With Your Domain Name

[prod]
notes.jonbake.com ansible_user=root

5 - Run the Ansible Provisioning Playbook Script

ansible-playbook -i inventory site.yml

Towards the end of the playbook, the Github deploy public key will be logged:

Copy Clone URL

6 - Add Deploy Public Key to Your Github Repo

Copy Clone URL

Make sure to click Allow write access

7 - Navigate to Your Gollum Instance - Verify Things Work

  1. Login with gollum_login_username and gollum_login_password

Gollum Login

  1. Create a page and save.

Create Page

  1. Verify page is added to Github repo.

Create Page

Running Locally

Add github_ssh_repo_url to vars/local. Then run:

vagrant up

Add the logged deploy public key to your Github repo.

Useful Server Commands

Restart gollum:

sudo service gollum restart

View the gollum logs:

tail /var/log/gollum.log

Navigate to local gollum wiki directory:

cd /home/gollum/data

Update gollum configuration:

sudo su gollum
vim /home/gollum/data/gollum-config.rb

To Dos

  • Add web hook so changes made outside of instance are synced

About

An Ansible playbook to install a secure, private Gollum wiki instance.

License:MIT License


Languages

Language:Ruby 100.0%