Olaf the Great NAS, config for my home NAS
This repo has been replaced by JenswBE/ansible
Config for my home NAS
olaf-clc.yml
. Use mkpasswd --method=SHA-512 --rounds=4096
to generate a secure password hash.ct -strict < olaf-clc.yml > olaf-clc.json
coreos-install -d /dev/sdX -i olaf-clc.json
sudo hostnamectl set-hostname olaf
sudo timedatectl set-timezone Europe/Brussels
sudo mkdir -p /opt/bin /opt/conf
Use following instructions and install Docker compose at /opt/bin/docker-compose
git clone https://github.com/JenswBE/olaf.git
.env.template
to .env
chmod 600 .env
.env
using sudo ln -s /<ABSOLUTE_PATH>/.env /opt/docker-env
Send mail on failed unit. See JenswBE/systemd-mailjet for more info.
sudo useradd -r systemd-mailjet
bin/systemd-mailjet
to /opt/bin/systemd-mailjet
sudo chmod +x /opt/bin/systemd-mailjet
conf/systemd-mailjet.conf
and copy to /opt/conf/systemd-mailjet.conf
sudo chmod 400 /opt/conf/systemd-mailjet.conf
sudo chown systemd-mailjet:systemd-mailjet /opt/conf/systemd-mailjet.conf
Add for each host a file which contains a single line with the hosts public SSH key. The filename will become the name of the borg repo. E.g. conf/borgserver/clients/test123
becomes ssh://borg@<SERVER_NAME>/backup/test123/<REPO_NAME>
. See docker-borgserver for more info.
docker exec -it borgmatic sh -c "ssh -p <PORT> <BORG_USER>@<BORG_HOST>"
, check and accept the host keyssh-keygen
and create a new ssh key with blank passphrase in conf/borgmatic/ssh
conf/borgmatic/borgmatic.d/config.yaml
chmod 600 config.yaml
docker exec borgmatic sh -c "borgmatic --init --encryption repokey-blake2"
docker exec borgmatic sh -c "borgmatic --verbosity 1"
docker exec borgmatic sh -c "BORG_RSH=\"ssh -i /root/.ssh/<NAME_OF_SSH_KEY>\" borg key export --qr-html <FULL_REPO_NAME> /root/.ssh/repokey.html"
. Your file is available at conf/borgmatic/ssh/repokey.html
.sudo chown 233:233 /media/data/services/transmission/
/downloads
/running
Go to https://app.plex.tv to setup following libraries:
You can create a new bucket and assign read/write right to a user with following commands:
docker run -it --entrypoint=/bin/sh minio/mc
mc config host add remote <URL> <ACCESS_KEY> <SECRET_KEY>
BUCKET=<REPLACE_ME>
mc mb remote/${BUCKET:?}
cat > ${BUCKET:?}-rw.json << EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["s3:*"],
"Effect": "Allow",
"Resource": ["arn
s3:::${BUCKET:?}/*"]
}
]
}
EOF
mc admin policy add remote ${BUCKET:?}-rw ${BUCKET:?}-rw.json
mc admin user add remote <USERNAME> <PASSWORD>
mc admin policy set remote ${BUCKET:?}-rw user=<USERNAME>