Skip to content

Install Gruxi with Docker

Gruxi uses a slim Alpine-based image and runs as a non-root user for security. You can use ghcr.io/daevtech/gruxi:latest for the latest release. To pin a specific version, use a version tag such as ghcr.io/daevtech/gruxi:0.3.

Docker without persistence

  1. Install Docker - Make sure Docker is installed on your system.
  2. Run Gruxi in Docker
sh
docker run --name gruxi1 -p 80:80 -p 443:443 -p 8000:8000 -d ghcr.io/daevtech/gruxi:latest
  1. Verify - Open http://localhost to see the default Gruxi page.
  2. Configure - Open https://localhost:8000 and log in with the user admin and the password printed to the server output on first run. Save it, as it will not be shown again.

Docker with persistence

  1. Install Docker - Make sure Docker is installed on your system.
  2. Run Gruxi in Docker
sh
docker run --name gruxi1 -p 80:80 -p 443:443 -p 8000:8000 \
-v ./my-web-content:/app/www-default:ro \
-v ./logs:/app/logs \
-v ./certs:/app/certs \
-v ./db:/app/db \
-d ghcr.io/daevtech/gruxi:latest
  1. Verify - Open http://localhost to see your content from ./my-web-content.
  2. Configure - Open https://localhost:8000 and log in with the user admin and the password printed to the server output on first run. Save it, as it will not be shown again.

Docker Compose

When running infrastructure in Docker with more than one container, you will usually want Docker Compose. The distinction is primarily about orchestration, repeatability, and operational clarity.

  1. Download docker-compose.yml

Download the docker-compose.yml from the Gruxi GitHub repository root and adjust it for your needs.

  1. Run with Docker Compose
sh
docker compose up -d

Run this in the same directory as the docker-compose.yml file.

  1. Example docker-compose.yml
yaml
services:
  gruxi:
    image: ghcr.io/daevtech/gruxi:latest
    ports:
      - "80:80"     # HTTP
      - "443:443"   # HTTPS
      - "8000:8000" # Admin/API port
    volumes:
      # Mount project directories for development
      - ./db:/app/db
      - ./logs:/app/logs
      - ./certs:/app/certs
#      - ./www-default:/app/www-default
    restart: unless-stopped
    depends_on:
      - php-fpm
    networks:
      - gruxi-network

  # PHP-FPM service for handling PHP requests
  php-fpm:
    image: php:8.2-fpm-alpine
#    volumes:
#      - ./www-default:/var/www/html:ro # Web content accessible to PHP-FPM
    ports:
      - "9000:9000"
    restart: unless-stopped
    networks:
      - gruxi-network

networks:
  gruxi-network:
    driver: bridge

This provides persistent storage for the database, logs, and certificates.

To serve your own content, mount a volume to /app/www-default in the Gruxi container (and in the PHP container if you are serving PHP content), as shown in the example.

Next step

You now have a working Gruxi instance running on your system or server.

Next, learn how to configure Gruxi.