From 4459a858e49de0358e8901b49b9c4777fed40dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Sat, 1 Aug 2026 05:19:33 +0200 Subject: [PATCH] Add initial configuration files for Dockhand setup - Create .env.example for environment variable configuration - Update README.md with setup instructions and usage details - Add docker-compose configuration for socket-proxy and dockhand services --- .env.example | 3 +++ README.md | 45 +++++++++++++++++++++++++++++++++++++++++++-- compose.yaml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 .env.example create mode 100644 compose.yaml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..6db27f6 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +# Generate a 32-byte (256-bit) random key encoded as base64: +# openssl rand -base64 32 +DOCKHAND_ENCRYPTION_KEY= \ No newline at end of file diff --git a/README.md b/README.md index a043f49..63a7a6b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,44 @@ -# homeserver +# Artemis -My homeserver \ No newline at end of file +My home server + +## Requirements + +```bash +# Install docker +paru -S docker docker-compose + +# Create the directory on the host +sudo mkdir -p /opt/dockhand +sudo chown 1000:1000 /opt/dockhand + +# Create 32-byte (256-bit) random key for Dockhand and add it to .env file +openssl rand -base64 32 + +# Create .env file +cp .env.example .env +``` + +## Usage + +```bash +# Start the containers +docker compose up -d + +# Stop the containers +docker compose down +``` + +## Access + +```bash +# Open the dashboard in your browser +http://localhost:3000 + +# Go to Settings > Environments: +# - Add a new environment or edit the default one +# - Set connection type to Direct +# - Set the host to socket:proxy:2375 +# - Save the environment + +``` diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..40fb9a3 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,51 @@ +services: + socket-proxy: + image: ghcr.io/tecnativa/docker-socket-proxy@sha256:1f5038b54f06c3e18422902cf00ba21803d1c97805aae032e5e6673d532d3459 + container_name: socket_proxy + restart: unless-stopped + environment: + # Required for Dockhand core functionality + - CONTAINERS=1 + - IMAGES=1 + - NETWORKS=1 + - VOLUMES=1 + - EVENTS=1 + - POST=1 + - DELETE=1 + # Required for dashboard host info and disk usage + - INFO=1 + - SYSTEM=1 + # Required for vulnerability scanning + - ALLOW_START=1 + - ALLOW_STOP=1 + - ALLOW_RESTARTS=1 + # Optional: enable for the container terminal, volume browsing, + # and the in-container file browser (all use the Docker exec API) + - EXEC=1 + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + networks: + - socket_proxy + + dockhand: + image: fnsys/dockhand:latest + container_name: dockhand + restart: unless-stopped + user: "1000:1000" + depends_on: + - socket_proxy + ports: + - "3000:3000" + volumes: + - /opt/dockhand:/opt/dockhand + environment: + - DATA_DIR=/opt/dockhand + - ENCRYPTION_KEY=${DOCKHAND_ENCRYPTION_KEY?Add encryption key to .env file} + - EXPORT_METRICS=true + networks: + - socket_proxy + - default + +networks: + socket_proxy: + internal: true \ No newline at end of file