2024-06-29 02:32:50 +02:00
|
|
|
# What we need
|
|
|
|
|
2024-06-29 02:49:55 +02:00
|
|
|
* server with Ubuntu
|
2024-06-29 02:32:50 +02:00
|
|
|
* DNS entry
|
|
|
|
* SSL certificates via https://onlinetools.zfn.uni-bremen.de/server/content/onlinetools/
|
|
|
|
|
|
|
|
|
|
|
|
# Install notes
|
2024-06-29 03:26:00 +02:00
|
|
|
|
|
|
|
```
|
2024-06-29 02:26:38 +02:00
|
|
|
apt update
|
|
|
|
apt upgrade
|
|
|
|
|
2024-06-29 03:27:30 +02:00
|
|
|
apt install git pkg-config libssl-dev curl mc argon2 ca-certificates net-tools
|
2024-06-29 02:26:38 +02:00
|
|
|
|
|
|
|
install -m 0755 -d /etc/apt/keyrings
|
|
|
|
|
|
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
|
|
|
|
|
|
|
chmod a+r /etc/apt/keyrings/docker.asc
|
|
|
|
|
|
|
|
echo \
|
|
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
|
|
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
|
|
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
|
|
|
|
|
|
apt-get update
|
|
|
|
|
|
|
|
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
|
|
|
|
2024-06-29 03:21:53 +02:00
|
|
|
echo "{" > /etc/docker/daemon.json
|
|
|
|
echo ' "iptables": false' >> /etc/docker/daemon.json
|
|
|
|
echo "}" >> /etc/docker/daemon.json
|
2024-06-29 02:26:38 +02:00
|
|
|
|
2024-06-29 03:21:53 +02:00
|
|
|
systemctl restart docker
|
2024-06-29 02:39:46 +02:00
|
|
|
|
2024-06-29 03:21:53 +02:00
|
|
|
ufw allow in on docker0
|
|
|
|
ufw route allow in on docker0
|
|
|
|
ufw route allow out on docker0
|
2024-06-29 02:49:55 +02:00
|
|
|
|
|
|
|
ufw allow 22
|
|
|
|
ufw allow 443
|
|
|
|
ufw enable
|
|
|
|
|
2024-06-29 03:21:53 +02:00
|
|
|
ufw status verbose
|
|
|
|
|
|
|
|
docker run hello-world
|
|
|
|
|
|
|
|
mkdir /root/nginx
|
|
|
|
mkdir /root/vaultwarden
|
2024-06-29 03:26:00 +02:00
|
|
|
```
|
2024-06-29 03:21:53 +02:00
|
|
|
|
2024-06-29 03:23:24 +02:00
|
|
|
# Check the ports with an external computer
|
2024-06-29 03:21:53 +02:00
|
|
|
|
2024-06-29 03:23:24 +02:00
|
|
|
```
|
|
|
|
nmap -v -A vaultwarden.neuro.uni-bremen.de
|
|
|
|
```
|
2024-06-29 02:49:55 +02:00
|
|
|
|
2024-06-29 02:39:46 +02:00
|
|
|
# What now?
|
2024-06-29 13:20:05 +02:00
|
|
|
|
|
|
|
## We need this in /root/mysql:
|
|
|
|
|
|
|
|
* .env: Change both passwords
|
|
|
|
* compose.yml
|
|
|
|
|
|
|
|
In /root/mysql
|
|
|
|
|
|
|
|
Start docker:
|
|
|
|
```
|
|
|
|
docker compose up -d
|
|
|
|
```
|
|
|
|
|
|
|
|
Stop docker:
|
|
|
|
```
|
|
|
|
docker compose down
|
|
|
|
```
|
|
|
|
|
|
|
|
Show logs continously:
|
|
|
|
```
|
|
|
|
docker compose logs -f
|
|
|
|
```
|
|
|
|
|
|
|
|
## We need this in /root/nginx:
|
2024-06-29 02:39:46 +02:00
|
|
|
|
2024-06-29 03:54:50 +02:00
|
|
|
* ca.pem : Public Key plus certificate chain
|
|
|
|
* key.pem : Private SSL key decrypted
|
|
|
|
* nginx.conf
|
2024-06-29 02:39:46 +02:00
|
|
|
|
|
|
|
We want this file modes:
|
|
|
|
|
|
|
|
```
|
|
|
|
-rw------- 1 root root 3268 Jun 28 17:30 key.pem
|
|
|
|
-rw------- 1 root root 8964 Jun 28 17:30 ca.pem
|
|
|
|
-rw-r--r-- 1 root root 1327 Jun 28 17:47 nginx.conf
|
|
|
|
```
|
|
|
|
|
2024-06-29 13:20:05 +02:00
|
|
|
## We need this in /root/vaultwarden:
|
2024-06-29 02:39:46 +02:00
|
|
|
|
|
|
|
* .env: Change both passwords
|
|
|
|
* add_admin_token.sh : Change password and run ONCE: sh add_admin_token.sh
|
|
|
|
* compose.yml
|
|
|
|
|
|
|
|
In /root/vaultwarden
|
|
|
|
|
|
|
|
Start docker:
|
|
|
|
```
|
|
|
|
docker compose up -d
|
|
|
|
```
|
|
|
|
|
|
|
|
Stop docker:
|
|
|
|
```
|
|
|
|
docker compose down
|
|
|
|
```
|
|
|
|
|
|
|
|
Show logs continously:
|
|
|
|
```
|
|
|
|
docker compose logs -f
|
|
|
|
```
|
2024-06-29 03:53:35 +02:00
|
|
|
# TODO:
|
|
|
|
|
|
|
|
## SMTP mit SIGNUPS_VERIFY=true
|
|
|
|
```
|
|
|
|
SMTP_HOST=smtp.domain.tld
|
|
|
|
SMTP_FROM=vaultwarden@domain.tld
|
|
|
|
SMTP_FROM_NAME=Vaultwarden
|
|
|
|
SMTP_USERNAME=username
|
|
|
|
SMTP_PASSWORD=password
|
|
|
|
SMTP_TIMEOUT=15
|
|
|
|
SIGNUPS_VERIFY=true
|
|
|
|
SMTP_SECURITY=starttls
|
|
|
|
SMTP_PORT=587
|
|
|
|
```
|
|
|
|
## Options to think about:
|
|
|
|
|
2024-06-29 03:54:50 +02:00
|
|
|
```
|
|
|
|
ORG_CREATION_USERS=none
|
|
|
|
INVITATIONS_ALLOWED=false
|
|
|
|
EMAIL_CHANGE_ALLOWED=false
|
|
|
|
```
|