Would it be better if your Capistrano example use the VM’s IP address instead of localhost like this
server “localhost”, :web, :app, :db, :primary => true
So that you do not need to advice people to be mindful of the port forwarding of 2222 and thus can remove this line
ssh_options[:port] = 2222
Will it be the same if the localhost is changed to 18.104.22.168, the Vagrant VM’s IP.