- Free Cloud Development Server
This repo sets up a Google Cloud free-tier e2-micro instance with an external IP for secure app hosting and remote development.
- The server is managed using Docker Compose.
- Deployment is automatically installed using Ansible.
- VS Code Server runs on the host, while other apps run in Docker containers.
-
traefik.yourdomain.com– Reverse proxy handling traffic routing & SSL certificates. -
firefly.yourdomain.com– Personal finance manager with bank data import support. -
vaultwarden.yourdomain.com– Secure password and secret manager with browser extensions.
code.yourdomain.com– Web-based VS Code with Git support for cloud development.
Google Cloud provides one free e2-micro instance per month in specific US regions:
- Regions: Oregon (
us-west1), Iowa (us-central1), South Carolina (us-east1) - Storage: 30 GB standard persistent disk
- Go to Google Cloud Console → Compute Engine → VM Instances
- Click Create Instance
- Set Machine type to e2-micro
- Choose a free-tier region (
us-west1,us-central1, orus-east1) - Select Ubuntu/Debian as the OS
- Enable Allow HTTP & HTTPS traffic
- Click Create
Once created, use the web-based SSH in Google Cloud Console to connect.
Set A records in your domain registrar to point to your server’s public IP address:
| Name (Subdomain) | Type | TTL | Value (Your Server's IP) |
|---|---|---|---|
@ (root domain) |
A | 300 | xxx.xxx.xxx.xxx |
code |
A | 300 | xxx.xxx.xxx.xxx |
firefly |
A | 300 | xxx.xxx.xxx.xxx |
traefik |
A | 300 | xxx.xxx.xxx.xxx |
vaultwarden |
A | 300 | xxx.xxx.xxx.xxx |
Note: Replace xxx.xxx.xxx.xxx with your actual public IP address.
Run the following commands on your server:
sudo apt-get update
sudo apt install -y git pipx ca-certificates curl
sudo pipx install --include-deps ansible
sudo ansible-galaxy collection install community.docker
sudo pipx ensurepath
source ~/.bashrc git clone https://github.com/mcconnellj/cloud-server
cd cloud-server cat <<EOF > .env-template
DOMAIN=
CODE_SUBDOMAIN=code
FIREFLY_SUBDOMAIN=firefly
TRAEFIK_SUBDOMAIN=traefik
VAULTWARDEN_SUBDOMAIN=vaultwarden
TRAEFIK_USER=admin
TRAEFIK_PASSWORD=""
TRAEFIK_PASSWORD_HASH=""
EMAIL=your_email@example.com # <-- Ensure this is set for Let's Encrypt
CLOUDFLARE_API_TOKEN=your_cloudflare_api_token # <-- Add your Cloudflare API token
CLOUDFLARE_EMAIL=your_cloudflare_email # <-- Add your Cloudflare email
CLOUDFLARE_API_KEY=your_cloudflare_api_key # <-- Add your Cloudflare API key
EOF Rename the files:
mv .env-template .env
mv .db.env-template .db.env ansible-playbook ./playbooks/site.yml --connection=local Contributions are welcome!
- Found a bug? Open an issue
- Want to contribute? Submit a PR
- Feature requests? Start a discussion
- Security Policy
Special thanks to:
- S Zarichney for introducing me to CodePilot
- Bear for providing a switch for my local server
- Google Cloud Free Tier for free hosting