A decentralized frontend hosting solution using Marlin's Oyster TEE (Trusted Execution Environment) enclaves. This application demonstrates how to deploy secure, verifiable web frontends with cryptographic domain authentication and tamper-proof hosting.
It makes sure that only enclaves running authorized images request certificates for a domain. This ensures that any response received by users visiting the domain can be authenticated as originating from the intended application as the certificate wouldn’t be issued otherwise, ensuring that it hasn’t been tampered with.
For more information on decentralized frontend read: Blog
-
Clone the Repository
git clone https://github.com/marlinprotocol/Decentralized-frontend-Example.git cd Decentralized-frontend-Example -
Build and Push Docker Image
# Build the image for your system architectures sudo docker build -t <username>/simple-html-app:latest .
# Push the image to Docker Hub sudo docker push <username>/simple-html-app:latest
[Optional] Build and Push Multi-Architecture Docker Image
# Build for both AMD64 and ARM64 architectures docker buildx build --platform linux/amd64,linux/arm64 \ -t <your-username>/simple-html-app:latest --push .
-
Update Docker Compose Configuration
Edit
docker-compose.ymlto reference your published image:services: html-app: image: <your-username>/simple-html-app:latest # ... rest of configuration
Choose the appropriate deployment command based on your target architecture:
# Update docker-compose.yml with AMD64 Caddy service
# Replace with: aniket711/dns_caddy_service:amd64
oyster-cvm deploy \
--wallet-private-key <Your_Private_Key> \
--duration-in-minutes 20 \
--docker-compose docker-compose.yml \
--arch amd64 \
--instance-type c6a.2xlarge# Update docker-compose.yml with ARM64 Caddy service
# Replace with: aniket711/dns_caddy_service:arm64
oyster-cvm deploy \
--wallet-private-key <Your_Private_Key> \
--duration-in-minutes 20 \
--docker-compose docker-compose.yml \
--instance-type r6g.large-
Retrieve Auto-Assigned Subdomain
curl -X GET https://getmysubdomain.hostedapp.work/subdomain/<Enclave-IP>
Example response:
"zh7a6r3d4ysp777l4voh3odgx7itsrd6rdh4vrbqqa4cqifo2qxq" -
Wait for DNS Propagation
Allow 3-4 minutes for the enclave to update DNS records automatically.
-
Access Your Website
Open your browser and navigate to:
https://{subdomain}.hostedapp.workThe website should look like this:
