This guide will explain installation of Gollum Wiki on Ubuntu 18.04 LTS. Gollum is an open source simple wiki system built on top of Git. Wiki contents are stored in Git repository as text files and can be organized into directories. Gollum work with all recognized file formats including images, PDFs and headers/footers.

Gollum pages may be written in a variety of markup languages and can be edited from the built-in web interface, your text editor or IDE. There is also support for advanced functionalities like macros, UML diagrams, metadata, and more.

Install Gollum Wiki on Ubuntu 18.04

This section will discuss the steps of installing Gollum Wiki on Ubuntu 18.04. We will start by installing dependencies required, and later build and configure Gollum Wiki on Ubuntu 18.04.

Step 1: Install Gollum & Dependencies

We need all dependencies installed. Run below commands to install them.

sudo apt update
sudo apt install -y ruby ruby-dev make zlib1g-dev libicu-dev build-essential git asciidoc cmake

Gollum in written in Ruby and a number of Ruby gems are required. Let’s ensure the basic are installed.

sudo gem install gollum \
org-ruby \
omnigollum \
github-markup \

All Gollum markups are rendered by the github-markup gem, but you can easily add support for other markups by additional installation. Example:


sudo gem install wikicloth


sudo gem install RedCloth

GitHub Flavored Markdown:

sudo gem install github-markdown

Step 2: Setting up Gollum Git repository

After the initial installation, Gollum requires a git repository to be pointed at to work. Let’s first add a dedicated user to access that repository.

$ sudo adduser --shell /bin/bash --gecos 'Gollum application' gollum
Adding user gollum' ... Adding new groupgollum' (1001) …
Adding new user gollum' (1001) with groupgollum' …
Creating home directory /home/gollum' ... Copying files from/etc/skel' …
Enter new UNIX password: <Enter Password>
Retype new UNIX password: <Retype Password>
passwd: password updated successfully

Switch to gollum user and configure Git username and email address.

sudo su - gollum
git config --global "John Doe"
git config --global "[email protected]"

Create wiki directory and initialize it.

$ mkdir wiki && cd wiki
$ git init .
Initialized empty Git repository in /home/gollum/wiki/.git/

Step 3: Configure Gollum Systemd service

We’ll be setting up Gollum to start as a systemd service when the server starts. This will allow us to control its start/stop/restart when we need to shut it down (e.g. on upgrades).

Create Gollum configurations directory

sudo mkdir /etc/gollum/
Add configuration template.
$ cat<<EOF | sudo tee /etc/gollum/config.rb
This file can be used to (e.g.):
- alter certain inner parts of Gollum,
- extend it with your stuff.

It is especially useful for customizing supported formats/markups. For more information and examples:


# enter your Ruby code here ...

Create a new Gollum systemd unit file.

$ cat<<EOF | sudo tee /etc/systemd/system/gollum.service
Description=Gollum wiki server

ExecStart=/usr/local/bin/gollum --live-preview --config "/etc/gollum/config.rb"


Reload systemd configuration

sudo systemctl daemon-reload

Start and enable the service to start at boot.

sudo systemctl start gollum.service
sudo systemctl enable gollum.service

Check service status, it should show running.

$ systemctl status gollum
gollum.service - Gollum wiki server
Loaded: loaded (/etc/systemd/system/gollum.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-03-16 10:08:45 PDT; 9s ago
Main PID: 4527 (gollum)
Tasks: 2 (limit: 1110)
CGroup: /system.slice/gollum.service
`-4527 /usr/bin/ruby2.5 /usr/local/bin/gollum --live-preview --config /etc/gollum/config.rb
Mar 16 10:08:45 ubuntu-01 systemd[1]: Started Gollum wiki server.
Mar 16 10:08:46 ubuntu-01 gollum[4527]: [2019-03-16 10:08:46] INFO WEBrick 1.4.2
Mar 16 10:08:46 ubuntu-01 gollum[4527]: [2019-03-16 10:08:46] INFO ruby 2.5.1 (2018-03-29) [x86_64-linux-gnu]
Mar 16 10:08:46 ubuntu-01 gollum[4527]: == Sinatra (v1.4.8) has taken the stage on 4567 for development with backup from WEBrick
Mar 16 10:08:46 ubuntu-01 gollum[4527]: [2019-03-16 10:08:46] INFO WEBrick::HTTPServer#start: pid=4527 port=4567

Gollum runs on TCP port

$ ss -tunelp | grep 4567
tcp LISTEN 0 128* users:(("gollum",pid=4527,fd=7)) uid:1001 ino:63478 sk:5 <->

Web dashboard can be accessed on Server IP address and port 4567.

install gollum ubuntu 18.04

Step 4: Configure Nginx proxy

The default setting is to expose Gollum web console on server IP address. If you want to access it via domain name, you’ll need to configure Nginx.

Install nginx web server on Ubuntu 18.04

sudo apt -y install nginx

Once installed, add nginx configuration.

sudo vim /etc/nginx/conf.d/gollum.conf

Modify below data and add it to the file.

server {
    listen 80;

    location / {
        proxy_pass    ;
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_connect_timeout   150;
        proxy_send_timeout      100;
        proxy_read_timeout      100;
        proxy_buffers           4 32k;
        client_max_body_size    500m;
        client_body_buffer_size 128k;
    access_log  /var/log/nginx/gollum-access.log;
    error_log   /var/log/nginx/gollum-error.log;


Replace with your domain name and validate Nginx configurations.

$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Restart nginx to load new configuration file.

sudo systemctl restart nginx

For SSL configuration. refer to configuration file below.

server {
    listen 443 ssl http2;

    location / {
        proxy_pass    ;
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_connect_timeout   150;
        proxy_send_timeout      100;
        proxy_read_timeout      100;
        proxy_buffers           4 32k;
        client_max_body_size    500m;
        client_body_buffer_size 128k;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/;
    ssl_certificate_key /etc/letsencrypt/live/; 

    ssl_session_timeout 5m;
    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers on;

    access_log  /var/log/nginx/gollum-access.log;
    error_log   /var/log/nginx/gollum-error.log;


server {
    listen      80;

    add_header Strict-Transport-Security max-age=2592000;
    rewrite ^ https://$server_name$request_uri? permanent;


  • is your domain name for Wiki
  • /etc/letsencrypt/live/ is a path to your SSL certificate.
  • /etc/letsencrypt/live/ is the path to SSL private key.
  • The above configurationn will redirect all http traffic to https.

Our next guide will cover how to configure Authentication for Gollum Wiki pages.

Other Wiki installation guides:

How to Install Wiki.js on Ubuntu 18.04 / CentOS 7

How to Install DokuWiki on Ubuntu 18.04 with Nginx and Letsencrypt

Install Dokuwiki with Nginx and Letsencrypt SSL on CentOS 7

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here