vps/README.md
2024-10-08 20:56:26 +02:00

60 lines
1.1 KiB
Markdown

# vps
This repository contains all the files I use to manage my services hosted on [viyurz.fr](https://viyurz.fr).
## Requirements
### Initial setup
Run the setup script:
```sh
./setup.sh
```
### SSL certificates
Install Certbot:
```
sudo apt install -y certbot python3-certbot-dns-ovh python3-certbot-nginx
```
Request certificates:
```
# For the NGINX reverse proxy
sudo certbot certonly --nginx -d viyurz.fr,*.viyurz.fr
# For Coturn
bash <(wget -q -O - https://github.com/zerossl/zerossl-bot/raw/master/get-zerosslbot.sh)
sudo zerossl-bot certonly --nginx -m viyurz@viyurz.fr -d turn.viyurz.fr
# For the mailserver
sudo certbot certonly --nginx -d mail.viyurz.fr
```
### Secrets
Copy the existing `secrets.yml.example` file to `secrets.yml` and fill the variables.
### Storagebox
Add credential:
```
/etc/storagebox-cifs-credentials.txt
---
username=MYUSERNAME
password=MYPASSWORD
```
Copy the file `fstab` and edit it accordingly (username and potentially uids/gids).
## Backups
Create a cronjob to periodically backup all projects:
```
0 4 * * * /home/viyurz/vps/manage.py backup ''
```