installing_docassemble_docker_image_desktop_windows_11_pro
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| installing_docassemble_docker_image_desktop_windows_11_pro [2026/07/27 22:03] – wikiadmin | installing_docassemble_docker_image_desktop_windows_11_pro [2026/07/27 22:42] (current) – wikiadmin | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| To install the Docassemble Docker image on Windows 11 Pro, you need to install Docker Desktop, configure it to use the WSL 2 backend, and execute the standard Docker run command. | To install the Docassemble Docker image on Windows 11 Pro, you need to install Docker Desktop, configure it to use the WSL 2 backend, and execute the standard Docker run command. | ||
| + | |||
| + | Docassemble will run in Docker Desktop without you needing to install a separate Ubuntu or Debian Linux distribution in your Windows environment. | ||
| Here is the exact step-by-step procedure to get it up and running. | Here is the exact step-by-step procedure to get it up and running. | ||
| Line 35: | Line 37: | ||
| Note: --stop-timeout 600 is critical for Docassemble because it needs time to safely shut down its internal databases and SQL services when you stop the container. | Note: --stop-timeout 600 is critical for Docassemble because it needs time to safely shut down its internal databases and SQL services when you stop the container. | ||
| + | Option B: Run on a custom port (If Port 80 is busy). | ||
| + | |||
| + | BASH | ||
| + | |||
| + | < | ||
| + | docker run -d -p 8080:80 --restart always --stop-timeout 600 jhpyle/ | ||
| + | </ | ||
| + | |||
| + | Step 3: Access Docassemble | ||
| + | |||
| + | After running the command, Docker will download the image layers from Docker Hub. This can take a few minutes. | ||
| + | |||
| + | Q. If you plan to use this for serious development work, would you like to know how to map a persistent local directory so you don't lose your interviews and data when the container restarts? | ||
| + | |||
| + | Ans. We can check on that later. | ||
| + | |||
| + | Can we setup Docassemble with a fixed local network IP address and target that IP from a Linux Ubuntu server running Apache and use Reverse Proxy to publish the Docassemble to the internet with a fully qualified domain name? | ||
| + | |||
| + | Yes, we can absolutely route traffic through an external Ubuntu server running Apache. To achieve this, you need to ensure the Ubuntu box can physically talk to your Windows host IP address over a chosen port, configure Apache' | ||
| + | |||
| + | Here is how to set up the configuration. | ||
| + | |||
| + | Step 1: Bind Docassemble to your Windows LAN IP instead of binding to localhost (which isolates traffic to your Windows PC), map Docker Desktop to your local network interface. | ||
| + | |||
| + | 1. Find your Windows machine' | ||
| + | |||
| + | 2. Start the Docassemble container by binding it strictly to that IP and a chosen port (e.g., port 8080 so it doesn' | ||
| + | |||
| + | BASH | ||
| + | |||
| + | < | ||
| + | docker run -d -p 192.168.1.50: | ||
| + | </ | ||
| + | |||
| + | Step 2: Configure Apache on your Ubuntu Server. | ||
| + | |||
| + | A. On your Ubuntu server, Apache needs the proxy extensions enabled to capture incoming requests and pass them to the Windows machine.Log into your Ubuntu machine and enable the proxy modules: | ||
| + | |||
| + | bash | ||
| + | |||
| + | < | ||
| + | sudo a2enmod proxy proxy_http proxy_wstunnel rewrite headers | ||
| + | </ | ||
| + | |||
| + | B. Create or modify an Apache Virtual Host configuration file (e.g., / | ||
| + | |||
| + | Apache: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | ServerName docassemble.yourdomain.local | ||
| + | |||
| + | ProxyRequests Off | ||
| + | ProxyPreserveHost On | ||
| + | |||
| + | # Forward standard HTTP traffic to Windows 11 | ||
| + | ProxyPass / http:// | ||
| + | ProxyPassReverse / http:// | ||
| + | |||
| + | # Handle WebSocket connections (Critical for Docassemble' | ||
| + | ProxyPass /wsws http:// | ||
| + | ProxyPassReverse /wsws http:// | ||
| + | |||
| + | # Security headers to ensure Docassemble maps links correctly | ||
| + | RequestHeader set X-Forwarded-Proto " | ||
| + | RequestHeader set X-Forwarded-Port " | ||
| + | |||
| + | ErrorLog ${APACHE_LOG_DIR}/ | ||
| + | CustomLog ${APACHE_LOG_DIR}/ | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | C. Enable the configuration and restart Apache: | ||
| + | |||
| + | bash | ||
| + | |||
| + | < | ||
| + | sudo a2ensite docassemble-proxy.conf | ||
| + | sudo systemctl restart apache2 | ||
| + | </ | ||
| + | |||
| + | Step 3: Update Docassemble' | ||
| + | |||
| + | Docassemble needs to know it is being accessed via a proxy domain so that it constructs external links, emails, and package management endpoints with the Ubuntu server' | ||
| + | |||
| + | A. Go to your web browser and open the configuration menu (once you can see it via the Ubuntu domain or the direct Windows IP). | ||
| + | |||
| + | B. Navigate to Configuration (System-wide configuration). | ||
| + | |||
| + | C. Add or update the following parameters: | ||
| + | |||
| + | yaml | ||
| + | |||
| + | < | ||
| + | external hostname: docassemble.yourdomain.local | ||
| + | behind https load balancer: false | ||
| + | </ | ||
| + | |||
| + | (Note: If you eventually secure your Ubuntu Apache proxy using SSL/TLS Let's Encrypt certificates, | ||
| + | |||
| + | D. Click Save and let the container restart its background services. | ||
| + | |||
| + | Troubleshooting Windows Firewall Blockages | ||
| + | |||
| + | By default, Windows 11 Firewall blocks unsolicited inbound traffic to ports even if Docker maps them. If your Ubuntu server gets a 502 Bad Gateway or Connection Timed Out when trying to contact the Windows IP: | ||
| + | |||
| + | A. Open Windows Defender Firewall with Advanced Security on your Windows 11 machine. | ||
| + | |||
| + | B. Click Inbound Rules -> New Rule. | ||
| + | |||
| + | C. Choose Port -> Select TCP -> Type 8080 into specific local ports. | ||
| + | |||
| + | D. Choose Allow the connection and apply it to your current network profile (Private domain recommended). | ||
| + | Are you planning to configure SSL/HTTPS on the Ubuntu Apache box right away, or do you want to test the routing over plain HTTP first? | ||
installing_docassemble_docker_image_desktop_windows_11_pro.1785189794.txt.gz · Last modified: 2026/07/27 22:03 by wikiadmin
