Skip to content

mcconnellj/cloud-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Free Cloud Development Server

License
PRs Welcome
Issues
Security Policy


📌 Table of Contents


🚀 What You Get

Always Free Cloud Machine for App Deployment

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.

Core Services (Running in Docker)


Development Environment (VS Code with Host Access)


🛠️ Installation

Step 1: Create a Free-Tier e2 Micro Instance

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
  1. Go to Google Cloud Console → Compute Engine → VM Instances
  2. Click Create Instance
  3. Set Machine type to e2-micro
  4. Choose a free-tier region (us-west1, us-central1, or us-east1)
  5. Select Ubuntu/Debian as the OS
  6. Enable Allow HTTP & HTTPS traffic
  7. Click Create

Once created, use the web-based SSH in Google Cloud Console to connect.


Step 2: Configure DNS

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.


Step 3: Install Dependencies

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  

Step 4: Clone the Repository

git clone https://github.com/mcconnellj/cloud-server  
cd cloud-server  

Step 5: Configure Environment Files

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  

Step 6: Run Ansible Playbook

ansible-playbook ./playbooks/site.yml --connection=local  

📝 Issues & Contributions

Contributions are welcome!


🙏 Acknowledgments

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

🎉 Happy Hosting!

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published