Spin up a persistent, full-featured Chrome instance in the cloud (Docker/Kasm) and access it securely via an SSH tunnel.
This repository provides a "one-file" configuration to deploy a remote Chrome desktop environment on a cheap cloud VPS (like Hetzner, DigitalOcean, or AWS). It uses cloud-init to automatically set up Docker, Kasm, and security rules.
- Full Chrome Experience: Runs with
--shm-size=2gand--security-opt seccomp=unconfinedto support all modern websites and extensions without sandbox errors. - Persistent Sessions: Your tabs, logins, and extensions (like LinkedIn Gateway) are saved even if you disconnect or restart the server.
- Secure Access: The Chrome interface is bound to
127.0.0.1on the server. You connect via an encrypted SSH tunnel. No open ports are exposed to the public internet except SSH. - Automated Setup: Just paste the
cloud-config.yamlcontent when creating your server.
- A Cloud VPS Provider (e.g., Hetzner Cloud).
- OS: Ubuntu 22.04 or 24.04 LTS.
- Resources: Recommended 2 vCPU / 4 GB RAM (e.g., Hetzner CX22).
- Open
cloud-config.yamlin this repository. - Edit Passwords:
- Replace
CHANGE_ME_PASSWORDwith a strong password for the Kasm web login. - Replace
CHANGE_ME_SSH_PASSWORDwith a strong password for the SSH user.
- Replace
- Copy the Content.
- Create Server:
- Go to your cloud provider's console (e.g., Hetzner).
- Select Ubuntu as the image.
- Paste the content into the User Data / Cloud Config section.
- Launch the server.
- Wait: It takes about 2-3 minutes for the server to install Docker and pull the Chrome image.
We provide a remote_chrome.bat script for one-click connection.
- Download
remote_chrome.bat. - Edit the Script:
- Right-click -> Edit.
- Change
set "SERVER_IP=YOUR_SERVER_IP"to your actual server IP address.
- Run:
- Double-click
remote_chrome.bat. - Enter your SSH password (
CHANGE_ME_SSH_PASSWORD) when prompted. - The script will automatically open your default browser to
https://localhost:6901.
- Double-click
We provide a remote_chrome.sh script for one-click connection.
- Download
remote_chrome.sh. - Make it executable:
chmod +x remote_chrome.sh
- Edit the Script:
- Open
remote_chrome.shin a text editor. - Change
SERVER_IP="YOUR_SERVER_IP"to your actual server IP address.
- Open
- Run:
./remote_chrome.sh
- Enter your SSH password (
CHANGE_ME_SSH_PASSWORD) when prompted. - The script will automatically open your default browser to
https://localhost:6901.
- Enter your SSH password (
Manual Connection (without script):
Open your terminal and run:
# Replace YOUR_SERVER_IP with your server's IP address
ssh -N -T -L 6901:127.0.0.1:6901 chrome@YOUR_SERVER_IP- Password: Enter the
CHANGE_ME_SSH_PASSWORDyou set in the config. - Access: Open your browser to
https://localhost:6901. - Web Login:
- User:
kasm_user - Password: The
CHANGE_ME_PASSWORDyou set in the config.
- User:
- Sandbox / "Aw, Snap!" Errors: This config includes
--security-opt seccomp=unconfinedwhich fixes common Chrome crashing issues in Docker environments. - "Site can't be reached": Ensure the SSH tunnel is running. The terminal window must remain open.
- Certificate Warning: You will see a "Not Secure" warning because the server uses a self-signed certificate for HTTPS. This is normal for localhost; click "Advanced" -> "Proceed".
- Container:
kasmweb/chrome:1.17.0running in Docker. - Persistence: Data stored in
/opt/kasm/data. - Network: Port 6901 bound locally. Access via SSH Local Port Forwarding.