[Unit]
Description=Bitwarden Server (Rust Edition)
Documentation=https://github.com/dani-garcia/bitwarden_rs
# If you use a database like mariadb,mysql or postgresql,
# you have to add them like the following and uncomment them
# by removing the `# ` before it. This makes sure that your
# database server is started before bitwarden_rs ("After") and has
# started successfully before starting bitwarden_rs ("Requires").
# Only sqlite
After=network.target
# MariaDB
# After=network.target mariadb.service
# Requires=mariadb.service
# Mysql
# After=network.target mysqld.service
# Requires=mysqld.service
# PostgreSQL
# After=network.target postgresql.service
# Requires=postgresql.service
[Service]
# The user/group bitwarden_rs is run under. the working directory (see below) should allow write and read access to this user/group
User=root
Group=root
# The location of the .env file for configuration
EnvironmentFile=/etc/bitwarden_rs.env
# The location of the compiled binary
ExecStart=/root/bitwarden_rs/target/release/bitwarden_rs
# Set reasonable connection and process limits
LimitNOFILE=1048576
LimitNPROC=64
# Isolate bitwarden_rs from the rest of the system
#PrivateTmp=true
#PrivateDevices=true
#ProtectHome=true
ProtectSystem=strict
# Only allow writes to the following directory and set it to the working directory (user and password data are stored here)
WorkingDirectory=/root/bitwarden_rs
ReadWriteDirectories=/root/bitwarden_rs
# Allow bitwarden_rs to bind ports in the range of 0-1024
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
To Action From
-- ------ ----
1194/udp ALLOW IN Anywhere
22/tcp (OpenSSH) ALLOW IN Anywhere
80 ALLOW IN Anywhere
1194/udp (v6) ALLOW IN Anywhere (v6)
22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)
80 (v6) ALLOW IN Anywhere (v6)
I tried temporary disable ufw, reboot server, reload bitwarden.service, ... but no success
Originally created by @rooneyviet on GitHub (Apr 4, 2020).
I'm installing bitwarden_rs to my Ubuntu 18.04 VPS.
using this https://github.com/dani-garcia/bitwarden_rs/wiki/Building-binary
and setup service https://github.com/dani-garcia/bitwarden_rs/wiki/Setup-as-a-systemd-service
it's start successfully
`systemctl status bitwarden_rs.service -l
● bitwarden_rs.service
Loaded: loaded (/etc/systemd/system/bitwarden_rs.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2020-04-04 06:45:18 EDT; 6min ago
Apr 04 06:45:18 vps292651 systemd[1]: Started bitwarden_rs.service.
Apr 04 06:45:18 vps292651 bitwarden_rs[1457]: /--------------------------------------------------------------------\
Apr 04 06:45:18 vps292651 bitwarden_rs[1457]: | Starting Bitwarden_RS |
Apr 04 06:45:18 vps292651 bitwarden_rs[1457]: | Version 1.14.1-843604c9 |
Apr 04 06:45:18 vps292651 bitwarden_rs[1457]: [2020-04-04 06:45:18][start][INFO] Rocket has launched from http://127.0.0.1:80
`
but when I go to the website http://my-ip-address (from my PC) nothing load, "Unable to connect"
here is my config file
/etc/bitwarden_rs.env
```
WEB_VAULT_FOLDER=/root/bitwarden_rs/target/release/web-vault/
WEB_VAULT_ENABLED=true
ADMIN_TOKEN= string I got from 'openssl rand -base64 48'
SHOW_PASSWORD_HINT=false
ROCKET_ADDRESS=127.0.0.1
ROCKET_PORT=80
SMTP_HOST= my-host
SMTP_FROM=email@gmail.com
SMTP_FROM_NAME="bitwarden_rs"
SMTP_PORT=my-port
SMTP_SSL=true
SMTP_USERNAME=mail
SMTP_PASSWORD=pass
```
service file
```
[Unit]
Description=Bitwarden Server (Rust Edition)
Documentation=https://github.com/dani-garcia/bitwarden_rs
# If you use a database like mariadb,mysql or postgresql,
# you have to add them like the following and uncomment them
# by removing the `# ` before it. This makes sure that your
# database server is started before bitwarden_rs ("After") and has
# started successfully before starting bitwarden_rs ("Requires").
# Only sqlite
After=network.target
# MariaDB
# After=network.target mariadb.service
# Requires=mariadb.service
# Mysql
# After=network.target mysqld.service
# Requires=mysqld.service
# PostgreSQL
# After=network.target postgresql.service
# Requires=postgresql.service
[Service]
# The user/group bitwarden_rs is run under. the working directory (see below) should allow write and read access to this user/group
User=root
Group=root
# The location of the .env file for configuration
EnvironmentFile=/etc/bitwarden_rs.env
# The location of the compiled binary
ExecStart=/root/bitwarden_rs/target/release/bitwarden_rs
# Set reasonable connection and process limits
LimitNOFILE=1048576
LimitNPROC=64
# Isolate bitwarden_rs from the rest of the system
#PrivateTmp=true
#PrivateDevices=true
#ProtectHome=true
ProtectSystem=strict
# Only allow writes to the following directory and set it to the working directory (user and password data are stored here)
WorkingDirectory=/root/bitwarden_rs
ReadWriteDirectories=/root/bitwarden_rs
# Allow bitwarden_rs to bind ports in the range of 0-1024
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
```
sudo lsof -n | grep TCP | grep LISTEN
```
systemd-r 665 systemd-resolve 13u IPv4 15293 0t0 TCP 127.0.0.53:domain (LISTEN)
sshd 843 root 3u IPv4 18689 0t0 TCP *:ssh (LISTEN)
sshd 843 root 4u IPv6 18700 0t0 TCP *:ssh (LISTEN)
bitwarden 1457 root 13u IPv4 22096 0t0 TCP 127.0.0.1:http (LISTEN)
r2d2-work 1457 1468 root 13u IPv4 22096 0t0 TCP 127.0.0.1:http (LISTEN)
r2d2-work 1457 1469 root 13u IPv4 22096 0t0 TCP 127.0.0.1:http (LISTEN)
r2d2-work 1457 1470 root 13u IPv4 22096 0t0 TCP 127.0.0.1:http (LISTEN)
bitwarden 1457 1472 root 13u IPv4 22096 0t0 TCP 127.0.0.1:http (LISTEN)
bitwarden 1457 1473 root 13u IPv4 22096 0t0 TCP 127.0.0.1:http (LISTEN)
bitwarden 1457 1474 root 13u IPv4 22096 0t0 TCP 127.0.0.1:http (LISTEN)
```
sudo ufw status verbose
```
To Action From
-- ------ ----
1194/udp ALLOW IN Anywhere
22/tcp (OpenSSH) ALLOW IN Anywhere
80 ALLOW IN Anywhere
1194/udp (v6) ALLOW IN Anywhere (v6)
22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)
80 (v6) ALLOW IN Anywhere (v6)
```
I tried temporary disable ufw, reboot server, reload bitwarden.service, ... but no success
Btw I did try install from docker
```
docker pull bitwardenrs/server:latest
docker run -d --name bitwarden -v /bw-data/:/data/ -p 80:80 bitwardenrs/server:latest
```
and it loaded fine.
now I'm trying installing without docker.
I deleted everything and started over again
then I think it need to ufw allow 80/tcp , rather than only allow 80
@rooneyviet commented on GitHub (Apr 5, 2020):
I finally got it running
I deleted everything and started over again
then I think it need to ufw allow 80/tcp , rather than only allow 80
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @rooneyviet on GitHub (Apr 4, 2020).
I'm installing bitwarden_rs to my Ubuntu 18.04 VPS.
using this https://github.com/dani-garcia/bitwarden_rs/wiki/Building-binary
and setup service https://github.com/dani-garcia/bitwarden_rs/wiki/Setup-as-a-systemd-service
it's start successfully
systemctl status bitwarden_rs.service -l ● bitwarden_rs.service Loaded: loaded (/etc/systemd/system/bitwarden_rs.service; disabled; vendor preset: enabled) Active: active (running) since Sat 2020-04-04 06:45:18 EDT; 6min ago Apr 04 06:45:18 vps292651 systemd[1]: Started bitwarden_rs.service. Apr 04 06:45:18 vps292651 bitwarden_rs[1457]: /--------------------------------------------------------------------\ Apr 04 06:45:18 vps292651 bitwarden_rs[1457]: | Starting Bitwarden_RS | Apr 04 06:45:18 vps292651 bitwarden_rs[1457]: | Version 1.14.1-843604c9 | Apr 04 06:45:18 vps292651 bitwarden_rs[1457]: [2020-04-04 06:45:18][start][INFO] Rocket has launched from http://127.0.0.1:80but when I go to the website http://my-ip-address (from my PC) nothing load, "Unable to connect"
here is my config file
/etc/bitwarden_rs.env
service file
sudo lsof -n | grep TCP | grep LISTEN
sudo ufw status verbose
I tried temporary disable ufw, reboot server, reload bitwarden.service, ... but no success
Btw I did try install from docker
and it loaded fine.
now I'm trying installing without docker.
@rooneyviet commented on GitHub (Apr 5, 2020):
I finally got it running
I deleted everything and started over again
then I think it need to ufw allow 80/tcp , rather than only allow 80