mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
restore bitwarden
This commit is contained in:
154
bitwarden/CHANGELOG.md
Normal file
154
bitwarden/CHANGELOG.md
Normal file
@@ -0,0 +1,154 @@
|
||||
|
||||
## 1.35.0 (28-12-2025)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
- The Home Assistant project has deprecated support for the armv7, armhf and i386 architectures. Support wil be fully dropped in the upcoming Home Assistant 2025.12 release
|
||||
|
||||
- Added support for configuring extra environment variables via the `env_vars` add-on option alongside config.yaml. See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-your-Addon-2 for details.
|
||||
|
||||
## 1.34.3 (01-08-2025)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.34.1 (31-05-2025)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.33.2 (15-02-2025)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.33.1 (08-02-2025)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.33.0 (01-02-2025)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.32.7 (21-12-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.32.6 (14-12-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.32.5 (23-11-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.32.4 (16-11-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.32.3 (02-11-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.32.2 (19-10-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.32.1 (05-10-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.32.0 (17-08-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.31.0 (13-07-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
|
||||
## 1.30.5 (04-05-2024)
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (changelog : https://github.com/dani-garcia/bitwarden_rs/releases)
|
||||
- Deprecated, please use version from community repository. Just export your vault from this addon, and import it in the official addon.
|
||||
|
||||
## 1.30.1 (21-11-2023)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.30.0 (11-11-2023)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
## 1.29.2-2 (02-09-2023)
|
||||
|
||||
- Minor bugs fixed
|
||||
- Fix https://github.com/alexbelgium/hassio-addons/issues/975
|
||||
|
||||
## 1.29.2 (02-09-2023)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.29.1 (29-07-2023)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.29.0 (15-07-2023)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.28.1 (08-04-2023)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.28.0 (31-03-2023)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
- Implemented healthcheck
|
||||
|
||||
## 1.27.0 (25-12-2022)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
- WARNING : update to supervisor 2022.11 before installing
|
||||
|
||||
## 1.26.0 (15-10-2022)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.25.2 (28-07-2022)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.25.1 (17-07-2022)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.25.0 (24-05-2022)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.24.0 (27-04-2022)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
- Add codenotary sign
|
||||
|
||||
## 1.24.0 (31-01-2022)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.23.1 (15-12-2021)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
- New standardized logic for Dockerfile build and packages installation
|
||||
|
||||
## 1.23.0 (21-10-2021)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.22.2 (26-07-2021)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.22.1 (30-06-2021)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.22.0 (29-06-2021)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
- Project renamed to vaultwarden
|
||||
|
||||
## 1.21.0 (30-04-2021)
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.20.0
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs (Implemented Send functionality, Updated web vault to 2.19.0, CORS fixes, Updated diagnostics page with more info, Updated dependencies)
|
||||
|
||||
## 1.19.0
|
||||
|
||||
- Update to latest version from dani-garcia/bitwarden_rs
|
||||
|
||||
## 1.18.0
|
||||
|
||||
- Exposed settings.json in /share/transmission
|
||||
- Add smb and local disks mount [(@dianlight)](https://github.com/dianlight)
|
||||
179
bitwarden/DOCS.md
Normal file
179
bitwarden/DOCS.md
Normal file
@@ -0,0 +1,179 @@
|
||||
# Home Assistant Community Add-on: Bitwarden RS
|
||||
|
||||
Bitwarden is an open-source password manager that can store sensitive
|
||||
information such as website credentials in an encrypted vault.
|
||||
|
||||
The Bitwarden platform offers a variety of client applications including
|
||||
a web interface, desktop applications, browser extensions and mobile apps.
|
||||
|
||||
This add-on is based upon the lightweight and opensource
|
||||
[Bitwarden RS][bitwarden-rs] implementation, allowing you to self-host
|
||||
this amazing password manager.
|
||||
|
||||
Password theft is a serious problem. The websites and apps that you use are
|
||||
under attack every day. Security breaches occur and your passwords are stolen.
|
||||
When you reuse the same passwords everywhere hackers can easily access your
|
||||
email, bank, and other important accounts. USE A PASSWORD MANAGER!
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in
|
||||
comparison to installing any other Home Assistant add-on.
|
||||
|
||||
1. Search for the "Bitwarden RS" add-on in the Supervisor add-on store and
|
||||
install it.
|
||||
1. Start the "Bitwarden RS" add-on.
|
||||
1. Check the logs of the "Bitwarden RS" add-on to see if everything went
|
||||
well and to get the admin token/password.
|
||||
1. Click the "OPEN WEB UI" button to open Bitwarden RS.
|
||||
1. Add `/admin` to the URL to access the admin panel, e.g.,
|
||||
`http://hassio.local:7277/admin`. Log in using the admin token you got
|
||||
in step 3.
|
||||
1. The admin/token in the logs is only shown until it is saved or changed.
|
||||
Hit save in the admin panel to use the randomly generated password or
|
||||
change it to one of your choosing.
|
||||
1. Be sure to store your admin token somewhere safe.
|
||||
|
||||
## Configuration
|
||||
|
||||
**Note**: _Remember to restart the add-on when the configuration is changed._
|
||||
|
||||
Example add-on configuration:
|
||||
|
||||
```yaml
|
||||
log_level: info
|
||||
ssl: false
|
||||
certfile: fullchain.pem
|
||||
keyfile: privkey.pem
|
||||
request_size_limit: 10485760
|
||||
```
|
||||
|
||||
**Note**: _This is just an example, don't copy and paste it! Create your own!_
|
||||
|
||||
### Option: `log_level`
|
||||
|
||||
The `log_level` option controls the level of log output by the addon and can
|
||||
be changed to be more or less verbose, which might be useful when you are
|
||||
dealing with an unknown issue. Possible values are:
|
||||
|
||||
- `trace`: Show every detail, like all called internal functions.
|
||||
- `debug`: Shows detailed debug information.
|
||||
- `info`: Normal (usually) interesting events.
|
||||
- `warning`: Exceptional occurrences that are not errors.
|
||||
- `error`: Runtime errors that do not require immediate action.
|
||||
- `fatal`: Something went terribly wrong. Add-on becomes unusable.
|
||||
|
||||
Please note that each level automatically includes log messages from a
|
||||
more severe level, e.g., `debug` also shows `info` messages. By default,
|
||||
the `log_level` is set to `info`, which is the recommended setting unless
|
||||
you are troubleshooting.
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables/Disables SSL (HTTPS). Set it `true` to enable it, `false` otherwise.
|
||||
|
||||
**Note**: _The SSL settings only apply to direct access and has no effect
|
||||
on the Ingress service._
|
||||
|
||||
### Option: `certfile`
|
||||
|
||||
The certificate file to use for SSL.
|
||||
|
||||
**Note**: _The file MUST be stored in `/ssl/`, which is the default_
|
||||
|
||||
### Option: `keyfile`
|
||||
|
||||
The private key file to use for SSL.
|
||||
|
||||
**Note**: _The file MUST be stored in `/ssl/`, which is the default_
|
||||
|
||||
### Option: `request_size_limit`
|
||||
|
||||
By default the API calls are limited to 10MB. This should be sufficient for
|
||||
most cases, however if you want to support large imports, this might be
|
||||
limiting you. On the other hand you might want to limit the request size to
|
||||
something smaller than that to prevent API abuse and possible DOS attack,
|
||||
especially if running with limited resources.
|
||||
|
||||
To set the limit, you can use this setting: 10MB would be `10485760`.
|
||||
|
||||
## Known issues and limitations
|
||||
|
||||
- This add-on cannot support Ingress at this time due to technical limitations
|
||||
of the Bitwarden Vault web interface.
|
||||
- Some web browsers, like Chrome, disallow the use of Web Crypto APIs in
|
||||
insecure contexts. In this case, you might get an error like
|
||||
`Cannot read property 'importKey'`. To solve this problem, you need to enable
|
||||
SSL and access the web interface using HTTPS.
|
||||
|
||||
## Changelog & Releases
|
||||
|
||||
This repository keeps a change log using [GitHub's releases][releases]
|
||||
functionality. The format of the log is based on
|
||||
[Keep a Changelog][keepchangelog].
|
||||
|
||||
Releases are based on [Semantic Versioning][semver], and use the format
|
||||
of `MAJOR.MINOR.PATCH`. In a nutshell, the version will be incremented
|
||||
based on the following:
|
||||
|
||||
- `MAJOR`: Incompatible or major changes.
|
||||
- `MINOR`: Backwards-compatible new features and enhancements.
|
||||
- `PATCH`: Backwards-compatible bugfixes and package updates.
|
||||
|
||||
## Support
|
||||
|
||||
Got questions?
|
||||
|
||||
You have several options to get them answered:
|
||||
|
||||
- The [Home Assistant Community Add-ons Discord chat server][discord] for add-on
|
||||
support and feature requests.
|
||||
- The [Home Assistant Discord chat server][discord-ha] for general Home
|
||||
Assistant discussions and questions.
|
||||
- The Home Assistant [Community Forum][forum].
|
||||
- Join the [Reddit subreddit][reddit] in [/r/homeassistant][reddit]
|
||||
|
||||
You could also [open an issue here][issue] GitHub.
|
||||
|
||||
## Authors & contributors
|
||||
|
||||
The original setup of this repository is by [Franck Nijhof][frenck].
|
||||
|
||||
For a full list of all authors and contributors,
|
||||
check [the contributor's page][contributors].
|
||||
|
||||
## License
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-2020 Franck Nijhof
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
[bitwarden-rs]: https://github.com/dani-garcia/bitwarden_rs
|
||||
[contributors]: https://github.com/hassio-addons/addon-bitwarden/graphs/contributors
|
||||
[discord-ha]: https://discord.gg/c5DvZ4e
|
||||
[discord]: https://discord.me/hassioaddons
|
||||
[forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-bitwarden-rs/115573?u=frenck
|
||||
[frenck]: https://github.com/frenck
|
||||
[issue]: https://github.com/hassio-addons/addon-bitwarden/issues
|
||||
[keepchangelog]: http://keepachangelog.com/en/1.0.0/
|
||||
[reddit]: https://reddit.com/r/homeassistant
|
||||
[releases]: https://github.com/hassio-addons/addon-bitwarden/releases
|
||||
[semver]: http://semver.org/spec/v2.0.0.htm
|
||||
172
bitwarden/Dockerfile
Normal file
172
bitwarden/Dockerfile
Normal file
@@ -0,0 +1,172 @@
|
||||
#============================#
|
||||
# ALEXBELGIUM'S DOCKERFILE #
|
||||
#============================#
|
||||
# _.------.
|
||||
# _.-` ('>.-`"""-.
|
||||
# '.--'` _'` _ .--.)
|
||||
# -' '-.-';` `
|
||||
# ' - _.' ``'--.
|
||||
# '---` .-'""`
|
||||
# /`
|
||||
#=== Home Assistant Addon ===#
|
||||
|
||||
#################
|
||||
# 1 Build Image #
|
||||
#################
|
||||
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/debian-base:9.1.0
|
||||
###############################################################################
|
||||
# Get prebuild containers from Vaultwarden
|
||||
###############################################################################
|
||||
FROM "vaultwarden/server:latest" AS vaultwarden
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
###############################################################################
|
||||
# Build the actual add-on.
|
||||
###############################################################################
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Get the Bitwarden from official images
|
||||
COPY --from=vaultwarden /vaultwarden /opt/vaultwarden
|
||||
COPY --from=vaultwarden /web-vault /opt/web-vault
|
||||
|
||||
# add Nginx
|
||||
# hadolint ignore=DL3009
|
||||
RUN \
|
||||
apt-get update \
|
||||
\
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libmariadb-dev-compat=1:11.8.3-0+deb13u1 \
|
||||
libpq5=17.6-0+deb13u1 \
|
||||
nginx=1.26.3-3+deb13u1 \
|
||||
sqlite3=3.46.1-7 \
|
||||
&& apt-get clean \
|
||||
&& rm -f -r \
|
||||
/etc/nginx \
|
||||
\
|
||||
&& mkdir -p /var/log/nginx \
|
||||
&& touch /var/log/nginx/error.log
|
||||
|
||||
##################
|
||||
# 2 Modify Image #
|
||||
##################
|
||||
|
||||
# Set S6 wait time
|
||||
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
##################
|
||||
|
||||
# Add rootfs
|
||||
COPY rootfs/ /
|
||||
|
||||
# Uses /bin for compatibility purposes
|
||||
# hadolint ignore=DL4005
|
||||
RUN if [ ! -f /bin/sh ] && [ -f /usr/bin/sh ]; then ln -s /usr/bin/sh /bin/sh; fi && \
|
||||
if [ ! -f /bin/bash ] && [ -f /usr/bin/bash ]; then ln -s /usr/bin/bash /bin/bash; fi
|
||||
|
||||
# Modules
|
||||
ARG MODULES="00-banner.sh 01-custom_script.sh 00-deprecated.sh"
|
||||
|
||||
# Automatic modules download
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automodules.sh" "/ha_automodules.sh"
|
||||
RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
|
||||
|
||||
# Manual apps
|
||||
ENV PACKAGES="libmariadb-dev-compat \
|
||||
libpq5 \
|
||||
nginx \
|
||||
sqlite3"
|
||||
|
||||
# Automatic apps & bashio
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
|
||||
RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" && rm /ha_autoapps.sh
|
||||
|
||||
################
|
||||
# 4 Entrypoint #
|
||||
################
|
||||
|
||||
# Add entrypoint
|
||||
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh"
|
||||
|
||||
# Entrypoint modifications
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh"
|
||||
RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh
|
||||
|
||||
# Standalone bashio command
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/bashio-standalone.sh" "/.bashio-standalone.sh"
|
||||
RUN chmod 777 /.bashio-standalone.sh
|
||||
|
||||
#
|
||||
#WORKDIR /
|
||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
||||
#CMD [ "/ha_entrypoint.sh" ]
|
||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
############
|
||||
# 5 Labels #
|
||||
############
|
||||
|
||||
ARG BUILD_ARCH
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_DESCRIPTION
|
||||
ARG BUILD_NAME
|
||||
ARG BUILD_REF
|
||||
ARG BUILD_REPOSITORY
|
||||
ARG BUILD_VERSION
|
||||
ENV BUILD_VERSION="${BUILD_VERSION}"
|
||||
LABEL \
|
||||
io.hass.name="${BUILD_NAME}" \
|
||||
io.hass.description="${BUILD_DESCRIPTION}" \
|
||||
io.hass.arch="${BUILD_ARCH}" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.version=${BUILD_VERSION} \
|
||||
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
||||
org.opencontainers.image.title="${BUILD_NAME}" \
|
||||
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
||||
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
||||
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
||||
org.opencontainers.image.licenses="MIT" \
|
||||
org.opencontainers.image.url="https://github.com/alexbelgium" \
|
||||
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
||||
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
|
||||
org.opencontainers.image.created=${BUILD_DATE} \
|
||||
org.opencontainers.image.revision=${BUILD_REF} \
|
||||
org.opencontainers.image.version=${BUILD_VERSION}
|
||||
|
||||
#################
|
||||
# 6 Healthcheck #
|
||||
#################
|
||||
|
||||
# Avoid spamming logs
|
||||
# hadolint ignore=SC2016
|
||||
RUN \
|
||||
# Handle Apache configuration
|
||||
if [ -d /etc/apache2/sites-available ]; then \
|
||||
for file in /etc/apache2/sites-*/*.conf; do \
|
||||
sed -i '/<VirtualHost/a \ \n # Match requests with the custom User-Agent "HealthCheck" \n SetEnvIf User-Agent "HealthCheck" dontlog \n # Exclude matching requests from access logs \n CustomLog ${APACHE_LOG_DIR}/access.log combined env=!dontlog' "$file"; \
|
||||
done; \
|
||||
fi && \
|
||||
\
|
||||
# Handle Nginx configuration
|
||||
if [ -f /etc/nginx/nginx.conf ]; then \
|
||||
awk '/http \{/{print; print "map $http_user_agent $dontlog {\n default 0;\n \"~*HealthCheck\" 1;\n}\naccess_log /var/log/nginx/access.log combined if=$dontlog;"; next}1' /etc/nginx/nginx.conf > /etc/nginx/nginx.conf.new && \
|
||||
mv /etc/nginx/nginx.conf.new /etc/nginx/nginx.conf; \
|
||||
fi
|
||||
|
||||
ENV HEALTH_PORT="80" \
|
||||
HEALTH_URL=""
|
||||
HEALTHCHECK \
|
||||
--interval=5s \
|
||||
--retries=5 \
|
||||
--start-period=30s \
|
||||
--timeout=25s \
|
||||
CMD curl -A "HealthCheck: Docker/1.0" -s -f "http://127.0.0.1:${HEALTH_PORT}${HEALTH_URL}" &>/dev/null || exit 1
|
||||
40
bitwarden/README.md
Normal file
40
bitwarden/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Home assistant add-on: Vaultwarden (Bitwarden RS)
|
||||
|
||||
Use the add-on `env_vars` option to pass extra environment variables (uppercase or lowercase names). See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-your-Addon-2 for details.
|
||||
|
||||
# ⚠️ It is recommended to use the official addon (https://github.com/hassio-addons/addon-bitwarden) instead of this fork. The only benefit of this fork is automated releases, now implemented in the offical one. ⚠️
|
||||
|
||||
|
||||
I maintain this and other Home Assistant add-ons in my free time: keeping up with upstream changes, HA changes, and testing on real hardware takes a lot of time (and some money). I use around 5-10 of my >110 addons so regularly I install test machines (and purchase some test services such as vpn) that I don't use myself to troubleshoot and improve the addons
|
||||
|
||||
If this add-on saves you time or makes your setup easier, I would be very grateful for your support!
|
||||
|
||||
[![Buy me a coffee][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
||||
[![Donate via PayPal][paypal-badge]](https://www.paypal.com/donate/?hosted_button_id=DZFULJZTP3UQA)
|
||||
|
||||
## Addon informations
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
[](https://www.codacy.com/gh/alexbelgium/hassio-addons/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alexbelgium/hassio-addons&utm_campaign=Badge_Grade)
|
||||
[](https://github.com/alexbelgium/hassio-addons/actions/workflows/weekly-supelinter.yaml)
|
||||
[](https://github.com/alexbelgium/hassio-addons/actions/workflows/onpush_builder.yaml)
|
||||
|
||||
[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white
|
||||
[paypal-badge]: https://img.shields.io/badge/Donate%20via%20PayPal-0070BA?logo=paypal&style=flat&logoColor=white
|
||||
|
||||
_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_
|
||||
|
||||
[](https://github.com/alexbelgium/hassio-addons/stargazers)
|
||||
|
||||

|
||||
|
||||
## About
|
||||
|
||||
Created by Frenck, please see documentation here : https://github.com/hassio-addons/addon-bitwarden
|
||||
|
||||
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||
|
||||
|
||||
66
bitwarden/apparmor.txt
Normal file
66
bitwarden/apparmor.txt
Normal file
@@ -0,0 +1,66 @@
|
||||
#include <tunables/global>
|
||||
|
||||
profile bitwarden_addon flags=(attach_disconnected,mediate_deleted) {
|
||||
#include <abstractions/base>
|
||||
|
||||
capability,
|
||||
file,
|
||||
signal,
|
||||
mount,
|
||||
umount,
|
||||
remount,
|
||||
network udp,
|
||||
network tcp,
|
||||
network dgram,
|
||||
network stream,
|
||||
network inet,
|
||||
network inet6,
|
||||
network netlink raw,
|
||||
network unix dgram,
|
||||
|
||||
capability setgid,
|
||||
capability setuid,
|
||||
capability sys_admin,
|
||||
capability dac_read_search,
|
||||
# capability dac_override,
|
||||
# capability sys_rawio,
|
||||
|
||||
# S6-Overlay
|
||||
/init ix,
|
||||
/run/{s6,s6-rc*,service}/** ix,
|
||||
/package/** ix,
|
||||
/command/** ix,
|
||||
/run/{,**} rwk,
|
||||
/dev/tty rw,
|
||||
/bin/** ix,
|
||||
/usr/bin/** ix,
|
||||
/usr/lib/bashio/** ix,
|
||||
/etc/s6/** rix,
|
||||
/run/s6/** rix,
|
||||
/etc/services.d/** rwix,
|
||||
/etc/cont-init.d/** rwix,
|
||||
/etc/cont-finish.d/** rwix,
|
||||
/init rix,
|
||||
/var/run/** mrwkl,
|
||||
/var/run/ mrwkl,
|
||||
/dev/i2c-1 mrwkl,
|
||||
# Files required
|
||||
/dev/fuse mrwkl,
|
||||
/dev/sda1 mrwkl,
|
||||
/dev/sdb1 mrwkl,
|
||||
/dev/nvme0 mrwkl,
|
||||
/dev/nvme1 mrwkl,
|
||||
/dev/mmcblk0p1 mrwkl,
|
||||
/dev/* mrwkl,
|
||||
/tmp/** mrkwl,
|
||||
|
||||
# Data access
|
||||
/data/** rw,
|
||||
|
||||
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
|
||||
ptrace (trace,read) peer=docker-default,
|
||||
|
||||
# docker daemon confinement requires explict allow rule for signal
|
||||
signal (receive) set=(kill,term) peer=/usr/bin/docker,
|
||||
|
||||
}
|
||||
4
bitwarden/build.yaml
Normal file
4
bitwarden/build.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
build_from:
|
||||
aarch64: ghcr.io/hassio-addons/debian-base/aarch64:7.1.0
|
||||
amd64: ghcr.io/hassio-addons/debian-base/amd64:7.1.0
|
||||
33
bitwarden/config.yaml
Normal file
33
bitwarden/config.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
arch:
|
||||
- aarch64
|
||||
- amd64
|
||||
description: Open source password management solution
|
||||
image: ghcr.io/alexbelgium/vaultwarden-{arch}
|
||||
init: false
|
||||
map:
|
||||
- ssl
|
||||
name: zzz_archived - Vaultwarden
|
||||
options:
|
||||
env_vars: []
|
||||
ssl: true
|
||||
certfile: fullchain.pem
|
||||
keyfile: privkey.pem
|
||||
ports:
|
||||
7277/tcp: 7277
|
||||
ports_description:
|
||||
7277/tcp: Vaultwarden Web interface
|
||||
schema:
|
||||
env_vars:
|
||||
- name: match(^[A-Za-z0-9_]+$)
|
||||
value: str?
|
||||
log_level: list(trace|debug|info|notice|warning|error|fatal)?
|
||||
ssl: bool
|
||||
certfile: str
|
||||
keyfile: str
|
||||
request_size_limit: int?
|
||||
slug: bitwarden
|
||||
stage: deprecated
|
||||
udev: true
|
||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/bitwarden
|
||||
version: 1.35.0
|
||||
webui: "[PROTO:ssl]://[HOST]:[PORT:7277]"
|
||||
BIN
bitwarden/icon.png
Normal file
BIN
bitwarden/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
bitwarden/logo.png
Normal file
BIN
bitwarden/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
96
bitwarden/rootfs/etc/nginx/includes/mime.types
Normal file
96
bitwarden/rootfs/etc/nginx/includes/mime.types
Normal file
@@ -0,0 +1,96 @@
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
text/xml xml;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
application/javascript js;
|
||||
application/atom+xml atom;
|
||||
application/rss+xml rss;
|
||||
|
||||
text/mathml mml;
|
||||
text/plain txt;
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/x-component htc;
|
||||
|
||||
image/png png;
|
||||
image/svg+xml svg svgz;
|
||||
image/tiff tif tiff;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
image/webp webp;
|
||||
image/x-icon ico;
|
||||
image/x-jng jng;
|
||||
image/x-ms-bmp bmp;
|
||||
|
||||
font/woff woff;
|
||||
font/woff2 woff2;
|
||||
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
application/msword doc;
|
||||
application/pdf pdf;
|
||||
application/postscript ps eps ai;
|
||||
application/rtf rtf;
|
||||
application/vnd.apple.mpegurl m3u8;
|
||||
application/vnd.google-earth.kml+xml kml;
|
||||
application/vnd.google-earth.kmz kmz;
|
||||
application/vnd.ms-excel xls;
|
||||
application/vnd.ms-fontobject eot;
|
||||
application/vnd.ms-powerpoint ppt;
|
||||
application/vnd.oasis.opendocument.graphics odg;
|
||||
application/vnd.oasis.opendocument.presentation odp;
|
||||
application/vnd.oasis.opendocument.spreadsheet ods;
|
||||
application/vnd.oasis.opendocument.text odt;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
pptx;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
xlsx;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
docx;
|
||||
application/vnd.wap.wmlc wmlc;
|
||||
application/x-7z-compressed 7z;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot prc pdb;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert der pem crt;
|
||||
application/x-xpinstall xpi;
|
||||
application/xhtml+xml xhtml;
|
||||
application/xspf+xml xspf;
|
||||
application/zip zip;
|
||||
|
||||
application/octet-stream bin exe dll;
|
||||
application/octet-stream deb;
|
||||
application/octet-stream dmg;
|
||||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mp3;
|
||||
audio/ogg ogg;
|
||||
audio/x-m4a m4a;
|
||||
audio/x-realaudio ra;
|
||||
|
||||
video/3gpp 3gpp 3gp;
|
||||
video/mp2t ts;
|
||||
video/mp4 mp4;
|
||||
video/mpeg mpeg mpg;
|
||||
video/quicktime mov;
|
||||
video/webm webm;
|
||||
video/x-flv flv;
|
||||
video/x-m4v m4v;
|
||||
video/x-mng mng;
|
||||
video/x-ms-asf asx asf;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-msvideo avi;
|
||||
}
|
||||
15
bitwarden/rootfs/etc/nginx/includes/proxy_params.conf
Normal file
15
bitwarden/rootfs/etc/nginx/includes/proxy_params.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
proxy_http_version 1.1;
|
||||
proxy_ignore_client_abort off;
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_redirect off;
|
||||
proxy_send_timeout 86400s;
|
||||
proxy_max_temp_file_size 0;
|
||||
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
6
bitwarden/rootfs/etc/nginx/includes/server_params.conf
Normal file
6
bitwarden/rootfs/etc/nginx/includes/server_params.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
root /dev/null;
|
||||
server_name $hostname;
|
||||
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
8
bitwarden/rootfs/etc/nginx/includes/ssl_params.conf
Normal file
8
bitwarden/rootfs/etc/nginx/includes/ssl_params.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers off;
|
||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||
ssl_session_timeout 10m;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_tickets off;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
3
bitwarden/rootfs/etc/nginx/includes/upstream.conf
Normal file
3
bitwarden/rootfs/etc/nginx/includes/upstream.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
upstream backend {
|
||||
server 127.0.0.1:80;
|
||||
}
|
||||
48
bitwarden/rootfs/etc/nginx/nginx.conf
Normal file
48
bitwarden/rootfs/etc/nginx/nginx.conf
Normal file
@@ -0,0 +1,48 @@
|
||||
# Run nginx in foreground.
|
||||
daemon off;
|
||||
|
||||
# This is run inside Docker.
|
||||
user root;
|
||||
|
||||
# Pid storage location.
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
# Set number of worker processes.
|
||||
worker_processes 1;
|
||||
|
||||
# Enables the use of JIT for regular expressions to speed-up their processing.
|
||||
pcre_jit on;
|
||||
|
||||
# Write error log to the add-on log.
|
||||
error_log /proc/1/fd/1 error;
|
||||
|
||||
# Load dynamic modules.
|
||||
include /etc/nginx/modules/*.conf;
|
||||
|
||||
# Max num of simultaneous connections by a worker process.
|
||||
events {
|
||||
worker_connections 512;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/includes/mime.types;
|
||||
|
||||
access_log off;
|
||||
client_max_body_size 4G;
|
||||
default_type application/octet-stream;
|
||||
gzip on;
|
||||
keepalive_timeout 65;
|
||||
sendfile on;
|
||||
server_tokens off;
|
||||
tcp_nodelay on;
|
||||
tcp_nopush on;
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
include /etc/nginx/includes/upstream.conf;
|
||||
|
||||
include /etc/nginx/servers/*.conf;
|
||||
}
|
||||
15
bitwarden/rootfs/etc/nginx/servers/direct-ssl.disabled
Normal file
15
bitwarden/rootfs/etc/nginx/servers/direct-ssl.disabled
Normal file
@@ -0,0 +1,15 @@
|
||||
server {
|
||||
listen 7277 default_server ssl;
|
||||
|
||||
include /etc/nginx/includes/server_params.conf;
|
||||
include /etc/nginx/includes/ssl_params.conf;
|
||||
include /etc/nginx/includes/proxy_params.conf;
|
||||
|
||||
ssl_certificate /ssl/%%certfile%%;
|
||||
ssl_certificate_key /ssl/%%keyfile%%;
|
||||
|
||||
location / {
|
||||
proxy_pass http://backend;
|
||||
}
|
||||
|
||||
}
|
||||
11
bitwarden/rootfs/etc/nginx/servers/direct.disabled
Normal file
11
bitwarden/rootfs/etc/nginx/servers/direct.disabled
Normal file
@@ -0,0 +1,11 @@
|
||||
server {
|
||||
listen 7277 default_server;
|
||||
|
||||
include /etc/nginx/includes/server_params.conf;
|
||||
include /etc/nginx/includes/proxy_params.conf;
|
||||
|
||||
location / {
|
||||
proxy_pass http://backend;
|
||||
}
|
||||
|
||||
}
|
||||
21
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/init-nginx/run
Normal file
21
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/init-nginx/run
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Vaultwarden
|
||||
# This file configures NGINX
|
||||
# ==============================================================================
|
||||
declare certfile
|
||||
declare keyfile
|
||||
|
||||
bashio::config.require.ssl
|
||||
|
||||
if bashio::config.true 'ssl'; then
|
||||
certfile=$(bashio::config 'certfile')
|
||||
keyfile=$(bashio::config 'keyfile')
|
||||
|
||||
mv /etc/nginx/servers/direct-ssl.disabled /etc/nginx/servers/direct.conf
|
||||
sed -i "s#%%certfile%%#${certfile}#g" /etc/nginx/servers/direct.conf
|
||||
sed -i "s#%%keyfile%%#${keyfile}#g" /etc/nginx/servers/direct.conf
|
||||
else
|
||||
mv /etc/nginx/servers/direct.disabled /etc/nginx/servers/direct.conf
|
||||
fi
|
||||
1
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/init-nginx/type
Normal file
1
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/init-nginx/type
Normal file
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
1
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/init-nginx/up
Normal file
1
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/init-nginx/up
Normal file
@@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-nginx/run
|
||||
26
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/nginx/finish
Normal file
26
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/nginx/finish
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Vaultwarden
|
||||
# Take down the S6 supervision tree when Nginx fails
|
||||
# ==============================================================================
|
||||
declare exit_code
|
||||
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
|
||||
readonly exit_code_service="${1}"
|
||||
readonly exit_code_signal="${2}"
|
||||
readonly service="NGINX"
|
||||
|
||||
bashio::log.info \
|
||||
"Service ${service} exited with code ${exit_code_service}" \
|
||||
"(by signal ${exit_code_signal})"
|
||||
|
||||
if [[ "${exit_code_service}" -eq 256 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
|
||||
elif [[ "${exit_code_service}" -ne 0 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
exec /run/s6/basedir/bin/halt
|
||||
fi
|
||||
9
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/nginx/run
Normal file
9
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/nginx/run
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Vaultwarden
|
||||
# Runs the Nginx daemon
|
||||
# ==============================================================================
|
||||
bashio::net.wait_for 80
|
||||
bashio::log.info "Starting NGinx..."
|
||||
|
||||
exec nginx
|
||||
1
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/nginx/type
Normal file
1
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/nginx/type
Normal file
@@ -0,0 +1 @@
|
||||
longrun
|
||||
27
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/vaultwarden/finish
Normal file
27
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/vaultwarden/finish
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Vaultwarden
|
||||
# Take down the S6 supervision tree when the server fails
|
||||
# ==============================================================================
|
||||
declare exit_code
|
||||
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
|
||||
readonly exit_code_service="${1}"
|
||||
readonly exit_code_signal="${2}"
|
||||
readonly service="Vaultwarden"
|
||||
|
||||
bashio::log.info \
|
||||
"Service ${service} exited with code ${exit_code_service}" \
|
||||
"(by signal ${exit_code_signal})"
|
||||
|
||||
if [[ "${exit_code_service}" -eq 256 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
|
||||
elif [[ "${exit_code_service}" -ne 0 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
exec /run/s6/basedir/bin/halt
|
||||
fi
|
||||
78
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/vaultwarden/run
Normal file
78
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/vaultwarden/run
Normal file
@@ -0,0 +1,78 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Vaultwarden
|
||||
# Runs the Vaultwarden server
|
||||
# ==============================================================================
|
||||
declare admin_token
|
||||
declare log_level
|
||||
declare request_size_limit
|
||||
declare secret_key
|
||||
|
||||
# Set defaults
|
||||
export DATA_FOLDER=/data
|
||||
export ROCKET_PORT=80
|
||||
export ROCKET_WORKERS=2
|
||||
|
||||
# Set a random secret, to remove confusing warning from logs.
|
||||
secret_key=$(openssl rand -base64 32)
|
||||
export ROCKET_SECRET_KEY="${secret_key}"
|
||||
|
||||
# Find the matching log level
|
||||
if bashio::config.has_value 'log_level'; then
|
||||
case "$(bashio::string.lower "$(bashio::config 'log_level')")" in
|
||||
all|trace)
|
||||
log_level="trace"
|
||||
;;
|
||||
debug)
|
||||
log_level="debug"
|
||||
;;
|
||||
info|notice)
|
||||
log_level="info"
|
||||
;;
|
||||
warning)
|
||||
log_level="warn"
|
||||
;;
|
||||
error|fatal)
|
||||
log_level="error"
|
||||
;;
|
||||
off)
|
||||
log_level="off"
|
||||
;;
|
||||
esac
|
||||
|
||||
export LOG_LEVEL="${log_level}"
|
||||
fi
|
||||
|
||||
# Show admin token in the log, if config does not exist.
|
||||
if ! bashio::fs.file_exists '/data/config.json'; then
|
||||
admin_token=$(openssl rand -base64 48)
|
||||
export ADMIN_TOKEN="${admin_token}"
|
||||
|
||||
bashio::log.info
|
||||
bashio::log.info
|
||||
bashio::log.info "READ THIS CAREFULLY! READ THIS CAREFULLY!"
|
||||
bashio::log.info
|
||||
bashio::log.info
|
||||
bashio::log.info "This is your temporary random admin token/password!"
|
||||
bashio::log.info
|
||||
bashio::log.info "${admin_token}"
|
||||
bashio::log.info
|
||||
bashio::log.info "Be sure to change it in the admin panel, as soon as possible."
|
||||
bashio::log.info
|
||||
bashio::log.info "After you have changed ANY setting in the admin panel,"
|
||||
bashio::log.info "the add-on will NOT generate a new token on each start"
|
||||
bashio::log.info "and stops showing this message."
|
||||
bashio::log.info
|
||||
fi
|
||||
|
||||
# API request size limit
|
||||
if bashio::config.has_value 'request_size_limit'; then
|
||||
request_size_limit=$(bashio::config 'request_size_limit')
|
||||
export ROCKET_LIMITS="{json=${request_size_limit}}"
|
||||
fi
|
||||
|
||||
# Run the Bitwarden server
|
||||
bashio::log.info 'Starting the Vaultwarden server...'
|
||||
cd /opt || bashio::exit.nok
|
||||
exec ./vaultwarden
|
||||
1
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/vaultwarden/type
Normal file
1
bitwarden/rootfs/etc/s6-overlay/s6-rc.d/vaultwarden/type
Normal file
@@ -0,0 +1 @@
|
||||
longrun
|
||||
BIN
bitwarden/stats.png
Normal file
BIN
bitwarden/stats.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
9
bitwarden/updater.json
Normal file
9
bitwarden/updater.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"last_update": "28-12-2025",
|
||||
"paused": false,
|
||||
"repository": "alexbelgium/hassio-addons",
|
||||
"slug": "bitwarden",
|
||||
"source": "github",
|
||||
"upstream_repo": "dani-garcia/bitwarden_rs",
|
||||
"upstream_version": "1.35.0"
|
||||
}
|
||||
Reference in New Issue
Block a user