diff --git a/.gitignore b/.gitignore index 888038c..9a7e555 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ _site +.vscode/ .sass-cache .jekyll-cache .jekyll-metadata diff --git a/_posts/2025-04-14-a-new-day-a-new-domain.md b/_posts/2025-04-14-a-new-day-a-new-domain.md index a7c9574..964aa65 100644 --- a/_posts/2025-04-14-a-new-day-a-new-domain.md +++ b/_posts/2025-04-14-a-new-day-a-new-domain.md @@ -2,7 +2,6 @@ title: A new day, a new domain. layout: post excerpt: I just registered thod.dev and bought my first VPS. -draft: true assets: /assets/blog/a-new-day-a-new-domain thumbnail: /assets/blog/a-new-day-a-new-domain/thumbnail.svg @@ -13,20 +12,115 @@ image_class: invertable I bought [thod.dev](https://thod.dev) a while back because I wanted a slightly shorter domain to play with than [the one you're at](https://thomashodson.com). In light of what's happening in the US I'm also thinking about starting to get onto the self hosting train. These are my baby steps in that direction. -After browsing [european-alternatives.eu](https://european-alternatives.eu/) and reddit a bit I settling on a €4 a month VPS from [netcup](https://www.netcup.com) to start. +After browsing [european-alternatives.eu](https://european-alternatives.eu/) and reddit a bit I settled on a €4 a month VPS from [netcup](https://www.netcup.com) to start. -I set up the DNS entries in Cloudfare. Eeek not quite an EU alternative but baby steps. +I set up the DNS entries in Cloudfare. Not quite an EU alternative but baby steps. Then I Installed caddy. It took me a while to understand how to configure caddy through systemctl but it's [here](https://caddyserver.com/docs/running) if you need it here. Here's my tiny cheatsheet for caddy: -Installed nginx and caddy. Took me a while to understand how to configure caddy through systemctl but it's [here](https://caddyserver.com/docs/running). +| | | +|-------------------------------------------------- |-------------------------------------- | +| Change Caddy proxy setup | `code /etc/caddy/Caddyfile` | +| Reload caddy (also status, start, stop, restart) | `systemctl reload caddy` | +| More details on caddy | `journalctl -xeu caddy.service` | +| Who's listening on a port. | `lsof -i :80` | +| See live access logs | `tail -f /var/log/caddy/access.log ` | +| See process logs | `tail -f /var/log/caddy/process.log` | +| Start/stop a service at boot | `systemctl enable [service]` | -
- +My caddyfile is a series of entries like this, they just direct subdomains to internal docker images or servers. Note that it's much easier to setup subdomains i.e `git.thod.dev` than it is to do something like `thod.dev/git/*`. + +```caddy +git.thod.dev { + import logging + reverse_proxy localhost:3000 +} + +music.thod.dev { + import logging + reverse_proxy localhost:4533 +} +``` + +Interesting side note: Caddy handles getting TLS certs and https fr you pretty well! The one slightly unexpected side effect of this is that the moment you get a cert issued (which caddy does automatically) for a subdomain, that will become a matter of public record. There are many many bots configured to automatically start sniffing around for vulnerabilities on your server, here's a snippet of some requests I got within minutes of setting up a new subdomain: + +``` +GET /@vite/env HTTP/1.1 +GET /actuator/env HTTP/1.1 +GET /server HTTP/1.1 +GET /.vscode/sftp.json HTTP/1.1 +GET /about HTTP/1.1 +GET /debug/default/view?panel=config HTTP/1.1 +GET /v2/_catalog HTTP/1.1 +GET /ecp/Current/exporttool/microsoft.exchange.ediscovery.exporttool.application HTTP/1.1 +GET /server-status HTTP/1.1 +GET /login.action HTTP/1.1 +GET /_all_dbs HTTP/1.1 +GET /.DS_Store HTTP/1.1 +GET /.env HTTP/1.1 +GET /.git/config HTTP/1.1 +GET /s/3313e22343e28363e2838313/_/;/META-INF/maven/com.atlassian.jira/jira-webapp-dist/pom.properties HTTP/1.1 +GET /config.json HTTP/1.1 +GET /telescope/requests HTTP/1.1 +GET /info.php HTTP/1.1 +GET /?rest_route=/wp/v2/users/ HTTP/1.1 +``` + +So far I don't have any data/passwords/private keys/etc on this server that I would particularly mind losing or having stolen. Before changing that I think I'll need to do a thorough security review of this box. + +## Experiments so far: + +### Mirror of this site @ [thod.dev](https://thod.dev) + +This is just a test really, I doubt I'll ever fully move from `thomashodson.com` fully to `thod.dev` but maybe one day! + +### Miniflux @ miniflux.thod.dev + +I still need to setup some kind of action to rebuild this mirror. + +For a few years now I've paid for [theoldreader](https://theoldreader.com/) as an rss reader but lately I wanted some kind of API to access my lists of read and unread posts and couldn't really find it from theoldreader, so I'm starting to switch over to a self hosted miniflux, so far so good! + +### Gitea @ [git.thod.dev](https://git.thod.dev) + +I've put up a gitea instance and mirrored a couple repos from github. Haven't quite decided how to use this yet! + +### Navidrome @ music.thod.dev + +I've uploaded various music that I have locally from bandcamp and such to a navidrome instance. + +### Tiny Webservers + +Since I have this server I seems like a good time to play with so more dynamic stuff. My first foray into that is a tiny rust webserver hosted at [api.thod.dev/tiny_servers/single_threaded](https://api.thod.dev/tiny_servers/single_threaded). It just returns a json response telling you how many times this endpoint has been hit since the last time I rebooted it! + +
+?? +
+hits since last reboot. +
-I also put a gitea instance at [git.thod.dev](https://git.thod.dev) to test that out. + + + + +Try it out with `curl -vvv https://api.thod.dev/tiny_servers/single_threaded` and [the webserver code is here](https://github.com/TomHodson/tomhodson.github.com/blob/main/experiments/tiny_webservers/src/bin/single_threaded.rs). \ No newline at end of file diff --git a/assets/blog/a-new-day-a-new-domain/thumbnail.png b/assets/blog/a-new-day-a-new-domain/thumbnail.png index cc5e77a..edb6ce2 100644 Binary files a/assets/blog/a-new-day-a-new-domain/thumbnail.png and b/assets/blog/a-new-day-a-new-domain/thumbnail.png differ diff --git a/assets/blog/a-new-day-a-new-domain/thumbnail.svg b/assets/blog/a-new-day-a-new-domain/thumbnail.svg new file mode 100644 index 0000000..c2ffe5c --- /dev/null +++ b/assets/blog/a-new-day-a-new-domain/thumbnail.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + THOD.DEV + + diff --git a/project_ideas.md b/project_ideas.md index e875042..0bbdf22 100644 --- a/project_ideas.md +++ b/project_ideas.md @@ -9,6 +9,8 @@ mathjax: false # Project Ideas +* Add stylised toon shading to the outline renderer. Ie take the dot product between the light direction and the normal direction, soft threshold it and then use either a shadow colour or a highlight colour. + * Take on board some ideas from https://plainvanillaweb.com/index.html * get https://www.feather.art/ and try out the line rendering for nice 3D annotations