This guide covers multiple installation methods to get GlinrDock running on your system, from quick Docker setups to production-ready systemd services.
- Prerequisites
- Installation Methods
- Configuration
- Security Hardening
- Verification
- Troubleshooting
- Uninstallation
- OS: Linux (Ubuntu 20.04+, CentOS 8+, RHEL 8+, Debian 11+)
- Architecture: x86_64 or ARM64
- RAM: 512MB minimum, 2GB recommended
- Storage: 1GB minimum, 10GB+ recommended
- Network: Port 8080 available
- Docker Engine 20.10+ (required)
- curl or wget (for installation)
- systemd (for service management)
If Docker isn't installed:
# Ubuntu/Debian
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
# CentOS/RHEL/Rocky
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl enable --now dockerRecommended for most users. This script automatically detects your system architecture, downloads the latest release, and sets up a systemd service.
# Install as root (recommended)
curl -fsSL https://github.com/glinr/glinrdock/releases/latest/download/install.sh | sudo bash
# Or download and inspect first
curl -fsSL https://github.com/glinr/glinrdock/releases/latest/download/install.sh -o install.sh
chmod +x install.sh
sudo ./install.shWhat the script does:
- Detects OS and architecture
- Creates
glinrdockuser and group - Downloads and verifies binary checksum
- Creates systemd service file
- Generates admin token
- Starts the service
Script Options:
# Custom installation directory
sudo GLINRDOCK_HOME=/opt/glinrdock ./install.sh
# Skip systemd service creation
sudo ./install.sh --no-systemd
# Set custom admin token
sudo ADMIN_TOKEN=your-secure-token ./install.sh
# Dry run mode (shows what would be done)
DRY_RUN=true ./install.shPerfect for development or containerized deployments. Uses official images with persistent volumes.
# Download the compose file
curl -fsSL https://raw.githubusercontent.com/glinr/glinrdock/main/deploy/docker-compose.yml -o docker-compose.yml
# Start services
docker-compose up -d# Download full deployment configuration
curl -fsSL https://raw.githubusercontent.com/glinr/glinrdock/main/deploy/docker-compose.yml -o docker-compose.yml
curl -fsSL https://raw.githubusercontent.com/glinr/glinrdock/main/deploy/Caddyfile -o Caddyfile
curl -fsSL https://raw.githubusercontent.com/glinr/glinrdock/main/deploy/.env.example -o .env
# Edit environment variables
nano .env
# Deploy with reverse proxy
docker-compose --profile production up -d- default - Basic GlinrDock only
- nginx - With nginx reverse proxy
- caddy - With Caddy reverse proxy (automatic HTTPS)
- monitoring - Includes Prometheus metrics
- production - Full production stack
For custom setups or when you need full control.
# Create system user
sudo useradd --system --user-group --home-dir /var/lib/glinrdock --shell /bin/false glinrdock
# Create directories
sudo mkdir -p /var/lib/glinrdock/{data,logs}
sudo mkdir -p /etc/glinrdock
sudo chown -R glinrdock:glinrdock /var/lib/glinrdock# Detect architecture
ARCH=$(dpkg --print-architecture 2>/dev/null || uname -m | sed 's/x86_64/amd64/')
VERSION=$(curl -s https://api.github.com/repos/glinr/glinrdock/releases/latest | grep '"tag_name"' | cut -d'"' -f4)
# Download binary
sudo wget https://github.com/glinr/glinrdock/releases/download/${VERSION}/glinrdockd-linux-${ARCH} \
-O /usr/local/bin/glinrdockd
# Make executable
sudo chmod +x /usr/local/bin/glinrdockd
sudo chown root:root /usr/local/bin/glinrdockdsudo tee /etc/glinrdock/glinrdock.conf > /dev/null << 'EOF'
# GlinrDock Configuration
GLINRDOCK_DATA_DIR=/var/lib/glinrdock/data
GLINRDOCK_LOG_LEVEL=info
GLINRDOCK_BIND_ADDR=0.0.0.0:8080
ADMIN_TOKEN=your-secure-admin-token-change-this
EOF
# Secure the config file
sudo chown root:glinrdock /etc/glinrdock/glinrdock.conf
sudo chmod 640 /etc/glinrdock/glinrdock.confsudo tee /etc/systemd/system/glinrdock.service > /dev/null << 'EOF'
[Unit]
Description=GlinrDock Container Management Platform
Documentation=https://github.com/glinr/glinrdock
After=network.target docker.service
Wants=docker.service
[Service]
Type=exec
User=glinrdock
Group=glinrdock
EnvironmentFile=/etc/glinrdock/glinrdock.conf
ExecStart=/usr/local/bin/glinrdockd
Restart=always
RestartSec=3
StandardOutput=journal
StandardError=journal
SyslogIdentifier=glinrdock
# Security settings
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
ProtectSystem=strict
ReadWritePaths=/var/lib/glinrdock
[Install]
WantedBy=multi-user.target
EOF
# Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable --now glinrdock.serviceFor running without root privileges on the Docker daemon.
# Install rootless Docker (if not already done)
curl -fsSL https://get.docker.com/rootless | sh
# Add to PATH
echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc
export PATH=$HOME/bin:$PATH
# Start rootless Docker
systemctl --user enable --now docker# Create user directories
mkdir -p ~/.local/share/glinrdock/{data,logs}
mkdir -p ~/.config/glinrdock
# Download binary
ARCH=$(uname -m | sed 's/x86_64/amd64/')
VERSION=$(curl -s https://api.github.com/repos/glinr/glinrdock/releases/latest | grep '"tag_name"' | cut -d'"' -f4)
wget https://github.com/glinr/glinrdock/releases/download/${VERSION}/glinrdockd-linux-${ARCH} \
-O ~/.local/bin/glinrdockd
chmod +x ~/.local/bin/glinrdockd# Create user systemd service
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/glinrdock.service << 'EOF'
[Unit]
Description=GlinrDock Container Management Platform (User)
After=docker.service
Wants=docker.service
[Service]
Type=exec
Environment=DOCKER_HOST=unix://%i/run/user/%i/docker.sock
Environment=GLINRDOCK_DATA_DIR=%h/.local/share/glinrdock/data
Environment=ADMIN_TOKEN=your-secure-admin-token
ExecStart=%h/.local/bin/glinrdockd
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
EOF
# Enable user service
systemctl --user daemon-reload
systemctl --user enable --now glinrdock.service| Variable | Default | Description |
|---|---|---|
GLINRDOCK_BIND_ADDR |
0.0.0.0:8080 |
Bind address and port |
GLINRDOCK_DATA_DIR |
/var/lib/glinrdock/data |
Data directory |
GLINRDOCK_LOG_LEVEL |
info |
Log level (debug, info, warn, error) |
ADMIN_TOKEN |
required | Admin authentication token |
WEBHOOK_SECRET |
optional | HMAC secret for webhook validation |
DOCKER_HOST |
auto-detected | Docker daemon socket |
GLINRDOCK_CORS_ORIGINS |
none | Allowed CORS origins (comma-separated) |
Create /etc/glinrdock/glinrdock.conf:
# Core settings
GLINRDOCK_BIND_ADDR=0.0.0.0:8080
GLINRDOCK_DATA_DIR=/var/lib/glinrdock/data
GLINRDOCK_LOG_LEVEL=info
# Authentication
ADMIN_TOKEN=your-secure-token-min-32-chars
# Docker settings
DOCKER_HOST=unix:///var/run/docker.sock
# Optional: Webhook validation
WEBHOOK_SECRET=your-webhook-secret
# Optional: CORS for development
# GLINRDOCK_CORS_ORIGINS=http://localhost:3000,https://yourdomain.com# Use firewall to restrict access
sudo ufw allow from 10.0.0.0/8 to any port 8080 # Internal networks only
sudo ufw deny 8080 # Block external access
# Or use nginx/caddy reverse proxy with SSL# Create docker group for GlinrDock
sudo usermod -aG docker glinrdock
# Set socket permissions (if needed)
sudo chmod 660 /var/run/docker.sock# Secure data directory
sudo chmod 750 /var/lib/glinrdock
sudo chmod 640 /etc/glinrdock/glinrdock.conf# Generate secure admin token
ADMIN_TOKEN=$(openssl rand -hex 32)
echo "Your admin token: $ADMIN_TOKEN"
# Store securely and update configuration
sudo sed -i "s/ADMIN_TOKEN=.*/ADMIN_TOKEN=$ADMIN_TOKEN/" /etc/glinrdock/glinrdock.conf# Verify binary
glinrdockd --version
# Check systemd service
sudo systemctl status glinrdock.service
# View logs
sudo journalctl -u glinrdock.service -f# Test health endpoint
curl http://localhost:8080/health
# Test authenticated endpoint (replace TOKEN)
curl -H "Authorization: Bearer YOUR_ADMIN_TOKEN" http://localhost:8080/v1/infoOpen http://localhost:8080 in your browser and log in with your admin token.
# Check logs
sudo journalctl -u glinrdock.service --no-pager
# Common causes:
# 1. Docker not running: sudo systemctl start docker
# 2. Port already in use: sudo netstat -tlnp | grep :8080
# 3. Permission issues: Check /var/lib/glinrdock ownership# Check Docker socket
sudo ls -la /var/run/docker.sock
# Add user to docker group
sudo usermod -aG docker glinrdock
sudo systemctl restart glinrdock.service# Fix data directory permissions
sudo chown -R glinrdock:glinrdock /var/lib/glinrdock
sudo chmod 750 /var/lib/glinrdock# Verify admin token in config
sudo cat /etc/glinrdock/glinrdock.conf | grep ADMIN_TOKEN
# Test with correct token
curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8080/v1/info# Enable debug logging
sudo sed -i 's/GLINRDOCK_LOG_LEVEL=info/GLINRDOCK_LOG_LEVEL=debug/' /etc/glinrdock/glinrdock.conf
sudo systemctl restart glinrdock.service
# View debug logs
sudo journalctl -u glinrdock.service -f# Stop and disable service
sudo systemctl stop glinrdock.service
sudo systemctl disable glinrdock.service
# Remove files
sudo rm -f /etc/systemd/system/glinrdock.service
sudo rm -f /usr/local/bin/glinrdockd
sudo rm -rf /etc/glinrdock
sudo rm -rf /var/lib/glinrdock
# Remove user
sudo userdel glinrdock
# Reload systemd
sudo systemctl daemon-reload# Stop services and remove volumes
docker-compose down -v
# Remove images (optional)
docker rmi ghcr.io/glinr/glinrdock:latest- 📖 Quick Start Guide - Deploy your first container
- 🔐 Security Guide - Production security practices
- 🔧 Troubleshooting - Common issues and solutions
- 📚 API Documentation - REST API reference
Need help? Check our troubleshooting guide or open an issue.