Nethence Newdoc Olddoc Lab Your IP BBDock  

Setting up Gollum on Ubuntu


Gollum is a Wiki-like engine that allows different kinds of formatting, mainly Markdown but also MediaWiki.

I am considering three use-cases:


as root

Install the needed packages, and use gem to install system-wide Gollum & addons,

sudo apt -y install git ruby ruby-dev libicu-dev zlib1g-dev
sudo gem install gollum

sate-of-the-art markdown formatting with better tables,

sudo gem install github-markdown

and with the rugged adapter,

sudo apt -y install cmake pkg-config
sudo gem install gollum-rugged_adapter


#sudo gem install wikicloth # mediawiki formatting


which gollum
gollum -v

another method that I do not recommend (unless you figure out how to install addons),

#apt -y install git ruby ruby-dev zlib1g-dbg zlib1g-dev libicu-dev make build-essential
#gem install bundle
#git clone
#git clone
#cd gollum/
#git pull
#bin/gollum -v
#bundle install

GIT setup to handle the documentation

Setup the GIT profile that corresponds to the non-authenticated Gollum WUI: try to use some mailing-list address and shared name. You will be able to setup binding to some Directory Server afterwards anyway.

git config --global ""
git config --global "ACME Project"

Create either a locally editable,

git init operations/

or Setup a GIT bare repository.


You can also use the config file to setup Wiki options and environment,

cd ~/
vi gollum.gitrepo.rb

wiki_options = {
  :live_preview => false,
  :allow_uploads => true,
  :allow_editing => true,
  :h1_title => true,
  :universal_toc => true

Precious::App.set(:wiki_options, wiki_options)

Precious::App.set(:environment, :production)



as user on a workstation

as gollum on a server or container (possibly with matching UID with the docker host)

Eventually make some handy symlinks,

cd ~/
ln -s /var/lib/gems/2.3.0/gems/gollum-4.1.2/config.rb gollum.rb.dist
ln -s /var/lib/gems/2.3.0/gems/gollum-4.1.2

And run it as user,

/usr/local/bin/gollum gitrepo/ --config gollum.rb --adapter rugged
#/usr/local/bin/gollum gitrepo.git/ --bare --config gollum.rb --adapter rugged


Check that you can now access the Markdown GUI,


Everything’s fine? You can now proceed with the reverse-proxy setup.

Also provide some custom script to start it at boot time,

mkdir -p ~/bin/
vi ~/bin/run_gollum

cd $HOME/
/usr/local/bin/gollum $HOME/gitrepo/ --config gollum.gitrepo.rb --adapter rugged > $HOME/gollum.gitrepo.log 2>&1 &

chmod +x ~/bin/run_gollum

sudo vi /etc/rc.local

echo -n starting Gollum as USER_HERE user...
su - USER_HERE -c '$HOME/bin/run_gollum' && echo ok


Editing the documents

You can now edit the documents with your editor of choice + git commit, either locally (workstation) or remotely (normal or bare through ssh).

Make sure you’ve got git available on your workstation and setup your GIT profile (if not already done),

git config --global "your email"
git config --global "your name"

Remote editing

Send your public SSH key (ssh-keygen && cat ~/.ssh/ to user_id_1000@dockerhost access list (~/.ssh/authorized_keys) and try to log into it without a password,

ssh user_id_1000@dockerhost

if that works, you’re ready to maintain the Documentation tru GIT e.g.,

git clone ssh://user_id_1000@dockerhost/data/gollumprod/operations.git/
cd operations/

(edit/add files)

when finished, commit your changes and push to the hosted repository,

#git add or git commit -a
git commit
git push


Home | GitHub | Docker Hub | Donate | Contact