What I use Unraid for: Self hosting OpenClaw

OpenClaw is an agentic AI framework — basically it lets you run and orchestrate AI agents on your own infrastructure. I have been running it as a Docker container on Unraid and it works pretty well. As with most things I self host, I wanted to get it behind an Apache2 reverse proxy with a proper domain and SSL certificate.

Getting the basic proxy working wasn’t too bad, but the GUI kept showing a broken WebSocket connection — specifically it was trying to connect to wss:// and failing. The problem is that OpenClaw’s gateway is fundamentally WebSocket based, and a standard ProxyPass setup just silently drops the WebSocket upgrade handshake and the whole thing falls apart.

The fix is to use mod_proxy_wstunnel and mod_rewrite together to detect the Upgrade: websocket header and route those connections differently to normal HTTP traffic. You also need to tell OpenClaw itself to trust your proxy’s IP in its gateway config, otherwise it will throw 1008 unauthorised errors on the WebSocket connections.

First make sure you have the required modules enabled:

a2enmod proxy proxy_http proxy_wstunnel headers rewrite
systemctl restart apache2

Then the Apache config:

<IfModule mod_ssl.c>
<VirtualHost *:443>
  ServerName your.domain.com
  ServerAlias www.your.domain.com
  ServerAdmin admin@your.domain.com

  ProxyPreserveHost On
  ProxyRequests Off

  Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
  Header always set Referrer-Policy "no-referrer"

  RequestHeader set X-Real-IP %{REMOTE_ADDR}s
  RequestHeader append X-Forwarded-For %{REMOTE_ADDR}s
  RequestHeader set X-Forwarded-Proto "https"

  # WebSocket + HTTP routing
  RewriteEngine On
  RewriteCond %{HTTP:Upgrade} websocket [NC]
  RewriteRule /(.*) ws://xx.xx.xx.xx:18789/$1 [P,L]
  RewriteCond %{HTTP:Upgrade} !=websocket [NC]
  RewriteRule /(.*) http://xx.xx.xx.xx:18789/$1 [P,L]

  ErrorLog ${APACHE_LOG_DIR}/openclaw_error.log
  CustomLog ${APACHE_LOG_DIR}/openclaw_access.log combined

  Include /etc/letsencrypt/options-ssl-apache.conf
  SSLCertificateFile /etc/letsencrypt/live/your.domain.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/your.domain.com/privkey.pem
</VirtualHost>
</IfModule>

<VirtualHost *:80>
  ServerName your.domain.com
  Redirect permanent / https://your.domain.com/
</VirtualHost>

Replace xx.xx.xx.xx with the IP of your OpenClaw Docker container (or the Unraid host IP if you’re using port mapping), and swap in your actual domain.

The other thing you need to do is configure OpenClaw’s gateway to trust your proxy IP, and set the allowed origin for the Control UI. You can do this via the OpenClaw config or CLI:

openclaw config set gateway.trustedProxies '["your.proxy.ip"]'
openclaw config set gateway.controlui.allowedOrigins '["https://your.domain.com"]'
openclaw gateway restart

Once that’s all in place it should connect cleanly with no WebSocket errors. Remove the Let’s Encrypt section at the bottom and let Certbot add that for you if you’re setting it up fresh.

Part 3: Building Direct Attached Storage

Part 3 of building the DAS storage. I repaired the workstation and got the direct attached storage (DAS) connected. 8*4TB SAS drives configured for now as a BTRFS Raid 1 mirror. Gives me 15TB of usable space. I will do a full parts list soon and also revisit this when I have tested it a bit.

Part 2: Building Direct Attached Storage

Part two of the creation of the 32TB external direct attached storage (DAS) box. I want to keep the costs down, its a bit homemade. Here I just cover the the assembly, as the motherboard in the computer I was intended to connect it to failed on the same day!

Building a homemade direct attached storage (DAS/NAS)

Part 1: Building Direct Attached Storage

I have fourteen 4TB SAS drives, 8 of which I am going to use in a homemade 32TB external direct attached storage (DAS) box. I will be using an old case that I have going spare. To connect it up a bunch of cables I found on eBay. This is part one, the cables.

Building a direct attached storage unit to upgrade the capacity of my workstation.

UNRAID GPU Passthrough – needed a tweak

To get my NVidia GT710 to passthrough to a Windows VM in UNRAID I had to tweak my boot options. I needed to add “video=efifb:off” to the UNRAID OS boot config. Now the GPU passes through no problems.

UNRAID – What do I use it for!? Neo4J Network visualisation.

Quick video on what I use my UNRAID server for. I introduce using the UNRAID to serve the Neo4J database that runs some network visualisation for the website Algorithmic Indexing. Neo4J network visualisations form an important part of my academic research.

UNRAID System Build with the ZX-DU99D4 V1.11 motherboard, 64GB of ram, and two Xeon E5-2650LV3 CPUs

UNRAID build log! Building my new UNRAID server with Chinese X99 dual CPU motherboard from eBay, its the ZX-DU99D4 V1.11. Two Xeon E5-2650LV3 and 64GB of Ram (both used of eBay). This will be a great base system for playing with VMs and dockers etc in UNRAID, as well as running backups.

I settled on using two CoolerMaster 92mm Hyper H412R Compact Intel/AMD CPU Coolers. Which fit fine if you off set the fans a little.

Homemade DAS – Part1

I am building a direct attached storage (DAS) case that I will attach to my workstation using an external SAS card. External RAID DAS cases for SAS drives are not cheap so homemade it is! So far I have been assembling the parts, I have the drives, case, and lots of wires. I will do a more in depth video of the whole process later. You could use this as part of a NAS if you wanted.