Camo installation direcotry

I see in the set up instructions for Camo that Camo should be installed in /home/diaspora/camo. What is the reason that We do not create user camo and install to /home/camo/camo? I would prefer to do it this way, unless there is a compelling reason not to.

Thanks.


ETA: Above message was written on phone the next day after I read a bunch of stuff online. To clarify, the set up instructions I was referring to are not on the official wiki, but on this post. The official wiki is actually ambiguous about where to install camo. So, I will proceed with my preferred way of creating restricted user camo and installing in that user’s home directory. Will update here when I’m done…

UPDATE: So, I was unable to get Camo to work properly when I installed it under a different user’s home directory. In other words, when I installed camo under /home/camo/camo, the images are not displayed. In the process of trying to get this to work, I enabled logging and find that every request fails with checksum mismatch:

May 10 06:58:02 pod node[14821]: --------------------------------------------
May 10 06:58:02 pod node[14821]: { type: 'path',
May 10 06:58:02 pod node[14821]:   url:    '/ef43eb1922952329fd0667a6575d3e132c11da2e/68747470733a2f2f63646e2e706174656e746c796f2e636f6d2f6d656469612f323031382f30352f4854435f486973746f72795f323031375f4a756c79312d31303234783430372e6a7067',
May 10 06:58:02 pod node[14821]:   headers:
May 10 06:58:02 pod node[14821]:    { host: 'camo',
May 10 06:58:02 pod node[14821]:      connection: 'close',
May 10 06:58:02 pod node[14821]:      'accept-encoding': 'br, gzip, deflate',
May 10 06:58:02 pod node[14821]:      accept: 'image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5',
May 10 06:58:02 pod node[14821]:      'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1 Safari/605.1.15',
May 10 06:58:02 pod node[14821]:      'accept-language': 'en-us',
May 10 06:58:02 pod node[14821]:      referer: 'https://pod.diaspora.la/stream',
May 10 06:58:02 pod node[14821]:      dnt: '1' },
May 10 06:58:02 pod node[14821]:   dest: 'https://cdn.patentlyo.com/media/2018/05/HTC_History_2017_July1-1024x407.jpg',
May 10 06:58:02 pod node[14821]:   digest: 'ef43eb1922952329fd0667a6575d3e132c11da2e' }
May 10 06:58:02 pod node[14821]: --------------------------------------------
May 10 06:58:02 pod node[14821]: [2018-05-10T06:58:02.565Z] checksum mismatch 1e0a43db0d9deb05ca54e445c02a482e2228d6cb:ef43eb1922952329fd0667a6575d3e132c11da2e: unknown

In the end, I just moved camo to /home/diaspora/camo, and everything seems to be working perfectly now. I am guessing that there is some dependency between camo and the diaspora installation, and it’s not clear to me what it is. When I have some free time, I may try to dig into this further, as I would like to separate these if that’s possible. Any thoughts?

Hi,

That’s weird, as far as I know there shouldn’t be any dependency.
Is your CAMO_KEY environment variable set as the same as in the diaspora.yml config file when running it under the camo user ?

Yes, it’s absolutely the same (quadruple checked!). In fact, the only difference between the two installations of camo that I have on my system is the location in which they are installed and the user that runs the camo service. I suspect that the dependency is environmental-- there must be something in the diaspora environment that camo depends upon, which does not exist in the environment of a system account with no other software installed in it. When I have time I will review the diaspora environment in more detail to see what it could be.

As already mentioned by @ruth, the only thing camo needs is the CAMO_KEY environment variable (and when you get “checksum mismatch” that’s an indication that the key is wrong). Maybe you set the env-variable only for the diaspora-user instead of the camo-user? I run camo with a different user and it works perfectly.

Thank you. It’s working now. I don’t understand why it did not work the first time, because all I did was to change the username and paths in the systemd service file (I left the key exactly the same as it always has been), and it is now running under my camo user account with no problems whatsoever.

Anyway, thanks again for the help.