This error means in plain English: “Your YAML file is messed up”
Most likely do you use spaces on some lines and tabs on others. Or anything else that breaks the YAML. You can try an online linter like this one: http://www.yamllint.com to find out what exactly is wrong.
Thanks for the response - I am copying the example file directly from the setup document. I have tried using both Vim and Nano but both are giving an error. Any other way I can get this file onto the server?
No idea what is going on here or why it seems to work fine for everybody but not you. What operating system are you using? Anything else which is special in your case?
But to be honest I will probably not be able to help you here at all. I can help you with n8n related issues but this here has nothing to do with n8n directly. Is not that I do not want to help you, it is simply that I do not have enough low level docker experience to be able to. Guess your best chance is to google this errors and hope that somebody else had the same ones and found a solution for it.
Sadly could not test with Lightsail, because when I try to create an instance I get the error ResourceLimitExceed. So I used Digital Ocean instead and created a totally new and clean droplet. For it I selected Ubuntu 20.04 and then followed the Server Setup Guide. I made a few changes while doing that to account for version 20.04, to also upgrade all packages to the latest version (never a bad idea): https://github.com/n8n-io/n8n-docs/commit/db0881fc5d1f99731f99e3ab601b83f96ea87181
at the end of it, my instance did run totally fine and was reachable via https and its subdomain.
Not sure if it makes a difference in your case and if there is a difference between the Ubuntu Lightsail uses and the on from Digital Ocean but if you follow this guide it should theoretically work with Ubuntu 18.04 and 20.04.