Creating a phone server.

download adb

Download a rom of your phone by googling the value in the about your phone (in your phone)

Follow these instructions

Install userLAnd < seems to work well

Install ubuntu

update OS

on the phone create a new user and add them to sudo

Since ssh it's not on the local default port use ssh bohdan@ -p2022 to connect to it

Portforward the router - I'm not able to test locally because I can't visit a site from my own domain, used my phone on a wireless network

For portfoward, we change 80 to 2080, 443 to 2443, 22 to 2022, because the phone didn't allow for those ports to be used

Install Apache

A. enable ssl on apache sudo a2enmod ssl

B. install openssl sudo apt-get install openssl

D. if necessary, change /etc/apache2/ports.conf, this works to 2080 and 24443 

DNS - is a great service, set it up

Set your dns to do a cname, for me I did to cname

Yes you are able to get certs for cnames.

setup the suggested script (needed to install cron to get it to work)

install certbot 

you are set with a fully functioning server on a phone!