commit 34a472cc7192a3b540dbc485cf563b05bed7373d
parent d1096a7c167dbdf6942afcaa75de699e07839eb3
Author: AndrewLockVI <andrew@laack.co>
Date: Mon, 10 Feb 2025 10:58:00 -0600
Updated self hosting docs
Diffstat:
7 files changed, 115 insertions(+), 2 deletions(-)
diff --git a/docs/ComputerSecurity.md b/docs/ComputerSecurity.md
@@ -75,3 +75,7 @@ Main index for notes related to CSCI 370, Computer Security
##### 2.7 - Chinese Remainder Theorem
- [Chinese Remainder Theorem](ChineseRemainderTheorem.md)
+
+##### 2.8 - Discrete Logarithms
+
+- [Primitive Roots](PrimitiveRoots.md)
diff --git a/docs/DocumentationHosting.md b/docs/DocumentationHosting.md
@@ -0,0 +1,38 @@
+# Documentation/Wikis
+
+Documentation hosting is important and depending on ones needs, different solutions may be optimal.
+
+##### SSGs
+
+Static site generators are a dime a dozen, and they are great from a performance perspective and easy to maintain. I will not go into the specifics of each one but some popular one are Jekyll, Hugo, and Mkdocs. This approach for documentation hosting has pros and cons, as shown below.
+
+**Pros:**
+
+1. Simple to setup
+2. Lightweight
+3. Easy to maintain
+4. Easy to use with git versioning
+
+**Cons:**
+
+1. Limited in functionality
+
+From the perspective of a developer, SSGs are my preferred approach to documentation because editing can be done via any text editor and versioning can be done with git. If a proper CD pipeline has been implemented, the process of editing these documents is seamless and the performance and security of the web server are not of much concern because it is simply Nginx hosting HTML files.
+
+The main con of SSGs is they are difficult for non-technical users to change. Given that they are often versioned with git and created by writing markdown files, non-technical users will likely not have a pleasant time trying to make documentation changes which is where wikis come into play.
+
+##### Wikis
+
+Wikis are great when non-technical people need to make changes to shared documents or in cases where a web UI for editing documents is mandatory.
+
+###### MediWiki
+
+This portion of the docs has not been completed. Feel free to submit a PR via email if you would like to contribute!
+
+###### DokuWiki
+
+This portion of the docs has not been completed. Feel free to submit a PR via email if you would like to contribute!
+
+###### BookStack
+
+This portion of the docs has not been completed. Feel free to submit a PR via email if you would like to contribute!
diff --git a/docs/EulersTotientFunction.md b/docs/EulersTotientFunction.md
@@ -4,8 +4,6 @@
**Chapter:** 2.5
-
-
**Definition:** Euler's totient function, denoted as $\phi$, is the number of positive integers less than $n$ and relatively prime to $n$.
Note: $\phi(1) = 1$ by convention, which does not make much sense.
diff --git a/docs/FileHosting.md b/docs/FileHosting.md
@@ -0,0 +1,51 @@
+# File Hosting
+
+There are many file hosting implementations, and they differ in slight ways. Below are a list of them and my general findings about each implementation.
+
+#### Implementations
+
+##### Nextcloud
+
+Nextcloud is a popular choice for file hosting and it works great for a lot of people. Below are some pros and cons to the service.
+
+**Pros:**
+
+1. Relatively easy to set up
+2. Good out of the box configuration
+3. Lots of features
+4. Rich plugin library
+5. Large community of users
+6. Good auth support
+7. Collaborative document editing
+8. Video conferencing support
+
+**Cons:**
+
+1. Relatively slow compared to less featureful alternatives
+2. Large codebase (ie. many potential attack vectors)
+3. Difficult to upgrade without breaking features
+
+It is often noted by Nextcloud users that migrating to newer versions is difficult because things start to break. It seems that Nextcloud AIO, an officially supported configuration of Nextcloud, does not often run into these issues, but AIO is also limited to 100 users before to having to pay for the service.
+
+The main dealbreaker for many is the performance of Nextcloud. Even with Redis caching and a dedicated database (not SQLite), the web UI feels quite slow. With that said, one is hard pressed to find an alternative to Nextcloud that has the ability to easily integrate video conferencing, collaborative document editing, and authentication all in one.
+
+##### Dufs
+
+Dufs is a simple rust based file sharing site. Listed below are pros and cons for the service.
+
+**Pros:**
+
+1. Lightweight
+2. Performant
+3. Authentication support\*
+
+**Cons:**
+
+1. No user creation web UI
+2. Lack of support for collaborative editing
+
+Dufs is a stripped down file sharing service, narrowly beating out a directory listing in terms of functionality. Dufs allows for editing text files from the web UI, downloading directories as zip files, and authenticating users so they can only access specific directories.
+
+One of the main issue with Dufs is their implementation of authentication. When using docker-compose, a string is passed in via the configuration that defines users and what directories they access as opposed to having an admin console in the application and saving the containers persistent storage. This makes Dufs not suitable for managing a large number of users, but fairly easy to manage when there are only a few different access levels being granted. The other issue some may have with Dufs is its barebones nature. Dufs does not support anything outside of simple file sharing and basic text file manipulation. If more features are needed, other services will need to be used in tandem or Dufs will need to be replaced entirely.
+
+This is what I personally use for sharing files with people because it allows me to create shareable directories that anyone can access if they have the username and password for my guest viewing account of said directory. I find this easier than configuring Nginx or Apache to do directory listing even though the same functionality could be achieved with them. Additionally, I don't have any need for collaboration so this works perfectly, and I value performance and the UNIX philosophy of do one thing well. As I write this dufs is sitting idle using 7MB of memory, slightly less than my Nginx servers which are at ~7.5MB.
diff --git a/docs/PrimitiveRoots.md b/docs/PrimitiveRoots.md
@@ -0,0 +1,7 @@
+# Primitive Roots
+
+**Source:** Computer and Network Security
+
+**Chapter:** 2.8
+
+**Definition:** Primitive roots are integers $a$ such that $a, a^2, ..., a^{\phi(n)}$ are distinct mod $n$.
diff --git a/docs/SelfHosting.md b/docs/SelfHosting.md
@@ -0,0 +1,14 @@
+# Self Hosting
+
+This is the index for self hosting information/documentation.
+
+## Services
+
+- [File Hosting](FileHosting.md)
+- [Documentation Hosting](DocumentationHosting.md)
+- Git Hosting
+ - Feel free to clone the repo and send a PR via email if you would like to fill this out!
+- CI/CD
+ - Feel free to clone the repo and send a PR via email if you would like to fill this out!
+- Password Managers
+ - Feel free to clone the repo and send a PR via email if you would like to fill this out!
diff --git a/docs/index.md b/docs/index.md
@@ -7,3 +7,4 @@ Welcome to my notes, I hope you can learn something - Andrew
- [Computer Science](ComputerScience.md)
- [Math](Math.md)
- [Machine Learning](MachineLearning.md)
+- [Self Hosting](SelfHosting.md)