Skip to content

Commit 239bdd9

Browse files
committed
docs(versioning): add versioning for version 1.19.0
1 parent cd9c177 commit 239bdd9

File tree

266 files changed

+5014
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+5014
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"label": "Advanced",
3+
"collapsed": true,
4+
"position": 4,
5+
"link": {
6+
"type": "generated-index",
7+
"title": "Advanced Concepts or features"
8+
}
9+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"collapsed": true,
3+
"label": "Command line interface"
4+
}
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Fix usernames
2+
3+
:::info
4+
5+
This guide requires that you understand [how to access the CLI](../).
6+
7+
:::
8+
9+
If you somehow get into a situation where you have users with usernames that contain uppercase characters and you are no longer able to log in, you can use the following command to fix the usernames.
10+
11+
```bash
12+
homarr fix-usernames
13+
```
14+
15+
This will convert all credential usernames to lowercase and update the database accordingly.
16+
17+
![](./img/screenshot-cli.png)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Command line interface
2+
3+
The Homarr image ships with a built-in recovery tool. This can be useful, if you do not have access to Homarr or if something is not working.
4+
Please note that the CLI is an *emergency tool*, not an API tool.
5+
6+
:::caution
7+
8+
Using the recovery CLi tool can cause problems when requests are being sent to Homarr while the tool is running. \
9+
You should also create a backup of the database, in case you break something.
10+
11+
:::
12+
13+
## Execute CLI with Docker
14+
15+
1. Execute ``docker ps | grep homarr`` on the root system with Docker to find the container ID of your Homarr container.
16+
2. Run ``docker exec -it <container-id> /bin/bash homarr <your-command-goes-here>``. \
17+
Replace ``<container-id>`` with your container ID from step 1. \
18+
Replace ``<your-command-goes-here>`` with the command you want to execute (see sub-pages).
19+
20+
## Execute CLI with QNAP
21+
22+
1. Open Container Station in the QNAP Web Interface ![](img/334116069-e7ec4726-3df7-4dc6-a3e0-b745e7eef17f.png)
23+
2. Select Containers in the menu bar on the left ![](img/334116205-aa09ce40-0701-4f7d-b9f9-b431b9d207c5.png)
24+
3. Select your Homarr Container ![](img/334116303-714b5e07-b9de-4ec0-a2bc-def7ee38750f.png)
25+
4. Click "Execute" in the top right of the Window. ![](img/334116411-df1482f9-3aa9-4686-b77f-e0dca09e60b2.png)
26+
5. Select /bin/bash and click Execute ![](img/334116518-e1ddb515-99c7-4159-81bf-76e889d1e808.png)
27+
6. Run the Homarr command and press enter (eg. homarr reset-owner-password) ![](img/334116642-08c4f204-5cd0-4e4e-a785-0142e1b279ca.png)
Loading
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Password Recovery
2+
3+
:::info
4+
5+
This guide requires that you understand [how to access the CLI](../).
6+
7+
:::
8+
9+
Using this command, you can forcefully reset the password of a user.
10+
It will be set to a random value and the hash for the user will be updated.
11+
All sessions for that user will be terminated and the user must re-login.
12+
13+
![](./img/screenshot-cli.png)
14+
15+
Using the ``--username`` parameter, you can specify who you want to reset the password for.
16+
Executing the command will create a new random password, update the database and display the new password.
17+
All sessions for this user will be terminated and they must re-login.
18+
19+
![](./img/screenshot-cli-result.png)
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"label": "Developer guides",
3+
"position": 6,
4+
"collapsed": true,
5+
"link": {
6+
"type": "generated-index"
7+
}
8+
}
9+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: Getting started
3+
tags:
4+
- Developer
5+
- Technical documentation
6+
- Code
7+
- Programming
8+
sidebar_position: 1
9+
---
10+
11+
## Setting up your development environment
12+
13+
This guide will help you set up your development environment to start contributing to homarr.
14+
15+
### Prerequisites
16+
17+
- **Node.js (lts)**: You can download it from the [official website](https://nodejs.org/).
18+
- **pnpm (latest)**: You can install it by running `npm install -g pnpm`.
19+
- **Git**: You can download it from the [official website](https://git-scm.com/).
20+
- **Docker or Docker Desktop**: You can download it from the [official website](https://www.docker.com/).
21+
- **A GitHub account**: You can create one on the [official website](https://github.com/).
22+
23+
### Setting up the project
24+
25+
1. Fork the repository by clicking on the "Fork" button on the top right corner of the repository page.
26+
27+
![Fork button](./img/fork.png)
28+
29+
2. Clone the repository to your local machine with `git clone`. You can find the url to use by clicking on the "Code" button on the top right corner of your forks repository page.
30+
31+
![Clone button](./img/clone.png)
32+
33+
3. Change directory to the project folder with `cd homarr`.
34+
35+
4. Install the dependencies with `pnpm install`.
36+
37+
5. Start redis by running `pnpm run docker:dev`. This will run a docker-compose file with a redis service.
38+
39+
6. Copy the `.env.example` file to `.env` and replace `DB_URL` with the full path you want to use for the sqlite database file. For example `DB_URL='C:\\Dev\\homarr\\packages\\db\\db.sqlite'`
40+
41+
7. Run the migrations to create the sqlite db file with `pnpm run db:migration:sqlite:run`.
42+
43+
8. Start the development server with `pnpm dev` and wait for a message that says `✓ Ready in 10.7s`
44+
45+
9. Open your browser and navigate to [http://localhost:3000](http://localhost:3000). (Loading the page might take up to 2 minutes the first time)
46+
47+
### Useful npm scripts
48+
49+
#### During development
50+
51+
- `pnpm dev`: Start the development server.
52+
- `pnpm cli`: Run cli commands.
53+
- `pnpm db:migration:sqlite:run`: Run the migrations to create or update the sqlite db file.
54+
- `pnpm db:migration:sqlite:generate`: Generate a new migration file for the sqlite db. Also works with `mysql`.
55+
- `pnpm db:studio`: Open a visual studio for the database.
56+
- `pnpm package:new`: Create a new package in the monorepo.
57+
58+
#### Checking code quality
59+
60+
- `pnpm lint`: Run the linter to check for code quality issues.
61+
- `pnpm format:fix`: Run the formatter to fix code style issues.
62+
- `pnpm test`: Run the tests. You can also use `pnpm test:ui` to get a UI for the tests.
63+
- `pnpm typecheck`: Run the typescript type checker.
64+
65+
#### Building the project
66+
- `pnpm build`: Build the project for production.
67+
- `docker build -t homarr .`: Build a docker image for the project.
68+
- `docker run -p 7575:7575 -e SECRET_ENCRYPTION_KEY='your_64_character_hex_string' homarr:latest`: Run the created docker image.
Loading
Loading
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: Kubernetes
3+
tags:
4+
- Developer
5+
- Technical documentation
6+
- Code
7+
- Programming
8+
sidebar_position: 1
9+
---
10+
11+
This guide provides step-by-step instructions for setting up a Kubernetes cluster using kind, configuring multiple nodes, and installing the Metrics Server.
12+
13+
## Prerequisites
14+
15+
Ensure you have the following installed:
16+
17+
- [Docker](https://docs.docker.com/get-started/get-docker/) (required for running `kind` clusters).
18+
- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/) (Kubernetes in Docker).
19+
- [Kubectl](https://kubernetes.io/docs/tasks/tools/) (Kubernetes command-line tool).
20+
21+
Additionally, ensure that Kubernetes tools are enabled in your environment by setting the following variable in your `.env` file:
22+
23+
```bash
24+
# Enable Kubernetes tool
25+
ENABLE_KUBERNETES=true
26+
```
27+
28+
### 1. Creating a Kubernetes Cluster with Multiple Nodes
29+
30+
We will create a Kubernetes cluster using `kind` with one control plane node and two worker nodes.
31+
32+
#### Define the Cluster Configuration
33+
34+
Create a configuration file named `kind-config.yaml` with the following content:
35+
36+
```bash
37+
cat > kind-config.yaml <<EOF
38+
# three node (two workers) cluster config
39+
kind: Cluster
40+
apiVersion: kind.x-k8s.io/v1alpha4
41+
nodes:
42+
- role: control-plane
43+
kubeadmConfigPatches:
44+
- |
45+
kind: KubeletConfiguration
46+
apiVersion: kubelet.config.k8s.io/v1beta1
47+
kubeReserved:
48+
cpu: "250m"
49+
memory: "256Mi"
50+
systemReserved:
51+
cpu: "500m"
52+
memory: "512Mi"
53+
evictionHard:
54+
memory.available: "200Mi"
55+
- role: worker
56+
- role: worker
57+
EOF
58+
```
59+
60+
#### Create the Cluster
61+
62+
Run the following command to create the Kubernetes cluster:
63+
64+
```bash
65+
kind create cluster --name k8s-playground --config kind-config.yaml
66+
```
67+
68+
This will provision a cluster named `k8s-playground` with the specified node configuration.
69+
70+
### 2. Installing the Metrics Server
71+
72+
The Metrics Server is required for gathering resource utilization metrics like CPU and memory usage. It is essential for features such as Horizontal Pod Autoscaling.
73+
74+
#### Deploy the Metrics Server
75+
76+
Run the following command to install the Metrics Server:
77+
78+
```bash
79+
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.7.2/components.yaml
80+
```
81+
82+
#### Disable TLS Verification (For Local Development)
83+
84+
In local environments, Kubernetes nodes might not have valid certificates. To disable TLS verification, patch the deployment:
85+
86+
```bash
87+
kubectl patch -n kube-system deployment metrics-server --type=json \
88+
-p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]'
89+
```
90+
91+
This allows the Metrics Server to communicate with kubelets that use self-signed certificates.
92+
93+
### 3. Verifying the Setup
94+
95+
After completing the setup, verify that the cluster is running correctly:
96+
97+
#### Check the Cluster Nodes
98+
99+
```bash
100+
kubectl get nodes
101+
```
102+
103+
Expected output:
104+
105+
```bash
106+
NAME STATUS ROLES AGE VERSION
107+
k8s-playground-control-plane Ready control-plane Xs vX.Y.Z
108+
k8s-playground-worker Ready worker Xs vX.Y.Z
109+
k8s-playground-worker2 Ready worker Xs vX.Y.Z
110+
```
111+
112+
#### Check Metrics Server Status
113+
114+
```bash
115+
kubectl get deployment -n kube-system metrics-server
116+
```
117+
118+
Expected output:
119+
120+
```bash
121+
NAME READY UP-TO-DATE AVAILABLE AGE
122+
metrics-server 1/1 1 1 Xs
123+
```
124+
125+
#### Get Node Resource Metrics
126+
127+
```bash
128+
kubectl top nodes
129+
```
130+
131+
This command should return CPU and memory usage statistics for each node.
132+
133+
## Conclusion
134+
135+
You have successfully set up a multi-node Kubernetes cluster using kind and installed the Metrics Server for monitoring resource usage. This setup is useful for local development and testing Kubernetes workloads before deploying them to a production environment.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Environment variables
3+
tags:
4+
- Configuration
5+
- Docker
6+
- Advanced
7+
- Env
8+
- Environment variables
9+
- Variables
10+
- Database
11+
---
12+
13+
Homarr offers a Docker Container, which can be run on any compatible system, such as Unraid, Kubernetes and many more systems! Our Docker container is based on the ``22.12.0-alpine`` image and serves per standard on the port `7575`.
14+
15+
---
16+
17+
Homarr offers a few environment variables, which can be used to configure the container.
18+
19+
## General
20+
21+
:::warning
22+
Using the `PUID` and `PGID` will require you to set the correct permissions on the mounted volumes and if used the docker socket. See more in the [Running as a different user](/docs/advanced/running-as-different-user) documentation.
23+
:::
24+
25+
| Environment Variable | Description | Possible values | Default |
26+
| ------------------------ | ----------- | --------------- | ------- |
27+
| ``PUID`` | User ID to run the container as | Any valid user ID | ``0`` |
28+
| ``PGID`` | Group ID to run the container as | Any valid group ID | ``0`` |
29+
| ``LOG_LEVEL`` | Log level to use | ``debug`` / ``info`` / ``warn`` / ``error`` | ``info`` |
30+
31+
32+
## Authentication
33+
34+
See [Single Sign-On](/docs/advanced/single-sign-on) for more informations.
35+
36+
## Security
37+
38+
The `SECRET_ENCRYPTION_KEY` is required. If none is specified before starting the container, a random key will be shown in the error message and the container will exit.
39+
40+
| Environment Variable | Description | Possible values | Default |
41+
| ------------------------ | ----------- | --------------- | ------- |
42+
| ``SECRET_ENCRYPTION_KEY`` | Secret used to encrypt secrets in database. | 64 character hex string | - |
43+
44+
:::info
45+
A random secret can be generated by using the following command: `openssl rand -hex 32`
46+
:::
47+
48+
## Docker
49+
50+
| Environment Variable | Description | Possible values | Default |
51+
| ------------------------ | ----------- | --------------- | ------- |
52+
| ``DOCKER_HOSTNAMES`` | Comma seperated list of hostnames to connect to | For example `localhost,docker.example.com` | - |
53+
| ``DOCKER_PORTS`` | Comma seperated list of ports to connect to | For example `2375,2376` | - |
54+
55+
## Database
56+
| Environment Variable | Description | Possible values | Default |
57+
| ------------------------ | ----------- | --------------- | ------- |
58+
| ``DB_DRIVER`` | Database driver to use. Currently `better-sqlite3` is used for sqlite and `mysql2` for mysql | ``better-sqlite3`` / ``mysql2`` | ``better-sqlite3`` |
59+
| ``DB_DIALECT`` | Database dialect to use. | ``sqlite`` / ``mysql`` | ``sqlite`` |
60+
| ``DB_URL`` | Database URL to connect to. | Any valid database URL | ``/appdata/db/db.sqlite`` |
61+
| ``DB_HOST`` | Database host to connect to. | Any valid database host | - |
62+
| ``DB_PORT`` | Database port to connect to. | Any valid database port | - |
63+
| ``DB_NAME`` | Database name to connect to. | Any valid database name | - |
64+
| ``DB_USER`` | Database user to connect with. | Any valid database user | - |
65+
| ``DB_PASSWORD`` | Database password to connect with. | Any valid database password | - |
66+
67+
You can either use the url or host, port, name and credentials combined. The URL will be prioritized over the other values.
68+
69+
70+
71+
## Advanced deployments
72+
73+
:::warning
74+
The advanced deployments environment variables should only be used if you know what you are doing.
75+
:::
76+
77+
| Environment Variable | Description |
78+
| ------------------------ | ----------- |
79+
| ``DB_MIGRATIONS_DISABLED`` | Disable db migrations. For example for helm charts |
Loading

0 commit comments

Comments
 (0)