mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.git
synced 2025-01-15 13:26:37 +00:00
Merge pull request 'docsy' (#16) from docsy into master
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org/pulls/16
This commit is contained in:
commit
ee32ec4f30
|
@ -2,7 +2,6 @@
|
|||
title: "Team"
|
||||
date: 2017-01-05T
|
||||
weight: 3
|
||||
draft: true
|
||||
description: >
|
||||
Our team, contributors and like-minded people.
|
||||
---
|
||||
|
@ -11,13 +10,14 @@ description: >
|
|||
|
||||
International team of independent professionals:
|
||||
- [Zholnay Kirill](https://s.zholnay.name/@kirill) - Founder/CEO/CISO. For more than 15 years builds and protects corporate infrastructure in medium and large companies
|
||||
- **Dettlaff** - core-team backend developer
|
||||
- **Houkime** - core-team backend developer
|
||||
- **Inex Code** - core-team full-stack developer
|
||||
- **NaiJi** - core-team Flutter developer
|
||||
- **Dettlaff** - core-team backend developer
|
||||
- **ilchub** - DevOps, Backend developer
|
||||
- **kherel** - Flutter developer
|
||||
- **nikolai** - QA Engineer
|
||||
- and a lot of cool cotributors and [volonteers]
|
||||
- and a lot of cool cotributors and volonteers
|
||||
|
||||
## 🌠 We get help
|
||||
- [Roscomsvoboda](https://roskomsvoboda.org/). Speech in Russian [youtube](https://www.youtube.com/watch?v=mdeUTUPeJjA).
|
||||
|
|
7
content/en/docs/How To Guides/_index.md
Normal file
7
content/en/docs/How To Guides/_index.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "How-to guides"
|
||||
weight: 2
|
||||
date: 2023-03-14
|
||||
description: >
|
||||
These are the guides on how to perform common tasks.
|
||||
---
|
134
content/en/docs/How To Guides/manual_cleanup.md
Normal file
134
content/en/docs/How To Guides/manual_cleanup.md
Normal file
|
@ -0,0 +1,134 @@
|
|||
---
|
||||
title: "How to manually clean up your server's disk space"
|
||||
linkTitle: "Manual space cleanup"
|
||||
weight: 2
|
||||
date: 2023-03-14
|
||||
description: >
|
||||
Manual cleanup might be required if you need more space on system volume.
|
||||
categories: ["How-To Guides"]
|
||||
---
|
||||
|
||||
|
||||
{{% pageinfo color="warning" %}}
|
||||
All commands in this guide are run as root via SSH.
|
||||
If you do not have root access, refer to [this guide](/docs/how-to-guides/root_ssh/) for more information.
|
||||
|
||||
If you have no space left, you will only be able to use the SSH keys you previously added.
|
||||
If you run out of disk space and have not added any SSH keys, contact SelfPrivacy support for further assistance.
|
||||
{{% /pageinfo %}}
|
||||
|
||||
There are several ways to clean up your server's disk space.
|
||||
|
||||
To check how much disk space you have, run the following command:
|
||||
|
||||
```bash
|
||||
df -h
|
||||
```
|
||||
|
||||
This will output a table like this:
|
||||
|
||||
```
|
||||
Filesystem Size Used Avail Use% Mounted on
|
||||
devtmpfs 97M 0 97M 0% /dev
|
||||
tmpfs 969M 52K 969M 1% /dev/shm
|
||||
tmpfs 485M 3.8M 481M 1% /run
|
||||
tmpfs 969M 432K 968M 1% /run/wrappers
|
||||
/dev/sda1 19G 8.2G 9.5G 47% /
|
||||
/dev/sdb 18G 62M 17G 1% /volumes/sdb
|
||||
tmpfs 194M 0 194M 0% /run/user/0
|
||||
```
|
||||
|
||||
Here, the filesystem mounted on just `/` is your system volume.
|
||||
|
||||
## Deleting old NixOS generations
|
||||
|
||||
{{% alert title="Zero space warning" color="warning" %}}
|
||||
This method won't work if you have **no space left** on your system volume. Use other methods first.
|
||||
{{% /alert %}}
|
||||
|
||||
NixOS allows you to roll back to previous system states at any time, at the cost of disk space.
|
||||
SelfPrivacy servers are configured to reclaim disk space by automatically deleting old system states,
|
||||
but only states older than 7 days are deleted, so you can still use the rollback feature.
|
||||
|
||||
It is possible to manually delete all old system states, and it may give you more much needed disk space.
|
||||
To do this, simply run the following command as root:
|
||||
|
||||
```bash
|
||||
nix-collect-garbage -d
|
||||
```
|
||||
|
||||
This operation might take a while, depending on the number of system states you have.
|
||||
When it is done, you will see how much disk space you have freed up.
|
||||
|
||||
## Deleting old logs
|
||||
|
||||
Logs sometimes may take up quite a lot of disk space.
|
||||
On SelfPrivacy servers, system logs are always limited to 500MiB, but these are not the only
|
||||
log files you have on your server.
|
||||
|
||||
To check how much disk space logs take up, run the following command:
|
||||
|
||||
```bash
|
||||
du -h --max-depth=1 /var/log
|
||||
```
|
||||
|
||||
The output will look something like this:
|
||||
|
||||
```
|
||||
4.0K /var/log/private
|
||||
14M /var/log/nginx
|
||||
499M /var/log/journal
|
||||
587M /var/log
|
||||
```
|
||||
|
||||
### System journal
|
||||
|
||||
Here, `/var/log/journal` are the system logs where all apps usually write their logs. As you can see in this example,
|
||||
they respect the 500MiB limit.
|
||||
|
||||
If you want to clear *all* system logs, run the following command:
|
||||
|
||||
```bash
|
||||
journalctl --rotate && journalctl --vacuum-time=1s
|
||||
```
|
||||
|
||||
This will usually give you around 450 MiB of free disk space, but not for long.
|
||||
This may though be enough to run some commands that will free up more space.
|
||||
|
||||
### Nginx logs
|
||||
|
||||
The `/var/log/nginx` directory contains logs for the Nginx web server. If they got too big, you can clear them by running:
|
||||
|
||||
```bash
|
||||
rm /var/log/nginx/* && systemctl reload nginx
|
||||
```
|
||||
|
||||
As you can see, we don't just delete the files, but also reload Nginx.
|
||||
This is because Nginx will get confused by the missing log files, and they will not be recreated until Nginx is reloaded.
|
||||
|
||||
## Deleting old system
|
||||
|
||||
{{% alert color="warning" %}}
|
||||
This operation can only be performed once during the lifetime of your server.
|
||||
|
||||
If you have installed SelfPrivacy on your own hardware, this may lead to some data loss.
|
||||
{{% /alert %}}
|
||||
|
||||
When you install SelfPrivacy on a server, the existing system gets replaced by NixOS. But the old system is still there
|
||||
and takes up disk space, so you can roll back to it if you want.
|
||||
|
||||
To measure how much disk space the old system takes up, run the following command:
|
||||
|
||||
```bash
|
||||
du -h --max-depth=1 /old-root/
|
||||
```
|
||||
|
||||
If there is no old system in place, you will see `du: cannot access '/old-root/': No such file or directory`.
|
||||
|
||||
But if you do have an old system, you may delete it by running the following command:
|
||||
|
||||
```bash
|
||||
rm -rf /old-root/
|
||||
```
|
||||
|
||||
This usually frees up around 1.8 GiB of disk space on typical SelfPrivacy servers.
|
91
content/en/docs/How To Guides/root_ssh/_index.md
Normal file
91
content/en/docs/How To Guides/root_ssh/_index.md
Normal file
|
@ -0,0 +1,91 @@
|
|||
---
|
||||
title: "How to get root access via SSH"
|
||||
linkTitle: "Root access via SSH"
|
||||
weight: 1
|
||||
date: 2023-03-14
|
||||
description: >
|
||||
If you need to manually perform some tasks, you can get root access via SSH.
|
||||
categories: ["How-To Guides"]
|
||||
---
|
||||
|
||||
To access your server's root shell you will have to generate your SSH key and add it to your server's authorized keys.
|
||||
|
||||
## How to generate SSH key
|
||||
|
||||
### Unix-like systems (PC)
|
||||
|
||||
1. Open the terminal.
|
||||
2. Run the following command:
|
||||
```bash
|
||||
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
|
||||
```
|
||||
You will be asked to enter a passphrase. You can leave it empty, but it is recommended to use a passphrase.
|
||||
If you do not want to use a passphrase, press **Enter**.
|
||||
3. Print the public key to the terminal and copy it:
|
||||
```bash
|
||||
cat ~/.ssh/id_ed25519.pub
|
||||
```
|
||||
4. Refer to the next section to add the key to your server.
|
||||
|
||||
### Windows
|
||||
|
||||
1. Open settings and under "Applications" click on "Manage additional components".
|
||||
2. Press "Add Component".
|
||||
3. Enter "OpenSSH client" in the search box and install it.
|
||||
4. Open the Command Prompt. You can do this by pressing **Win+R**, typing `cmd` and pressing **Enter**.
|
||||
5. Run the following command, replacing `user_name` with your Windows username:
|
||||
```ps1
|
||||
ssh-keygen -t ed25519 -f C:\Users\user_name\.ssh\id_ed25519.pub
|
||||
```
|
||||
You will be asked to enter a passphrase. You can leave it empty, but it is recommended to use a passphrase.
|
||||
If you do not want to use a passphrase, press **Enter**.
|
||||
6. Print the public key to the terminal and copy it:
|
||||
```ps1
|
||||
type C:\Users\user_name\.ssh\id_ed25519.pub
|
||||
```
|
||||
Once again, replace `user_name` with your Windows username.
|
||||
7. Refer to the next section to add the key to your server.
|
||||
|
||||
### Android (Termux)
|
||||
|
||||
0. Install [Termux](https://termux.dev/en/). We recommend installing it from F-Droid.
|
||||
1. Open Termux.
|
||||
2. Run the following command:
|
||||
```bash
|
||||
apt update -y && apt upgrade -y && apt install open-ssh -y &&
|
||||
ssh-keygen -t ed25519 -f /data/data/com.termux/files/usr/etc/ssh/ssh_host_ed25519_key
|
||||
```
|
||||
You will be asked to enter a passphrase. You can leave it empty, but it is recommended to use a passphrase.
|
||||
If you do not want to use a passphrase, press **Enter**.
|
||||
3. Print the public key to the terminal and copy it:
|
||||
```bash
|
||||
cat /data/data/com.termux/files/usr/etc/ssh/ssh_host_ed25519_key.pub
|
||||
```
|
||||
4. Refer to the next section to add the key to your server.
|
||||
|
||||
## How to add the key to your server
|
||||
|
||||
0. Open the SelfPrivacy app.
|
||||
1. Go to the "More" tab.
|
||||
2. Tap on "Superuser SSH keys".
|
||||
3. Tap on the "Create SSH key" button.
|
||||
4. Paste the public key you copied earlier.
|
||||
5. Tap on the "Create SSH key" button.
|
||||
6. Open the Jobs list
|
||||
7. Tap on the "Start" button.
|
||||
8. In a few minutes, you will be able to access your server's root shell via SSH.
|
||||
|
||||
{{< imgproc more-superuser Fill "1001x808">}}
|
||||
{{< /imgproc >}}
|
||||
|
||||
## How to access your server's root shell via SSH
|
||||
|
||||
1. Open the terminal or Command Prompt.
|
||||
2. Run the following command, replacing `server_ip` with your server's domain:
|
||||
```bash
|
||||
ssh root@server_domain
|
||||
```
|
||||
3. Enter the passphrase you entered when generating the SSH key, if you used one.
|
||||
|
||||
Be careful when using the root shell. If you do not know what you are doing, you can break your server or leak your data.
|
||||
Responsibility for the consequences of your actions lies with you. Respect the privacy of other users.
|
BIN
content/en/docs/How To Guides/root_ssh/more-superuser.png
Normal file
BIN
content/en/docs/How To Guides/root_ssh/more-superuser.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 115 KiB |
|
@ -2,7 +2,6 @@
|
|||
title: "Команда"
|
||||
date: 2017-01-05T
|
||||
weight: 3
|
||||
draft: true
|
||||
description: >
|
||||
Наша команда, вкладчики и единомышленники.
|
||||
---
|
||||
|
@ -11,13 +10,14 @@ description: >
|
|||
|
||||
Международная команда независимых профессионалов:
|
||||
- [Zholnay Kirill](https://s.zholnay.name/@kirill) - Основатель/CEO/CISO. Более 15 лет создает и защищает корпоративную инфраструктуру в средних и крупных компаниях
|
||||
- **Dettlaff** - основной backend разработчик
|
||||
- **Houkime** - основной backend разработчик
|
||||
- **Inex Code** - основной full-stack разработчик
|
||||
- **NaiJi** - основной Flutter разработчик
|
||||
- **Dettlaff** - основной backend разработчик
|
||||
- **ilchub** - DevOps, Backend разработчик
|
||||
- **kherel** - Flutter разработчик
|
||||
- **nikolai** - QA инженер
|
||||
- и много крутых соавторов и [добровольцев].
|
||||
- и много крутых соавторов и добровольцев.
|
||||
|
||||
## 🌠 Нам помогли
|
||||
- [Роскомсвобода](https://roskomsvoboda.org/). Выступление на русском языке [youtube](https://www.youtube.com/watch?v=mdeUTUPeJjA).
|
||||
|
|
Loading…
Reference in a new issue