pollux/dist/config.toml
Jeena ea8083fe1f Implement dual host configuration: bind_host and hostname
- Replace 'host' config with separate 'bind_host' and 'hostname'
- bind_host: IP/interface for server binding (default 0.0.0.0)
- hostname: Domain for URI validation (required)
- Update all parsing and validation code
- Create dist/ directory with systemd service, config, and install guide
- Add comprehensive INSTALL.md with setup instructions
2026-01-16 12:46:27 +00:00

68 lines
No EOL
2.6 KiB
TOML

# Pollux Gemini Server Configuration
#
# This is an example configuration file for the Pollux Gemini server.
# Copy this file to /etc/pollux/config.toml and customize the values below.
#
# The Gemini protocol is specified in RFC 1436: https://tools.ietf.org/rfc/rfc1436.txt
# Directory containing your Gemini files (.gmi, .txt, images, etc.)
# The server will serve files from this directory and its subdirectories.
# Default index file is 'index.gmi' for directory requests.
#
# IMPORTANT: The server needs READ access to this directory.
# Make sure the service user (gemini) can read all files here.
root = "/var/www/example.com"
# TLS certificate and private key files
# These files are required for TLS encryption (Gemini requires TLS).
#
# For Let's Encrypt certificates (recommended for production):
# cert = "/etc/letsencrypt/live/example.com/fullchain.pem"
# key = "/etc/letsencrypt/live/example.com/privkey.pem"
#
# To obtain Let's Encrypt certs:
# sudo certbot certonly --standalone -d example.com
#
# For development/testing, generate self-signed certs:
# openssl req -x509 -newkey rsa:4096 -keyout /etc/pollux/key.pem -out /etc/pollux/cert.pem -days 365 -nodes -subj "/CN=example.com"
cert = "/etc/letsencrypt/live/example.com/fullchain.pem"
key = "/etc/letsencrypt/live/example.com/privkey.pem"
# Server network configuration
#
# bind_host: IP address or interface to bind the server to
# - "0.0.0.0" = listen on all interfaces (default)
# - "127.0.0.1" = localhost only
# - "::" = IPv6 all interfaces
# - Specific IP = bind to that address only
bind_host = "0.0.0.0"
# hostname: Domain name for URI validation
# - Used to validate incoming gemini:// URIs
# - Clients must use: gemini://yourdomain.com
# - Server validates that requests match this hostname
hostname = "example.com"
# port: TCP port to listen on
# - Default Gemini port is 1965
# - Ports below 1024 require root privileges
# - Choose a different port if 1965 is in use
port = 1965
# Request limiting
#
# max_concurrent_requests: Maximum number of simultaneous connections
# - Prevents server overload and DoS attacks
# - Set to 0 to disable limiting (not recommended)
# - Typical values: 100-10000 depending on server capacity
max_concurrent_requests = 1000
# Logging configuration
#
# log_level: Controls how much information is logged
# - "error": Only errors that prevent normal operation
# - "warn": Errors plus warnings about unusual conditions
# - "info": General operational information (recommended)
# - "debug": Detailed debugging information
# - "trace": Very verbose debugging (use only for troubleshooting)
log_level = "info"