Nextcloud run as PHP-FPM in Docker, served via external nginx
As part of moving all my self hosted stuff to a new home server, I'm switching from serving Nextcloud directly from the host machine, to have it run in a Docker container.
I just managed to solve a problem with running Nextcloud from their nextcloud:fpm Docker image that I have been battling for a few days.
The fpm version of the container image is supposed to be accessed behind a web server like nginx. The web server is required in order to serve static files and other non-PHP content. Their examples suggest setting up a Docker compose file that runs both the fpm container and an nginx container. But I already have nginx running somewhere else and don't want to have multiple of those running.
The Nextcloud documentation provides an example configuration for nginx to use as a starting point.
Despite (roughly) following their guide for nextcloud:fpm, I kept getting a 404 response with the following body:
File not found.
Searching for this in the Nextcloud source led me on a detour: The string "File not found." is found in a file called apps/files/lib/Controller/ApiController.php, which made me believe this is where the response came from. But it turned out not to be the case and I scratched my head for a while, as I didn't see any changes when I altered that file. As I understand it, this specific response is instead (or also) a default response from the php-fpm process if it cannot find the file to process, and my best guess is that Nextcloud mimics this as a sort of security by obscurity when it doesn't know how to handle a request.
According to the nextcloud:fpm documentation, the web root should be mounted as a volume. Let's say these files are supposed to reside on your host in /path/to/nextcloud/data/www. Then your compose file should have a volume defined as:
...
volumes:
- /path/to/nextcloud/data/www:/var/www/html
...
If you ran nginx as part of the compose setup as suggested in their documentation, that container would have an identical mount, and nginx would serve files from /var/www/html.
But as I have an external nginx, it does not simply have /var/www/html set as the root for the Nextcloud virtual host. Instead, its root is set to be /path/to/nextcloud/data/www. And this is where the problem is: This absolute path is passed on to the upstream fpm handler, running in the Docker container, and this path does not exist in the container, which results in the "File not found." response.
My solution is to add another volume in the compose file, that also mounts the web root at the same location inside the container (having it mounted twice):
...
volumes:
- /path/to/nextcloud/data/www:/var/www/html
- /path/to/nextcloud/data/www:/path/to/nextcloud/data/www
...
This makes sure that both nginx on the host and php-fpm in the container can find the PHP files in the same place.
"Days" before May 16
The untested GLaDOS AI is activated for the first time as one of the planned activities on Aperture's first annual Bring Your Daughter to Work Day. In many ways, the initial test goes well: Immediately, within one picosecond of being switched on, GLaDOS becomes self-aware. The "going well" phase lasts for two more picoseconds, at which point GLaDOS takes control of the facility and locks it down, trapping everyone inside. She then deploys a deadly neurotoxin which kills the majority of the scientists within the facility. A few survivors manage to install a Morality Core into GLaDOS which prohibits her from using the neurotoxin again. With the Morality Core in place, GLaDOS turns her attention back to the facility and begins testing. Her goal: beat the hated Black Mesa in the race to develop a functioning portal technology.
From the Timeline of the Half-Life and Portal universe article on Combine OverWiki.
Brunost
John Mikael Lindbakk recently introduced his new programming language, Brunost:
One of the most important aspects of Brunost is that it requires Nynorsk. Variable, parameters and function names must be in Nynorsk. The interpreter ships with a Nynorsk dictionary that is used during the interpretation, and if the developer tries to do anything but Nynorsk, they'll get a clear message:
Feil: Namnet er ikkje gyldig nynorsk: 'thisIsNotNynorsk' på linje 8, kolonne 6
Nynorsk is no longer a minor subject in school. Soon, it will become a requirement for the Norwegian IT industry!
Cables of Resistance
This past weekend, I went to the Cables of Resistance conference in Berlin. Framed as "resistance against big tech", I assumed it would be a tech conference. But I was wrong. In a very good way!
I was there with one of my partners in crime from data.coop, hoping to spread the word about community self hosting.
Of course we were not the only tech people showing up. But there was a large part of what seemed like academic people with a background in social studies, people involved in labour and union work and – of course, this being Berlin – activists and various movements.
Everything being less techy turned out to be really nice. Most talks I attended gave me new perspectives on problems with tech giants. Touching topics like:
- Problems related to hardware production, from digging out materials in 3rd world countries to supply chains.
- Software developers' responsibility to use their informal power to make the world better for less privileged people.
- Exposing the "border industrial complex", how some companies earn a lot of money by being in the full supply chain from border defense and patrolling to handling of "illegal immigrants".
- The exploitation of platform workers, from fast food delivery people to the click workers who moderate social media content and classify data for "AI" models.
- And even a slightly more uplifting introduction to compost.party – a feminist server running from an old smartphone attached to a small solar panel.
I think my only complain would be that there was a lot of focus on all the things that are wrong, but less focus on what we can do to improve the state of things.
I'm very well aware that the self hosting we do in data.coop only solves our own personal problems with big tech, which are mostly the problems of a privileged elite. But it was quite exciting talking to other attendees about what we do and provide a glimpse of hope. Some didn't even know it was possible. Others asked a lot of questions about getting started. Some of our friends from ukrudt.net were there as well (it was such a pleasure seeing them in person!), and we ended up doing an improvised meeting together on the last day, inviting everyone to come ask questions, share ideas and exchange contact details for future collaboration.
I came home exhausted, but full of new ideas and inspiration. And almost felt like I had been to a festival, with all the good people I met along the way.
Do I even want to work with AI?
In his blog post Do I even want to work with AI?, Michael J. Nicholson asks:
Where do those of us who enjoy the coding part of development go from here?
Do we look for another job? Do we resign ourselves to being "prompt engineers" or "AI agent managers" or somesuch? Do we continue working with something that doesn't really give us job satisfacion?
Or is there a path forward to a role that provides the same levels of satisfaction that coding once did? Because I don't think we have long to find that niche, assuming it exists.
I am thinking about the same these days. The answer may be to somehow join forces and open slop free shops with like-minded people. I don't know if there's a market for that, though, as it seems all decision makers drank the Kool-Aid.