# 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.

## Environment

<details id="bkmrk-tz-this-is-the-curre"><summary>VPN\_SERVICE\_PROVIDER</summary>

Gluetun currently supports:

- AirVPN
- CyberGhost
- ExpressVPN
- FastestVPN
- HideMyAss
- IPVanish
- iVPN
- Mullvad
- NordVPN
- Perfect Privacy
- Privado
- Private Internet Access
- PrivateVPN
- ProtonVPN
- PureVPN
- SlickVPN
- Surfshark
- Torguard
- VPN Secure
- VPN Unlimited
- VyprVPN
- WeVPN
- Windscribe

You can learn more about how to configure each of these service providers by [reading the appropriate files on their repository](https://github.com/qdm12/gluetun-wiki/tree/main/setup/providers).

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

</details><details id="bkmrk-gid-%C2%A0"><summary>VPN\_TYPE</summary>

This is the method for connecting to the VPN service and can be configured to use OpenVPN or Wireguard.

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

</details><details id="bkmrk-pgid-this-is-the-num"><summary>OPENVPN\_USER</summary>

<p class="callout info">This is provided by your VPN service provider for connecting to the service. </p>

This may be your account password, or one generated by your provider enabling you to connect through OpenVPN. You can find out more information by [reading the appropriate file in their documentation](https://github.com/qdm12/gluetun-wiki/tree/main/setup/providers).

</details><details id="bkmrk-server_regions-this-"><summary>SERVER\_REGIONS</summary>

This is geographical region that the service will connect to and can be found by [following the guide in the Glueton documentation.](https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md)

</details>### Passwords

<p class="callout danger">Keep these securely stored in a password manager, such as [VaultWarden](https://hub.subspace.services/books/vaultwarden "VaultWarden").</p>

<details id="bkmrk-owncloud_admin_passw"><summary>OPENVPN\_PASSWORD</summary>

<p class="callout info">This is provided by your VPN service provider for connecting to the service. </p>

This is could be your account password, or a password created by your VPN provider to connect through OpenVPN.

</details>### Ports

<p class="callout warning">Glueton acts as a VPN client for your Docker containers and service ports need to be configured through it.</p>

# 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 and a qBittorent server as an example:

```yaml
---
services:
  gluetun:
    image: qmcgaw/gluetun
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_SERVICE_PROVIDER=
      - VPN_TYPE=
      - OPENVPN_USER=
      - OPENVPN_PASSWORD=
      - SERVER_REGIONS=
    ports:
      # Connected Application Ports
      # Example qBittorrent
      - "0.0.0.0:9191:9191"
      - "0.0.0.0:6881:6881
      
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    network_mode: "service:glueton"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Vancouver
      - WEBUI_PORT=9191
      - TORRENTING_PORT=6881
    volumes:
      # Persistent Data 
      - /srv/qbittorrent:/config

      # Download Folders
      - /mnt/downloads:/downloads/
    restart: unless-stopped
```

# Updating

<p class="callout success">Re-Deploy the Stack</p>

This service has been optimized for running in Docker.

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.