# Setup & Configuration

We need to install the service through Portainer and configure any necessary settings.

# Preparation

There are some things we need to do in preparation to install this service.

## Volumes

<details id="bkmrk-media-folders-radarr"><summary>Persistent Data</summary>

This is where the service will store its own application data and ensures we can quickly update the service image.

<p class="callout warning">Ensure your user has permissions to access the folder.</p>

</details>## Environment

<details id="bkmrk-tz-this-is-the-curre"><summary>TZ</summary>

This is the current time zone formatted using the [tz database.](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)

<p class="callout info">*For example:* America/Vancouver</p>

</details><details id="bkmrk-signups_allowed-we-n"><summary>SIGNUPS\_ALLOWED</summary>

We need to temporarily enable this setting to allow us to create a new account with the service.

</details>

# Installation

The service can be installed through the Portainer web interface.

<p class="callout info">Learn about [creating a new stack](https://hub.subspace.services/books/portainer/page/creating-a-new-stack "Creating a New Stack").</p>

## Docker Compose

Use the following code to install the service:

```yaml
---
services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    network_mode: bridge
    environment:
      - TZ=America/Vancouver
      - SIGNUPS_ALLOWED=true
    ports:
      - 2546:80
    volumes:
      - /srv/vaultwarden:/data
    restart: unless-stopped
```

# Updating

<p class="callout warning">Backup and Re-Deploy the Stack</p>

VaultWarden has been optimized for [running in Docker](https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image). This allows you to [re-deploy the stack through Portainer](https://hub.subspace.services/books/portainer/page/updating-a-stack "Updating a Stack") to download the latest updates.

Due to the important nature of this data, it is always crucial to perform a full backup before upgrading.