gollum is a free and open-source git-backed wiki. Gollum provides simple wiki system backed by Git repository
1. Prerequisites
2. Supported Operating Systems
This guide supports installation on:
3. Installation
RHEL/CentOS/Rocky Linux/AlmaLinux
# Install EPEL repository if needed
sudo dnf install -y epel-release
# Install gollum
sudo dnf install -y gollum
# Enable and start service
sudo systemctl enable --now gollum
# Configure firewall
sudo firewall-cmd --permanent --add-port=4567/tcp
sudo firewall-cmd --reload
# Verify installation
gollum --version
Debian/Ubuntu
# Update package index
sudo apt update
# Install gollum
sudo apt install -y gollum
# Enable and start service
sudo systemctl enable --now gollum
# Configure firewall
sudo ufw allow 4567
# Verify installation
gollum --version
Arch Linux
# Install gollum
sudo pacman -S gollum
# Enable and start service
sudo systemctl enable --now gollum
# Verify installation
gollum --version
Alpine Linux
# Install gollum
apk add --no-cache gollum
# Enable and start service
rc-update add gollum default
rc-service gollum start
# Verify installation
gollum --version
openSUSE/SLES
# Install gollum
sudo zypper install -y gollum
# Enable and start service
sudo systemctl enable --now gollum
# Configure firewall
sudo firewall-cmd --permanent --add-port=4567/tcp
sudo firewall-cmd --reload
# Verify installation
gollum --version
macOS
# Using Homebrew
brew install gollum
# Start service
brew services start gollum
# Verify installation
gollum --version
FreeBSD
# Using pkg
pkg install gollum
# Enable in rc.conf
echo 'gollum_enable="YES"' >> /etc/rc.conf
# Start service
service gollum start
# Verify installation
gollum --version
Windows
# Using Chocolatey
choco install gollum
# Or using Scoop
scoop install gollum
# Verify installation
gollum --version
Initial Configuration
Basic Configuration
# Create configuration directory
sudo mkdir -p /etc/gollum
# Set up basic configuration
# See official documentation for detailed configuration options
# Test configuration
gollum --version
5. Service Management
systemd (RHEL, Debian, Ubuntu, Arch, openSUSE)
# Enable service
sudo systemctl enable gollum
# Start service
sudo systemctl start gollum
# Stop service
sudo systemctl stop gollum
# Restart service
sudo systemctl restart gollum
# Check status
sudo systemctl status gollum
# View logs
sudo journalctl -u gollum -f
OpenRC (Alpine Linux)
# Enable service
rc-update add gollum default
# Start service
rc-service gollum start
# Stop service
rc-service gollum stop
# Restart service
rc-service gollum restart
# Check status
rc-service gollum status
rc.d (FreeBSD)
# Enable in /etc/rc.conf
echo 'gollum_enable="YES"' >> /etc/rc.conf
# Start service
service gollum start
# Stop service
service gollum stop
# Restart service
service gollum restart
# Check status
service gollum status
launchd (macOS)
# Using Homebrew services
brew services start gollum
brew services stop gollum
brew services restart gollum
# Check status
brew services list | grep gollum
Windows Service Manager
# Start service
net start gollum
# Stop service
net stop gollum
# Using PowerShell
Start-Service gollum
Stop-Service gollum
Restart-Service gollum
# Check status
Get-Service gollum
Advanced Configuration
See the official documentation for advanced configuration options.
Reverse Proxy Setup
nginx Configuration
upstream gollum_backend {
server 127.0.0.1:4567;
}
server {
listen 80;
server_name gollum.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name gollum.example.com;
ssl_certificate /etc/ssl/certs/gollum.example.com.crt;
ssl_certificate_key /etc/ssl/private/gollum.example.com.key;
location / {
proxy_pass http://gollum_backend;
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_set_header X-Forwarded-Proto $scheme;
}
}
Apache Configuration
<VirtualHost *:80>
ServerName gollum.example.com
Redirect permanent / https://gollum.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName gollum.example.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/gollum.example.com.crt
SSLCertificateKeyFile /etc/ssl/private/gollum.example.com.key
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:4567/
ProxyPassReverse / http://127.0.0.1:4567/
</VirtualHost>
HAProxy Configuration
frontend gollum_frontend
bind *:80
bind *:443 ssl crt /etc/ssl/certs/gollum.pem
redirect scheme https if !{ ssl_fc }
default_backend gollum_backend
backend gollum_backend
balance roundrobin
server gollum1 127.0.0.1:4567 check
Security Configuration
Basic Security Setup
# Set appropriate permissions
sudo chown -R gollum:gollum /etc/gollum
sudo chmod 750 /etc/gollum
# Configure firewall
sudo firewall-cmd --permanent --add-port=4567/tcp
sudo firewall-cmd --reload
# Enable SELinux policies (if applicable)
sudo setsebool -P httpd_can_network_connect on
Database Setup
See official documentation for database configuration requirements.
Performance Optimization
System Tuning
# Basic system tuning
echo 'net.core.somaxconn = 65535' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_max_syn_backlog = 65535' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Monitoring
Basic Monitoring
# Check service status
sudo systemctl status gollum
# View logs
sudo journalctl -u gollum -f
# Monitor resource usage
top -p $(pgrep gollum)
9. Backup and Restore
Backup Script
#!/bin/bash
# Basic backup script
BACKUP_DIR="/backup/gollum"
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/gollum-backup-$DATE.tar.gz" /etc/gollum /var/lib/gollum
echo "Backup completed: $BACKUP_DIR/gollum-backup-$DATE.tar.gz"
Restore Procedure
# Stop service
sudo systemctl stop gollum
# Restore from backup
tar -xzf /backup/gollum/gollum-backup-*.tar.gz -C /
# Start service
sudo systemctl start gollum
6. Troubleshooting
Common Issues
1. Service won't start:
# Check logs
sudo journalctl -u gollum -n 100
sudo tail -f /var/log/gollum/gollum.log
# Check configuration
gollum --version
# Check permissions
ls -la /etc/gollum
2. Connection issues:
# Check if service is listening
sudo ss -tlnp | grep 4567
# Test connectivity
telnet localhost 4567
# Check firewall
sudo firewall-cmd --list-all
3. Performance issues:
# Check resource usage
top -p $(pgrep gollum)
# Check disk I/O
iotop -p $(pgrep gollum)
# Check connections
ss -an | grep 4567
Integration Examples
Docker Compose Example
version: '3.8'
services:
gollum:
image: gollum:latest
ports:
- "4567:4567"
volumes:
- ./config:/etc/gollum
- ./data:/var/lib/gollum
restart: unless-stopped
Maintenance
Update Procedures
# RHEL/CentOS/Rocky/AlmaLinux
sudo dnf update gollum
# Debian/Ubuntu
sudo apt update && sudo apt upgrade gollum
# Arch Linux
sudo pacman -Syu gollum
# Alpine Linux
apk update && apk upgrade gollum
# openSUSE
sudo zypper update gollum
# FreeBSD
pkg update && pkg upgrade gollum
# Always backup before updates
tar -czf /backup/gollum-pre-update-$(date +%Y%m%d).tar.gz /etc/gollum
# Restart after updates
sudo systemctl restart gollum
Regular Maintenance
# Log rotation
sudo logrotate -f /etc/logrotate.d/gollum
# Clean old logs
find /var/log/gollum -name "*.log" -mtime +30 -delete
# Check disk usage
du -sh /var/lib/gollum
Additional Resources
---
Note: This guide is part of the HowToMgr collection. Always refer to official documentation for the most up-to-date information.