I have build (rather than docker) and deployed vaultwarden, it works well on my VPS server but one issue:
Although I have added LOG_FILE=/opt/vaultwarden/vaultwarden.log
to /opt/vaultwarden/.env
, it doesn’t create log file in the path while running.
And sudo journalctl -u vaultwarden.service
command could print the log:
Apr 15 01:50:37 vm systemd[1]: Started Vaultwarden Server.
Apr 15 01:50:37 vm vaultwarden[35883]: /--------------------------------------------------------------------\
Apr 15 01:50:37 vm vaultwarden[35883]: | Starting Vaultwarden |
Apr 15 01:50:37 vm vaultwarden[35883]: |--------------------------------------------------------------------|
Apr 15 01:50:37 vm vaultwarden[35883]: | This is an *unofficial* Bitwarden implementation, DO NOT use the |
Apr 15 01:50:37 vm vaultwarden[35883]: | official channels to report bugs/features, regardless of client. |
Apr 15 01:50:37 vm vaultwarden[35883]: | Send usage/configuration questions or feature requests to: |
Apr 15 01:50:37 vm vaultwarden[35883]: | https://vaultwarden.discourse.group/ |
Apr 15 01:50:37 vm vaultwarden[35883]: | Report suspected bugs/issues in the software itself at: |
Apr 15 01:50:37 vm vaultwarden[35883]: | https://github.com/dani-garcia/vaultwarden/issues/new |
Apr 15 01:50:37 vm vaultwarden[35883]: \--------------------------------------------------------------------/
Apr 15 01:50:37 vm vaultwarden[35883]: Configured for production.
Apr 15 01:50:37 vm vaultwarden[35883]: => address: 127.0.0.1
Apr 15 01:50:37 vm vaultwarden[35883]: => port: 8200
Apr 15 01:50:37 vm vaultwarden[35883]: => log: critical
Apr 15 01:50:37 vm vaultwarden[35883]: => workers: 4
Apr 15 01:50:37 vm vaultwarden[35883]: => secret key: private-cookies disabled
Apr 15 01:50:37 vm vaultwarden[35883]: => limits: forms = 32KiB
Apr 15 01:50:37 vm vaultwarden[35883]: => keep-alive: 5s
Apr 15 01:50:37 vm vaultwarden[35883]: => tls: disabled
Apr 15 01:50:37 vm vaultwarden[35883]: Rocket has launched from http://127.0.0.1:8200
Below is the systemd service file content:
[Unit]
Description=Vaultwarden Server
Documentation=https://github.com/dani-garcia/vaultwarden
After=network.target
[Service]
User=vaultwarden
Group=vaultwarden
EnvironmentFile=/opt/vaultwarden/.env
ExecStart=/opt/vaultwarden/bin/vaultwarden
LimitNOFILE=65535
LimitNPROC=4096
PrivateTmp=true
PrivateDevices=true
ProtectHome=true
ProtectSystem=strict
DevicePolicy=closed
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictNamespaces=yes
RestrictRealtime=yes
MemoryDenyWriteExecute=yes
LockPersonality=yes
WorkingDirectory=/opt/vaultwarden
ReadWriteDirectories=/opt/vaultwarden/data
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target