Jump to content

Hosting static websites from gemini 260128: Difference between revisions

From Game in the Brain Wiki
Created page with "= Self-Hosting Gemini-Generated Static Sites = == Overview == This technical guide outlines the architecture and deployment process for hosting static web applications on a local micro-desktop, exposed to the internet via a Hybrid Cloud-Edge networking model. '''The Problem:''' Gemini generates high-quality interactive HTML/JS applications, but there is no native way to host them permanently for external sharing. '''The Solution:''' This workflow allows you to move co..."
 
 
(2 intermediate revisions by the same user not shown)
Line 26: Line 26:
'''ZeroTier:''' Creates a virtual bridge between the Local Host PC and the public-facing VPS.
'''ZeroTier:''' Creates a virtual bridge between the Local Host PC and the public-facing VPS.


'''Contabo VPS (The Edge):''' Acts as the entry point with a static Public IP. Hosts the primary '''NGINX Proxy Manager (NPM)'''.
'''Contabo VPS (The Edge):''' Acts as the entry point with a static Public IP. Hosts the primary '''NGINX Proxy Manager (NPM)'''. Contabo for me in SG is about 6EUR per month or 400php per month. 4800php - this is only justified if your job entails a lot of IT experiments to pay off this costs. Host your Wireguard VPN and various other Relay systems. NextCloud, Mailcow, etc... 


'''Cloudflare:''' DNS management and DDoS protection.
'''Cloudflare:''' DNS management and DDoS protection.
Line 102: Line 102:
=== 4. Link Finalization ===
=== 4. Link Finalization ===
To share the site, append the filename to your domain:
To share the site, append the filename to your domain:
<code>https://www.google.com/search?q=https://sites.comfac.net/your-new-project.html</code>
<code><nowiki>https://sites.comfac.net/your-new-project.html</nowiki></code>
 
https://sites.comfac.net/unified-tasks.html


[[Category:Infrastructure]]
[[Category:Infrastructure]]

Latest revision as of 16:23, 27 January 2026

Self-Hosting Gemini-Generated Static Sites

Overview

This technical guide outlines the architecture and deployment process for hosting static web applications on a local micro-desktop, exposed to the internet via a Hybrid Cloud-Edge networking model.

The Problem: Gemini generates high-quality interactive HTML/JS applications, but there is no native way to host them permanently for external sharing.

The Solution: This workflow allows you to move code from the Gemini chat to a live, SSL-secured URL in under 2 minutes.

1. Hardware Requirements (Host PC)

The "Home Server" node is the core of this infrastructure.

Model: Dell Optiplex 3070 Micro (Typical cost: ~10,000 PHP).

CPU: Intel Core i5/i3 series (9th Gen).

RAM: 16GB DDR4.

Storage: 256GB SSD.

Operational Cycle: 24/7 continuous operation.

2. Networking & Infrastructure

To bypass CGNAT and ensure secure remote access, the following stack is utilized:

ZeroTier: Creates a virtual bridge between the Local Host PC and the public-facing VPS.

Contabo VPS (The Edge): Acts as the entry point with a static Public IP. Hosts the primary NGINX Proxy Manager (NPM). Contabo for me in SG is about 6EUR per month or 400php per month. 4800php - this is only justified if your job entails a lot of IT experiments to pay off this costs. Host your Wireguard VPN and various other Relay systems. NextCloud, Mailcow, etc...

Cloudflare: DNS management and DDoS protection.

Portainer: Manages the Docker stack on the Host PC.

3. Implementation: Static Hosting Stack

To host Gemini-generated content, an NGINX container maps a local folder to a web-accessible port.

Step A: Directory Preparation

SSH into your Host PC:

ssh user@your-local-ip

Create the directory where your web files will reside:

mkdir -p /home/user/static-sites

Step B: Portainer Stack Configuration (YAML)

In Portainer, create a new stack and paste the following:

version: '3'
services:
web:
image: nginx:alpine
container_name: gemini-static-host
restart: always
ports:
- "27081:80"  # Exposes the site on the host via port 27081
volumes:
- /home/user/static-sites:/usr/share/nginx/html

4. Deployment Workflow (The "Gemini to Web" Process)

1. File Creation

When Gemini provides a code block, SSH into the Host PC and perform the following:

cd /home/user/static-sites
nano your-new-project.html

Paste: Use Right-Click or CMD/CTRL+V to paste the Gemini code.

Save: Press CTRL+O, then Enter.

Exit: Press CTRL+X.

2. Local VPN Validation

Test the site using your Host's ZeroTier IP to ensure the container is serving the file correctly:

URL: http://[Your-ZeroTier-IP]:27081/your-new-project.html

Check: Verify all interactive elements work.

3. DNS & Public Routing

Cloudflare: Ensure sites.comfac.net points to your Contabo VPS Public IP.

NGINX Proxy Manager (VPS):

Domain: sites.comfac.net

Forward IP: Your Host PC's ZeroTier IP.

Forward Port: 27081

SSL: Enable Let's Encrypt.

To share the site, append the filename to your domain: https://sites.comfac.net/your-new-project.html

https://sites.comfac.net/unified-tasks.html

Created for the Comfac Network Infrastructure Wiki.