So, I am redoing my Node server on Ubuntu. The machine that is running PhotoStructure (PS) not easily accessible with GUI. I am sshing to it. I follow instruction on PhotoStructure | PhotoStructure for Node and before I do ./start.sh I plugged PS_EXPOSE_NETWORK_WITHOUT_AUTH='true" into ~/.profile, logged out, logged back in and did source .profile as well. After starting PS for the first time and waiting a bit for it to built what it needs to I got: PhotoStructure is ready: http://localhost:1787/. Now I am trying to reach this host from another machine and I am getting ERR_CONNECTION_REFUSED. Do I need to login to this Ubuntu box via GUI and give it a kick - aka create library and enable exposeNetworkWithoutAuth in library settings or is there a way to run PS server on Ubuntu in completely headless manner?
If youâre on a different computer, are you hitting the local IP address of your ubuntu box? You may want to set up either your routerâs DHCP server to give your server a static IP address, or set your box to take an IP address thatâs outside of the range of dynamic addresses that your routerâs DHCP service gives out.
For example, my router at home has a DHCP server that gives out dynamic IPs from 128-254 (like, 192.168.0.129), and Iâve set up static IP addresses for my printer, NAS and server (like, 192.168.0.3 is my printer).
OK. I went to Ubuntu GUI and added my assets dir to the path. Clicked the button at the bottom of UI. It started scan. Still have no remote access from other LAN IPs. Then I sshed again to Ubuntu box, stopped PS and changed Library settings to exposeNetworkWithoutAuth = true and started PS. Voila! Remote access is working now.
It would be super useful to be able to setup PS on headless server prior to authentication feature implemented. I donât mind doing my GUI dance when I need to redo the installation, but if it works out of the box - that would be great.
I agree, headless installations should totally be doable.
The code that spins up express doesnât change if there is a library or there isnât, so binding to localhost or outbound network ports shouldnât change. I wonder whatâs different between your box and my test machines
I am willing to help to compare, but only if it helps others. It does not look like anybody else had these troubles starting PS Node on Ubuntu, so might be isolated to my setup. Whatâs the proper format for env var for PS? This: PS_EXPOSE_NETWORK_WITHOUT_AUTH=âtrueâ, cause you have I here PhotoStructure | PhotoStructure for Node as âset the environment variable PS_EXPOSE_NETWORK_WITHOUT_AUTH to 1â. Both work?
export function isEnvTrue(key: string): boolean {
return isTrue(getEnv(key))
}
/**
* (Fairly) strict coercion to true.
*
* @return false unless `o` is `true` or `1` (or stringifies to "true" or "1")
*/
export function isTrue(o: any): boolean {
if (typeof o === "boolean") return o
if (o == null) return false
if (o === 1) return true
const s = String(o).toLowerCase()
return ["true", "1"].includes(s)
}
And while Iâm sharing code, hereâs the only code that references it: