Multi-Server Deployments: Environments and Server Groups
servers: fans an environment out to several machines at once — and why a misconfigured group must refuse to guess which one you meant.
One server per environment
The common case — staging on one box, production on another:
environments:
staging:
server: staging-box
domain: staging.example.com
production:
server: prod-box
domain: app.example.com
neo deploy --to production
Several servers behind one environment
servers: (plural) fans one environment out to a group — the same app, load-balanced across machines that don't share state:
environments:
production:
servers: [web-1, web-2, web-3]
domain: app.example.com
neo deploy --to production --all # every server in the group
neo deploy --to production --server web-2 # just one member, for a targeted fix
Why a bare --to production refuses to run here
If production names more than one server, deploying to "the active server" would silently ship to whichever one machine happens to be selected locally — a partial rollout nobody asked for. Neo stops instead:
✗ environment "production" targets 3 servers: web-1, web-2, web-3
→ Deploy the whole group with 'neo deploy --all', or pick one with '--server <name>'.
neo servers and neo use
neo servers # list every configured server, mark the active one
neo use staging-box # switch which server plain `neo deploy` targets
--server always overrides the active server for one command, without changing what neo use last selected — useful for a one-off check against a machine you don't normally deploy to.
Try it yourself — Neo is free, with every feature unlocked.
Get started free