GuideAugust 4, 20266 min read

Syncing Configs to Cloud VMs (EC2, GCE, DigitalOcean)

SSH into a fresh cloud VM and feel right at home. One command gives you your full shell, Git config, SSH keys, and editor settings on any remote server.

The Fresh VM Experience

You SSH into a freshly provisioned EC2 instance. The shell is bare bash with no aliases, no color, and no prompt customization. Git has no identity configured. There are no SSH keys for cloning private repos. You are staring at a raw terminal wondering where to start.

This happens constantly in cloud development. You spin up VMs for debugging production issues, testing infrastructure changes, pair programming on remote machines, or running long computations. Each time, you waste minutes (or hours) recreating your environment before you can do actual work.

One Command Setup

ConfigSync eliminates this entirely. SSH into any VM and run a single command:

Full environment setup on a fresh VM
# Install and configure in one shot curl -fsSL https://configsync.dev/install.sh | sh configsync setup --token cs_your_token_here configsync pull

Within seconds, your shell has its aliases and prompt. Git knows who you are. Your SSH keys are in place for cloning private repositories. The VM feels like your laptop.

Tip: Bookmark a setup snippet with your token for quick access. Or better yet, use a password manager to store and paste the commands.

Filter to Essentials

Cloud VMs often need only a subset of your full environment. Use the --filter flag to pull just what you need and skip the rest:

Selective pull for different scenarios
# Debugging production: just shell and Git configsync pull --filter modules:zsh,modules:git # Setting up a dev server: add SSH and cloud credentials configsync pull --filter modules:zsh,modules:git,modules:ssh,modules:aws # Pair programming: full environment configsync pull

Filtering is especially useful on minimal VM images where you do not need editor settings or desktop application configs. Pull the essentials, get to work.

Cloud Provider Examples

The workflow is identical across cloud providers. Only the VM provisioning step differs:

AWS EC2 via user-data
#!/bin/bash # EC2 user-data script curl -fsSL https://configsync.dev/install.sh | sh configsync setup --token ${CS_TOKEN} configsync pull --filter modules:git,modules:ssh,modules:zsh
GCE startup script
# Pass as --metadata startup-script #!/bin/bash curl -fsSL https://configsync.dev/install.sh | sh su - ubuntu -c "configsync setup --token ${CS_TOKEN} && configsync pull"

You can even bake ConfigSync setup into your VM provisioning scripts so that every instance your team launches comes pre-configured. Pass the token through your cloud provider's secrets management (AWS SSM Parameter Store, GCP Secret Manager, etc.) to keep it secure.

Ephemeral VMs and Spot Instances

ConfigSync works particularly well with ephemeral infrastructure. Spot instances and preemptible VMs can be terminated at any time. Because ConfigSync pulls your environment from encrypted cloud storage, you never lose anything when a VM disappears. Just spin up a new one and pull again.

If you make configuration changes on the VM, push them before the instance terminates. Use watch mode to automatically detect and push changes:

Auto-sync on a cloud VM
# Start watch mode in the background configsync watch & # Now any config changes are automatically pushed # If the VM terminates, your changes are already saved

From Blank Slate to Productive in Seconds

The next time you SSH into a cloud VM and face a blank bash prompt, remember that it only takes one command to bring your full environment along. ConfigSync handles the encryption, the transport, and the platform differences. You just pull and start working.

Ready to try ConfigSync?

Sync your entire dev environment across machines in minutes. Free forever for up to 3 devices.