Ubuntu 16 server automatic login

Login as root

sudo su

Create the folder

mkdir "/etc/systemd/system/getty@tty1.service.d"

Create the file

vim "/etc/systemd/system/getty@tty1.service.d/override.conf"

Open the file with your favorite editor and add this:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin username %I $TERM
Type=idle

Replace username with your user name and then restart server

reboot