Vaultwarden
Preparation
DatabaseDocker Compose
Install MySQLDocker
sudo apt install mysql-server -y
sudo systemctl enable mysql
sudo systemctl start mysqldocker.io
Setup the installation with sudo mysql_secure_installation and choose:
VALIDATE PASSWORD component: YPassword Validation Policy: 3Remove anonymous users?: YDisallow root login remotely?: YRemove test database and access to it?: YReload privilege tables now?: Y
Enter MySQL with sudo mysql -u root -p and create Database and user:
CREATE DATABASE antragsgruen;
CREATE USER '<my_user>'@'localhost' IDENTIFIED BY '<my_password>';
GRANT ALL PRIVILEGES ON antragsgruen.* TO '<my_user>'@'localhost';
FLUSH PRIVILEGES;
Exit
PHP8.4
Add PHP8.4 Repository and install it:
sudo add-apt-repository ppa:ondrej/php
sudo apt update
apt-get install php8.4 php8.4-cli php8.4-fpm php8.4-intl php8.4-gd php8.4-mysql php8.4-opcache php8.4-curl php8.4-xml php8.4-mbstring php8.4-zip php8.4-iconv
Apache2
Install Apache2:
sudo apt install apache2
Change the default apache2 site (/etc/apache2/sites-available/000-default.conf) to:
RewriteEngine On
<Directory /var/www/antragsgruen/web>
AllowOverride all
Require all granted
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/antragsgruen/web
ServerName antragsgruen.example.org
# Other directives here
</VirtualHost>
Enable the RewriteEngine and restart Apache2:
sudo a2enmod rewrite && sudo service apache2 restart
Nodejs 20 & npm
Download ans execute the NodeSource setup script:Compose
curl -fsSLL "https://deb.nodesource.github.com/setup_20.docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x | sudo -E bash -
Install Node.js and npm:
sudo apt-get install -y nodejs/usr/local/bin/docker-compose
Install
InstallCreate the sourcesfile andcompose.yaml
dependencieswith fromthis the repository:content:
sudoservices:
gitvaultwarden:
cloneimage: vaultwarden/server:latest
container_name: vaultwarden
restart: unless-stopped
environment:
DOMAIN: "https://github.com/CatoTH/antragsgruen.gitvw.domain.tld"
sudo chmod 777 antragsgruen
cd antragsgruen
curlvolumes:
-sS https://getcomposer.org/installer | php ./composer.pharvw-data/:/data/
installports:
--prefer-dist npm install
npm run build80:80
To enableStart the web-basedContainer installer:with:
touch config/INSTALLING
Set the permissions:
sudo chowndocker-compose -Rf www-data:www-datacompose.yaml web/assets
sudo chownup -R www-data:www-data runtime
sudo chown -R www-data:www-data configd