about summary refs log tree commit diff
path: root/nixos/modules/services/web-apps/gotosocial.md
diff options
context:
space:
mode:
authormisuzu <bakalolka@gmail.com>2023-05-19 21:18:17 +0300
committermisuzu <bakalolka@gmail.com>2023-06-05 09:07:34 +0300
commit45ffb33514488fd27b9355081a687db8312d97f4 (patch)
tree5eee1440472a320903ef3f4b4524e84872ca7399 /nixos/modules/services/web-apps/gotosocial.md
parentf0fb24611876f48151defbe1df51401ae926a150 (diff)
downloadnixlib-45ffb33514488fd27b9355081a687db8312d97f4.tar
nixlib-45ffb33514488fd27b9355081a687db8312d97f4.tar.gz
nixlib-45ffb33514488fd27b9355081a687db8312d97f4.tar.bz2
nixlib-45ffb33514488fd27b9355081a687db8312d97f4.tar.lz
nixlib-45ffb33514488fd27b9355081a687db8312d97f4.tar.xz
nixlib-45ffb33514488fd27b9355081a687db8312d97f4.tar.zst
nixlib-45ffb33514488fd27b9355081a687db8312d97f4.zip
nixos/gotosocial: init
Co-authored-by: Peder Bergebakken Sundt <pbsds@hotmail.com>
Diffstat (limited to 'nixos/modules/services/web-apps/gotosocial.md')
-rw-r--r--nixos/modules/services/web-apps/gotosocial.md64
1 files changed, 64 insertions, 0 deletions
diff --git a/nixos/modules/services/web-apps/gotosocial.md b/nixos/modules/services/web-apps/gotosocial.md
new file mode 100644
index 000000000000..a290d7d1893a
--- /dev/null
+++ b/nixos/modules/services/web-apps/gotosocial.md
@@ -0,0 +1,64 @@
+# GoToSocial {#module-services-gotosocial}
+
+[GoToSocial](https://gotosocial.org/) is an ActivityPub social network server, written in Golang.
+
+## Service configuration {#modules-services-gotosocial-service-configuration}
+
+The following configuration sets up the PostgreSQL as database backend and binds
+GoToSocial to `127.0.0.1:8080`, expecting to be run behind a HTTP proxy on `gotosocial.example.com`.
+
+```nix
+services.gotosocial = {
+  enable = true;
+  setupPostgresqlDB = true;
+  settings = {
+    application-name = "My GoToSocial";
+    host = "gotosocial.example.com";
+    protocol = "https";
+    bind-address = "127.0.0.1";
+    port = 8080;
+  };
+};
+```
+
+Please refer to the [GoToSocial Documentation](https://docs.gotosocial.org/en/latest/configuration/general/)
+for additional configuration options.
+
+## Proxy configuration {#modules-services-gotosocial-proxy-configuration}
+
+Although it is possible to expose GoToSocial directly, it is common practice to operate it behind an
+HTTP reverse proxy such as nginx.
+
+```nix
+networking.firewall.allowedTCPPorts = [ 80 443 ];
+services.nginx = {
+  enable = true;
+  clientMaxBodySize = "40M";
+  virtualHosts = with config.services.gotosocial.settings; {
+    "${host}" = {
+      enableACME = true;
+      forceSSL = true;
+      locations = {
+        "/" = {
+          recommendedProxySettings = true;
+          proxyWebsockets = true;
+          proxyPass = "http://${bind-address}:${toString port}";
+        };
+      };
+    };
+  };
+};
+```
+
+Please refer to [](#module-security-acme) for details on how to provision an SSL/TLS certificate.
+
+## User management {#modules-services-gotosocial-user-management}
+
+After the GoToSocial service is running, the `gotosocial-admin` utility can be used to manage users. In particular an
+administrative user can be created with
+
+```ShellSession
+$ sudo gotosocial-admin account create --username <nickname> --email <email> --password <password>
+$ sudo gotosocial-admin account confirm --username <nickname>
+$ sudo gotosocial-admin account promote --username <nickname>
+```