💾 Archived View for gemini.ctrl-c.club › ~dhruva › 2022-09-09_131905.gmi captured on 2024-02-05 at 10:28:17. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Self hosting

I was interested in self hosting from forever, but having to pay for a static IP and not having an extra computer to keep always on were hurdles that prevented me from trying anything. But that all changed when my university decided to install LAN ports in each room, allowing me to connect more than one device to the network. I brought with me an old laptop (Acer V or something), which no one was using.

Gitea and Tailscale

After playing around a bit with installing arch and trying to use it in a dual screen setup with

barrier

, I finally got down to self hosting things. I first started with gitea, which seemed simple enough to install. I followed the arch wiki instructions, and was running gitea in about an hour on localhost. I already new how to port forward on the router so I set that up and I could connect as long as I was on the institute network.

There was still the issue of a lack of a public static IP. I turned to the internet for ideas, and put a post on r/selfhosted about the issue. I was directed towards

Tailscale

, which took barely half an hour to install. Over the next few days I played around with tailscale and found the MagicDNS and AutoHTTPS settings. But now I had an issue caused by my institute proxy server. With the new domain names, the DNS resolver at the proxy server has to add the tailscale dns resolvers, but I don’t have access to it. Which meant that while my phone happily connected to the server over Cellular, my laptop couldn’t connect despite being on the same LAN without falling back to the local IP address. Oh well, at least a stopgap solution existed.

Nextcloud

Nextcloud was the next thing I wanted to selfhost. This was a big pain to get running. I was under the impression that all apps had their inbuilt web servers, and I just needed to set the correct ports to get them working. But nextcloud being a php application, needed a php webserver to be running first. This took me a while to understand. After this, I had issues with running the same postgres server for gitea and nextcloud. Not being too well versed with DBMS concepts, there were some weird issues with conflicting user permissions and stuff.

Docker

At this point I gave up trying to run nextcloud on bare metal. Nearly all docs relate to running nextcloud in a docker container, but I had no idea what docker was. It took me a couple of weeks trying to get nextcloud to run from docker and understand what needed to be changed so it would run properly. Eventually I got it running on some port.

Caddy and reverse proxy

Once again, this was easy for gitea, because gitea has a clear example of gitea behind a caddy reverse proxy, and when I hadn’t set the right hostname in gitea’s config, it gave me a nice banner saying I had to change so and so variable at so and so location. Nice and clean. Now came nextcloud. I couldn’t for the life of me figure out where the config file was, because the docker container’s volume was in the default location in /var/lib/docker/volumes, and I had no idea it was there. Finally after some poking around, I changed the config, but to no avail. I kept having issue after issue with nextcloud. So I clean restarted the whole process, uninstalled postgres, gitea, docker, caddy, cleaned files, and put everything except caddy on docker. Once again I faced issues with the webroot on nextcloud and I kind of gave up for a while.

Another attempt

After a few weeks’ hiatus caused by a new semester, I tried setting it up again. I don’t know if it was just plain luck or the break had given some clarity of what had to be done, but this time I was able to set up everything pretty easily. Everything was working barring tailscale on LAN, which now seemed like the proxy server blocking the connection, along with the DNS issue.

Nextcloud Office with Collabora

Now I wanted to add Nextcloud office, but I was unsuccessful in getting the nextcloud instance to see the collabora server running in the same docker-compose file regardless of what I tried. Eventually I gave up.

Other services

I also have a docker running freshrss, but I haven’t set it up, but it seems pretty easy to set up. I’ll also probably try to set up hedgedocs as an alternative to nextcloud office, and then see if I can connect the nextcloud storage to hedgedocs, but I haven’t tried it yet.

Opinions about self-hosting

Self hosting isn’t easy, and I don’t see the point of it. It makes sense for a group or something like a mastodon or tilde instance to self host certain services for a more decentralized internet, but the effort of setting it up for personal access is not worth it.

For all editors or viewers, there are tonnes of local applications, and it makes no sense to use a server set up for it. The only point I see is as a backup solution or as a file sharing mechanism. For backup and sync, I feel syncthing is a lot easier to setup and get working. Sure, the connection between devices is a bit finicky sometimes, but its frankly alright. Syncthing + Tailscale satisfies whatever classic Nextcloud can do.

For those apps which need syncing of data between devices, it is a lot easier to look for public instances of them. The hostux network [hostux.network] provides a lot of services for free, and trusting them is about the same as trusting a droplet server.

As for Nextcloud, it now offers to set up a server for you on one of the VPS providers for free, which I think is a pretty great deal. For my music and photos, I sync using syncthing, and for documents, contacts, calendar, tasks, I use the nextcloud instance.

So with that, I don’t know how much longer I’ll try to get the self hosting thing working, but there you have it.

self-hosting,web

Links

Home

Other Posts