🖱️ Usability & Operational Notes

A guide for interacting with the Hardened Hub and exposing external services.

🔑 Authentication (SSO)

Critical core services and protected user applications are shielded by Authelia.

  1. Access a protected URL (e.g., https://portainer.arch-services.mywire.org).
  2. You will be redirected to the Auth Portal (https://auth.arch-services.mywire.org).
  3. Log in with your credentials.
  4. Once authenticated, you obtain global session access to all SSO-protected services.

🛠️ Core Infrastructure Management

Deploy the control plane stacks and homepage directly using the host scripts:

# Start the Control Plane + Homepage Portal
./up.sh

# Stop all Core services
./down.sh

➕ Exposing a New Service (Decoupled Model)

User applications are fully decoupled from the core repository and managed in their own directories (e.g., /home/kiskaadee/deployments/my-app). We use Traefik labels to expose them under the *.arch-services.mywire.org wildcard domain.

Depending on your security and access needs, you can configure your stack for one of two scenarios:

🔓 Scenario A: Public / Direct Access

Use this for applications that have their own built-in authentication (e.g., Jellyfin, Gitea) or public-facing projects (e.g., public web demos, portfolios).

🔒 Scenario B: SSO-Protected

Use this for administrative tools, private databases, or custom internal apps that do not have native authentication and need to be secured behind Authelia.


Scenario A: Public / Direct Access (Bypassing Authelia)

This configuration exposes your service directly to the internet. Authelia is bypassed, allowing anyone (or the app's own login manager) to handle access.

services:
  my-public-app:
    image: my-app-image:latest
    container_name: my-public-app
    networks:
      - proxy-net
    labels:
      - "traefik.enable=true"
      
      # 1. Main HTTPS Route Rule
      - "traefik.http.routers.public-app.rule=Host(`demo.arch-services.mywire.org`)"
      - "traefik.http.routers.public-app.entrypoints=websecure"
      - "traefik.http.routers.public-app.tls=true"
      - "traefik.http.routers.public-app.service=public-app-svc"

      # 2. HTTP to HTTPS Redirection Route
      - "traefik.http.routers.public-app-red.rule=Host(`demo.arch-services.mywire.org`)"
      - "traefik.http.routers.public-app-red.entrypoints=web"
      - "traefik.http.routers.public-app-red.middlewares=https-redirect@docker"

      # 3. Port Mapping (Target port inside the container)
      - "traefik.http.services.public-app-svc.loadbalancer.server.port=8080"

networks:
  proxy-net:
    external: true

Scenario B: SSO-Protected (Secured by Authelia)

This configuration intercepts all incoming requests and redirects unauthenticated users to the Authelia portal first. Once logged in, users are returned to the service.

services:
  my-secure-app:
    image: my-app-image:latest
    container_name: my-secure-app
    networks:
      - proxy-net
    labels:
      - "traefik.enable=true"
      
      # 1. Main HTTPS Route Rule
      - "traefik.http.routers.secure-app.rule=Host(`admin.arch-services.mywire.org`)"
      - "traefik.http.routers.secure-app.entrypoints=websecure"
      - "traefik.http.routers.secure-app.tls=true"
      - "traefik.http.routers.secure-app.service=secure-app-svc"

      # 2. SSO Authentication Middleware (Crucial Line)
      - "traefik.http.routers.secure-app.middlewares=authelia-auth@docker"

      # 3. HTTP to HTTPS Redirection Route
      - "traefik.http.routers.secure-app-red.rule=Host(`admin.arch-services.mywire.org`)"
      - "traefik.http.routers.secure-app-red.entrypoints=web"
      - "traefik.http.routers.secure-app-red.middlewares=https-redirect@docker"

      # 4. Port Mapping (Target port inside the container)
      - "traefik.http.services.secure-app-svc.loadbalancer.server.port=3000"

networks:
  proxy-net:
    external: true

3. Register in Homepage Dashboard

To list your new service on the central dashboard, update homepage/config/services.yaml inside the core repository:

- User Applications:
    - My Application:
        icon: custom-app-icon
        href: https://my-app.arch-services.mywire.org
        description: Custom exposed app description
        server: my-docker
        container: my-app # Must match container_name exactly