How to install TeamViewer on a Linux system with no graphical user interface

I am tryiing  to install teamviewer on an embedded Ubuntu system that will eventually have no GUI, but it currently has a GUI for testing. I got teamviewer installed, but to use it I need access to the GUI to get the ID and password. I also can not find how to set it up for headless operation , which is a must. Can anyone help me?