Guacamole Setup Guide - ajgillis04/GillisDockerDepot GitHub Wiki

Guacamole Setup Guide

Introduction

Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH and allows you to access your desktop from a web browser.

Prerequisites

  • Docker installed
  • Guacamole container running in your Docker stack

Recommended Pre-Setup

Before setting up Sonarr, consider deploying the following containers first to simplify integration and avoid jumping between configuration steps:

  • MariaDB (For selfhosting databases)
  • Guacd (Guacamole proxy daemon)

Guacamole Default User

The official guacamole/guacamole Docker container runs with:

  • User ID (uid): 1001
  • Group ID (gid): 1001

Steps to Configure Persistent Volumes

To enable persistent storage for the Guacamole container, map host directories to the container, adjust ownership, and set proper permissions.

Volume Mappings in guacamole.yaml

volumes:
  - ${DOCKERDIR}/guacamole/etc:/etc/guacamole
  - ${DOCKERDIR}/guacamole/home:/home/guacamole
  - ${DOCKERDIR}/logs/guacamole:/var/log

Host Directory Setup

  1. Create Host Directories:

    mkdir -p ${DOCKERDIR}/guacamole/etc
    mkdir -p ${DOCKERDIR}/guacamole/home
    mkdir -p ${DOCKERDIR}/logs/guacamole
    
  2. Set Directory Ownership: Update ownership to match the container's user (1001:1001):

    sudo chown -R 1001:administrators ${DOCKERDIR}/guacamole/etc
    sudo chown -R 1001:administrators ${DOCKERDIR}/guacamole/home
    sudo chown -R 1001:administrators ${DOCKERDIR}/logs/guacamole
    
  3. Set Directory Permissions: Ensure proper read, write, and execute access:

    sudo chmod -R 770 ${DOCKERDIR}/guacamole/etc
    sudo chmod -R 770 ${DOCKERDIR}/guacamole/home
    sudo chmod -R 770 ${DOCKERDIR}/logs/guacamole
    

Configuration Steps

Step 1: Setting up MariaDB

  1. Ensure a user 'guacamole' is created in MariaDB.

  2. Create a database for 'guacamole' with appropriate permissions.

  3. Use the following SQL commands:
    < * Hint: ⚠️ It is not recommend you use ! in your password

    docker exec -it mariadb.${HOST_NAME} /usr/bin/mariadb -u root -p
    CREATE DATABASE guacamole;
    CREATE USER 'guac_user'@'%' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON guacamole.* TO 'guac_user'@'%';
    FLUSH PRIVILEGES;
    quit;
    
    docker cp /path/to/scripts/guac_initdb.sql mariadb.${HOST_NAME}:/guac_initdb.sql
    docker exec -i mariadb.${HOST_NAME} bash -c "/usr/bin/mariadb -u guac_user -p'YOURPASSWORD' guacamole < /guac_initdb.sql"
    docker restart guacamole.<Host_Name>
    
    

Step 2: Accessing the Guacamole UI

  1. Open your browser and navigate to http://<your-ip-address>:8080/guacamole.
  2. Log in with the default credentials (guacadmin / guacadmin).

Step 3: Create new Admin Account and disable guacadmin

  1. Navigate to the Users tab.

  2. Select New User, and fill in all the required info. Ensure you select all permissions, Save
    < * Note: ⚠️ Create all other users you require. Best practice is to give them minimal permissions.

    guacamole newuser

  3. Logoff, and Login as the new Admin user, Settings, Users, Select guacadmin, and enable Login Disabled, Save

    guacamole disableuser

Step 4: Configuring Connections

  1. Navigate to the Connections tab.

  2. Click New Connection.

  3. Configure the connection settings:

    • Name: Give your connection a meaningful name.
    • Protocol: Choose the protocol (VNC, RDP, SSH).
    • Parameters: Enter the necessary parameters (hostname, port, username, password).

    Linux:

    guacamole newconnectionlinux

    Windows:

    guacamole newconnectionwindows

  4. Click Save.

Step 5: Assigning Connections to Users

  1. Go to the Users tab.

  2. Click on the user you want to assign connections to.

  3. At the bottom of the page choose All Connections, and enable which the clients you wish

  4. Click Save.

    guacamole assignconnections

Step 5: Customizing Settings

  1. Navigate to the Settings tab.
  2. Customize global settings according to your preferences (e.g., theme, language).
  3. Click Save.
⚠️ **GitHub.com Fallback** ⚠️