summarylogtreecommitdiffstats
path: root/bitwarden-api.service
diff options
context:
space:
mode:
Diffstat (limited to 'bitwarden-api.service')
-rw-r--r--bitwarden-api.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitwarden-api.service b/bitwarden-api.service
new file mode 100644
index 00000000000..d9317e336e2
--- /dev/null
+++ b/bitwarden-api.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Bitwarden API
+PartOf=bitwarden-server.service
+After=bitwarden-server.service bitwarden-mssql.service
+
+[Service]
+ExecStart=/usr/bin/docker run --rm --name bitwarden-api \
+ --env-file /etc/bitwarden/global.env \
+ --env-file /etc/bitwarden/uid.env \
+ --volume /var/lib/bitwarden/core:/etc/bitwarden/core \
+ --volume /var/log/bitwarden/api:/etc/bitwarden/logs \
+ --network bitwarden-net \
+ bitwarden/api:1.19.0
+ExecStop=/usr/bin/docker kill bitwarden-api
+Restart=on-failure
+
+[Install]
+WantedBy=bitwarden-server.service \ No newline at end of file