summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-05-04 10:17:33 +0100
committerMatthew Lemon <y@yulqen.org>2024-05-04 10:17:33 +0100
commite600b66f9a9a93e3f8b51e2189d7bca3111e1b37 (patch)
treef0171c35f88dc344fdeaf9232bd946acb716aca7
parent1af2dbb6dd0b311e4d1de60813d9ee03af41c519 (diff)
parentdf6f5e40708aa357fdffe4f5a4340fd58ca6a133 (diff)
Merge branch 'master' of ssh://git.yulqen.org:2222/home/git/repositories/html/yulqen.org
-rw-r--r--content/blog/running_syncthing_on_openbsd.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/content/blog/running_syncthing_on_openbsd.md b/content/blog/running_syncthing_on_openbsd.md
new file mode 100644
index 0000000..ef2e25b
--- /dev/null
+++ b/content/blog/running_syncthing_on_openbsd.md
@@ -0,0 +1,23 @@
+---
+title: "Running Syncthing on OpenBSD"
+date: 2024-04-05T05:36:24+01:00
+draft: false
+categories: ['Computing']
+tags: ['openbsd']
+---
+
+I am trying OpenBSD again.
+
+I momentarily went back to NixOS and then thought better of it. It's great, it's clever, it's a tinkerer's nightmare.
+
+So, on the old Thinkpad X201 upon which I throw operating systems to play around, I have installed OpenBSD again.
+
+The installation didn't go particularly well this time and I had a few problems with `doas`. Anyway.
+
+And then it came to installing and setting up `syncthing` which I rely upon to keep all my machines in the same state. As is often the case, I didn't read [the docs](https://openports.pl/path/net/syncthing) properly. I initially set it up to run as an `rc` script. However, by default this will run it under the `_syncthing` user, with the root directory as `/var/syncthing` and for the life of me I couldn't figure out how I must have got round the ensuing permissions issues on my other machines. I didn't bother (or didn't think) to check how I started `syncthing` on those machines - I just assumed I used `systemd` and started the process at system level. Not so. (I used `.xinit` and friends...)
+
+So then I followed the advice in the docs and started the process as *my* user. What's great is that the docs advise starting the process inside a `tmux` session:
+
+`tmux new-session -d -s syncthing '/usr/local/bin/syncthing'`
+
+I use `tmux` all the time but I don't do anything other than create sessions and windows to split up various projects and workflows, so I'm happy to see this use case - it makes perfect sense. Also, to start at boot using `cron`, with `@reboot tmux new-session -d -s syncthing '/usr/local/bin/syncthing'` is awesome, and I never have to think about it again.