Fully translated (but some work to do about urls)

This commit is contained in:
2025-07-04 12:54:44 +00:00
parent acdebcb682
commit e9ccda2e14
26 changed files with 1002 additions and 846 deletions

View File

@ -8,18 +8,18 @@ main:
# Vaultwarden
::alert{type="info"}
🎯 __Objectifs :__ Installer [Vaultwarden](https://github.com/dani-garcia/vaultwarden) pour gérer vos mot de passe sur tout vos appareils (remplace la gestion de mot de passe Google ou Apple).
🎯 __Goals:__ Install [Vaultwarden](https://github.com/dani-garcia/vaultwarden) to manage your passwords across all your devices (a replacement for Google or Apple password managers).
::
![Vaultwarden](/img/serveex/vaultwarden.png)
[Vaultwarden](https://github.com/dani-garcia/vaultwarden) est une solution de gestion de vos mot de passe (génération, saisie semi-automatique...) que vous pouvez installer directement sur votre serveur. Cette solution remplace les gestionnaires comme Google, Apple ou Keepass. Cette solution permet de synchroniser tout vos mots de passe sur vos différentes machines, avec un chiffrement de bout en bout.
[Vaultwarden](https://github.com/dani-garcia/vaultwarden) is a password management solution (generation, autofill...) that you can host directly on your server. This replaces managers like Google, Apple, or Keepass. Vaultwarden synchronizes your passwords across all your devices with end-to-end encryption.
Vaultwarden est un fork de la solution [Bitwarden](https://bitwarden.com/fr-fr/help/).
Vaultwarden is a fork of [Bitwarden](https://bitwarden.com/fr-fr/help/).
## Installation
---
Structure des dossiers
Folder structure:
```console
root
@ -30,7 +30,7 @@ root
└── .env
```
Ouvrez Dockge, cliquez sur `compose`, appelez la stack `vaultwarden` puis copiez collez ceci :
Open Dockge, click on `compose`, name the stack `vaultwarden`, and paste the following:
```yaml
---
@ -59,95 +59,95 @@ services:
- SIGNUPS_VERIFY=true
- SIGNUPS_VERIFY_RESEND_TIME=3600
- SIGNUPS_VERIFY_RESEND_LIMIT=5
```
::alert{type="success"}
__Astuce :__ Ajoutez le label de watchtower dans chaque conteneur afin d'automatiser les mises à jour
__Tip:__ Add the Watchtower label in each container to automate updates
```yaml
services:
vauktwarden:
#...
labels:
- com.centurylinklabs.watchtower.enable=true
```yaml
services:
vaultwarden:
#...
labels:
- com.centurylinklabs.watchtower.enable=true
```
::
Nous allons maintenant générer un hash de mot de passe, qu'il faudra renseigner dans la variable `TOKEN` du `.env`
Next, generate a password hash to put in the `TOKEN` variable in `.env`:
```shell
echo -n "votremotdepasse" | argon2 "$(openssl rand -base64 32)" -e -id -k 65540 -t 3 -p 4
echo -n "yourpassword" | argon2 "$(openssl rand -base64 32)" -e -id -k 65540 -t 3 -p 4
```
Copiez le résultat précieusement.
Copy the result securely.
Dans le `.env`, renseignez les variables suivantes :
In the `.env` file, enter the following variables:
```properties
URL=
TOKEN=
```
| Variable | Valeur | Exemple |
|-------------------------|---------------------------------------------------------|----------------------------|
| `URL`{lang=properties} | L'url de votre serveur vaultwarden | `https://vault.domaine.fr` |
| `TOKEN`{lang=properties} | Le token que vous avez précédemment copié précieusement | `'$argon2id$v=19$m=65540,t=3,p=4$bXBGME` |
| Variable | Value | Example |
|----------|-------|---------|
| `URL` | The URL of your Vaultwarden server | `https://vault.yourdomain.com` |
| `TOKEN` | The token you previously copied | `'$argon2id$v=19$m=65540,t=3,p=4$bXBGME...` |
Puis déployez le conteneur.
Depuis quelques temps, Vaultwarden ne permet pas d'etre accéder sans certificat SSL, ce qui empeche d'y accéder via son IP local. Nous y accèderons donc après l'avoir exposé avec SWAG, qui ajoute lui même un certificat SSL.
Then deploy the container.
Recently, Vaultwarden requires SSL to be accessed, which prevents access via a local IP. We'll expose it with SWAG, which provides an SSL certificate.
::alert{type="danger"}
:::list{type="danger"}
- __En cas d'échec :__ vérifiez les règles de votre pare-feu.
- __If it fails:__ check your firewall rules.
:::
::
## Exposer Vaultwarden avec SWAG
## Exposing Vaultwarden with SWAG
---
Tout l'intérêt d'une telle solution, c'est de pouvoir y accéder à distance et sur tout vos appareils. Pour cela, nous allons exposer Vaultwarden via [SWAG](/serveex/coeur/swag).
The main benefit of Vaultwarden is being able to access it remotely from any device. We'll expose it through [SWAG](/serveex/coeur/swag).
::alert{type="info"}
✨ __Au préalable :__ nous partons du principe que vous avez créé dans votre [zone DNS](/generalites/dns) un sous domaine du type `vault.mondomaine.fr` avec pour `CNAME` `mondomaine.fr` et, [à moins que vous utilisiez Cloudflare Zero Trust](/serveex/securite/cloudflare), que que vous avez déjà redirigé le port `443` de votre box vers le `443` de votre serveur dans [les règles NAT](/generalites/nat).
__Before you start:__ Make sure you've created a DNS subdomain like `vault.yourdomain.com` with `CNAME` pointing to `yourdomain.com` and (unless using Cloudflare Zero Trust) that you've forwarded port `443` from your router to your server's `443` via [NAT rules](/generalites/nat).
::
Dans Dockge, rendez-vous dans la stack de SWAG et éditez le compose en ajoutant le réseau de vaultwarden :
In Dockge, go to the SWAG stack and edit the compose file to add the Vaultwarden network:
```yaml
services:
swag:
container_name: # ...
# ...
networks: # Relie le conteneur au réseau custom
# ...
- vaultwarden # Nom du réseau déclaré dans la stack
# ...
networks: # Connects container to custom network
# ...
- vaultwarden # Name of the declared network
networks: # Définit le réseau custom
networks: # Defines the custom network
# ...
vaultwarden: # Nom du réseau déclaré dans la stack
name: vaultwarden_default # Nom véritable du réseau externe
external: true # Précise que c'est un réseau à rechercher en externe
vaultwarden: # Name of the declared network
name: vaultwarden_default # Actual name of the external network
external: true
```
::alert{type="info"}
:::list{type="info"}
- Ici nous partons du principe que le nom du réseau de vaultwarden est `vaultwarden_default`. Vous pouvez vérifier que la connexion est opérationnelle en visitant le dashboard de SWAG en tapant http://ipduserveur:81.
- We're assuming the network name is `vaultwarden_default`. You can check connectivity by visiting the SWAG dashboard at http://yourserverip:81.
:::
::
Relancez la stack en cliquant sur "déployer" et patientez le temps que SWAG soit complètement opérationnel.
Restart the stack by clicking "Deploy" and wait for SWAG to be fully operational.
Dans les dossiers de Swag, créez le fichier `vault.subdomain.conf`.
In SWAG's config folder, create the file `vault.subdomain.conf`:
::alert{type="success"}
✨ __Astuce :__ vous pouvez utiliser [File Browser](/serveex/files/file-browser) pour naviguer dans vos fichier et éditer vos documents au lieu d'utiliser les commandes du terminal.
__Tip:__ Use [File Browser](/serveex/files/file-browser) to navigate and edit files instead of using terminal commands.
::
```shell
sudo vi /docker/swag/config/nginx/proxy-confs/vault.subdomain.conf
```
Entrez en modification avec la touche `i` et collez la configuration ci-dessous :
Press `i` to edit, and paste the following configuration:
```nginx
server {
@ -174,13 +174,13 @@ server {
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable for ldap auth (requires ldap-server.conf in the server block)
# enable for ldap auth
#include /config/nginx/ldap-location.conf;
# enable for Authelia (requires authelia-server.conf in the server block)
# enable for Authelia
#include /config/nginx/authelia-location.conf;
# enable for Authentik (requires authentik-server.conf in the server block)
# enable for Authentik
#include /config/nginx/authentik-location.conf;
include /config/nginx/proxy.conf;
@ -189,7 +189,6 @@ server {
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
location ~ ^(/vaultwarden)?/admin {
@ -197,13 +196,13 @@ server {
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable for ldap auth (requires ldap-server.conf in the server block)
# enable for ldap auth
#include /config/nginx/ldap-location.conf;
# enable for Authelia (requires authelia-server.conf in the server block)
# enable for Authelia
#include /config/nginx/authelia-location.conf;
# enable for Authentik (requires authentik-server.conf in the server block)
# enable for Authentik
#include /config/nginx/authentik-location.conf;
include /config/nginx/proxy.conf;
@ -212,7 +211,6 @@ server {
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
location ~ (/vaultwarden)?/api {
@ -222,7 +220,6 @@ server {
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
location ~ (/vaultwarden)?/notifications/hub {
@ -232,17 +229,16 @@ server {
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
```
Appuyez sur `Echap` puis sauvegardez et quittez en tapant `:x` puis en appuyant sur `Entrée`.
Press `Esc`, then type `:x` and press `Enter` to save and exit.
Et voilà, vous avez exposé Vaultwarden ! Accédez au panneau d'administration via `vault.mondomaine.fr` et créez votre compte. Plus d'info sur les fonctionnalités de [Bitwarden](https://bitwarden.com/help/).
And there you go — Vaultwarden is now exposed! Visit `vault.yourdomain.com` to access the admin panel and create your account. For more information, see the [Bitwarden documentation](https://bitwarden.com/help/).
N'oubliez pas d'installer les extensions Bitwarden (elles sont compatibles avec Vaultwarden) pour [Chrome](https://chromewebstore.google.com/detail/gestionnaire-de-mots-de-p/nngceckbapebfimnlniiiahkandclblb) ou pour [Firefox](https://addons.mozilla.org/fr/firefox/addon/bitwarden-password-manager/) ainsi que les applications [iOS](https://apps.apple.com/fr/app/bitwarden/id1137397744) et [Android](https://play.google.com/store/apps/details?id=com.x8bit.bitwarden&hl=fr) afin de synchroniser vos mot de passe.
Don't forget to install Bitwarden browser extensions (they work with Vaultwarden) for [Chrome](https://chromewebstore.google.com/detail/gestionnaire-de-mots-de-p/nngceckbapebfimnlniiiahkandclblb) and [Firefox](https://addons.mozilla.org/fr/firefox/addon/bitwarden-password-manager/), as well as [iOS](https://apps.apple.com/fr/app/bitwarden/id1137397744) and [Android](https://play.google.com/store/apps/details?id=com.x8bit.bitwarden&hl=fr) apps to sync your passwords.
::alert{type="success"}
✨ __Astuce :__ vous pouvez protéger cette app avec Authentik en ouvrant `tools.subodmain.conf` et en retirant les `#` devant `include /config/nginx/authentik-server.conf;`{lang=nginx} et `include /config/nginx/authentik-location.conf;`{lang=nginx}. N'oubliez pas de [créer une application et un fournisseur dans Authentik](/serveex/securite/authentik#protéger-une-app-par-reverse-proxy).
__Tip:__ You can protect this app with Authentik by opening `tools.subdomain.conf` and removing the `#` in front of `include /config/nginx/authentik-server.conf;` and `include /config/nginx/authentik-location.conf;`. Don't forget to [create an application and provider in Authentik](/serveex/securite/authentik#protéger-une-app-par-reverse-proxy).
::