웹사이트 검색

Debian 11에 Bitwarden Password Manager를 설치하는 방법


이 페이지에서

  1. 전제 조건
  2. Docker 및 Docker Compose 설치
  3. 데비안 11에 Bitwarden 설치
  4. Bitwarden 웹 인터페이스 액세스
  5. 결론

Bitwarden은 암호화된 저장소에 웹 사이트 자격 증명을 저장하는 무료 오픈 소스 암호 관리자입니다. 모든 로그인 자격 증명을 저장하고 모든 장치 간에 동기화된 상태를 유지할 수 있습니다. 개인, 팀 및 비즈니스 조직이 중앙 위치에서 자격 증명을 관리하도록 설계되었습니다. Bitwarden은 데스크톱 PC는 물론 스마트폰 및 태블릿용 클라이언트 애플리케이션을 제공합니다. 또한 강력하고 안전한 암호를 생성하기 위한 암호 생성기를 제공합니다.

이 게시물에서는 Debian 11에 Bitwarden 암호 관리자를 설치하는 방법을 보여줍니다.

전제 조건

  • Ubuntu 20.04를 실행하는 서버.\n
  • 루트 암호는 서버에서 구성됩니다.\n

Docker 및 Docker Compose 설치

Bitwarden은 Docker와 함께 설치할 수 있는 무료 버전을 제공합니다. 기본적으로 최신 버전의 Docker는 Debian 11 기본 리포지토리에 포함되어 있지 않습니다. 따라서 Dockers 공식 저장소에서 설치해야 합니다.

먼저 다음 명령을 사용하여 필요한 모든 종속 항목을 설치합니다.

apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

모든 종속성이 설치되면 다음 명령을 사용하여 GPG 키를 다운로드하고 추가합니다.

curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

다음으로 다음 명령을 사용하여 Docker CE 리포지토리를 APT에 추가합니다.

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list

다음으로 리포지토리를 업데이트하고 다음 명령을 사용하여 Docker CE를 설치합니다.

apt-get update -y
apt-get install docker-ce docker-ce-cli containerd.io -y

설치가 완료되면 다음 명령을 사용하여 Docker CE 버전을 확인할 수 있습니다.

docker --version

다음과 같은 결과가 표시됩니다.

Docker version 20.10.9, build c2ea9bc

다음 명령을 사용하여 Docker의 상태를 확인할 수도 있습니다.

systemctl status docker

다음 출력이 표시되어야 합니다.

? docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-10-25 09:33:15 UTC; 14min ago
TriggeredBy: ? docker.socket
       Docs: https://docs.docker.com
   Main PID: 11656 (dockerd)
      Tasks: 29
     Memory: 1.0G
     CGroup: /system.slice/docker.service
             ??11656 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
             ??27717 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 80 -container-ip 172.18.0.5 -container-port 8052

Oct 25 09:33:14 ubunt4 dockerd[11656]: time="2021-10-03T09:33:14.865741428Z" level=info msg="Default bridge (docker0) is assigned with an >
Oct 25 09:33:14 ubunt4 dockerd[11656]: time="2021-10-03T09:33:14.951326143Z" level=info msg="Loading containers: done."
Oct 25 09:33:14 ubunt4 dockerd[11656]: time="2021-10-03T09:33:14.974570590Z" level=info msg="Docker daemon" commit=4484c46d9d graphdriver(>
Oct 25 09:33:14 ubunt4 dockerd[11656]: time="2021-10-03T09:33:14.974729712Z" level=info msg="Daemon has completed initialization"
Oct 25 09:33:15 ubunt4 dockerd[11656]: time="2021-10-03T09:33:15.030128906Z" level=info msg="API listen on /run/docker.sock"
Oct 25 09:33:15 ubunt4 systemd[1]: Started Docker Application Container Engine.
Oct 25 09:45:52 ubunt4 dockerd[11656]: time="2021-10-03T09:45:52.583474433Z" level=info msg="ignoring event" module=libcontainerd namespac>
Oct 25 09:45:52 ubunt4 dockerd[11656]: time="2021-10-03T09:45:52.619380786Z" level=info msg="ignoring event" module=libcontainerd namespac>
Oct 25 09:45:52 ubunt4 dockerd[11656]: time="2021-10-03T09:45:52.635359740Z" level=info msg="ignoring event" module=libcontainerd namespac>
Oct 25 09:45:52 ubunt4 dockerd[11656]: time="2021-10-03T09:45:52.637507396Z" level=info msg="ignoring event" module=libcontainerd namespac

그런 다음 다음 명령을 사용하여 최신 버전의 Docker Composer를 다운로드합니다.

wget https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-linux-x86_64

다음으로, 다음 명령을 사용하여 다운로드한 바이너리를 시스템 경로에 복사합니다.

mv docker-compose-linux-x86_64 /usr/bin/docker-compose

다음으로 Docker Compose 바이너리에 대한 실행 권한을 설정합니다.

chmod 755 /usr/bin/docker-compose

Debian 11에 Bitwarden 설치

먼저 Bitwarden 웹 사이트로 이동하여 아래와 같이 이메일 주소를 제공하십시오.

다음으로 제출 버튼을 클릭합니다. 다음 화면에 설치 ID와 키가 표시됩니다. 나중에 설치하는 동안 필요하므로 메모해 두십시오.

이제 다음 명령을 사용하여 Bitwarden 설치 스크립트를 다운로드하십시오.

curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh

스크립트가 다운로드되면 다음 명령을 사용하여 실행 권한을 설정합니다.

chmod +x bitwarden.sh

그런 다음 다음 명령을 사용하여 설치를 시작합니다.

./bitwarden.sh install

아래와 같이 도메인 이름 또는 IP 주소 및 저장소를 제공하라는 메시지가 표시됩니다.

 _     _ _                         _            
| |__ (_) |___      ____ _ _ __ __| | ___ _ __  
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \ 
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2021, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden

===================================================

bitwarden.sh version 1.43.0
Docker version 20.10.9, build c2ea9bc
docker-compose version 1.25.0, build unknown

(!) Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com): 69.28.84.207

(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n): n

(!) Enter the database name for your Bitwarden instance (ex. vault): vault

필요한 모든 정보를 제공한 다음 Enter 키를 누릅니다. 아래와 같이 설치 ID와 키를 제공하라는 메시지가 표시됩니다.

Digest: sha256:29bd0777de8b902bd26a67f74c832c8032f1bea41e716277a98f7d439a8f2912
Status: Downloaded newer image for bitwarden/setup:1.43.0
docker.io/bitwarden/setup:1.43.0

(!) Enter your installation id (get at https://bitwarden.com/host): xxxxxxx-xxxxxx-xxxx-xxxx-xxxxxxxxxx

(!) Enter your installation key: xxxxxxxxxxx

(!) Do you have a SSL certificate to use? (y/n): n

(!) Do you want to generate a self-signed SSL certificate? (y/n): y

필요한 모든 정보를 제공한 다음 Enter 키를 눌러 설치를 시작하십시오. 설치가 완료되면 다음과 같은 결과가 표시됩니다.

Generating self signed SSL certificate.
Generating a RSA private key
.....++++
...........................................................................................................................++++
writing new private key to '/bitwarden/ssl/self/69.28.84.207/private.key'
-----
Generating key for IdentityServer.
Generating a RSA private key
........................................................................................................................................................................++++
..............................................................................................................++++
writing new private key to 'identity.key'
-----

!!!!!!!!!! WARNING !!!!!!!!!!
You are using an untrusted SSL certificate. This certificate will not be 
trusted by Bitwarden client applications. You must add this certificate to 
the trusted store on each device or else you will receive errors when trying 
to connect to your installation.

Building nginx config.
Building docker environment files.
Building docker environment override files.
Building FIDO U2F app id.
Building docker-compose.yml.

Installation complete

If you need to make additional configuration changes, you can modify
the settings in `./bwdata/config.yml` and then run:
`./bitwarden.sh rebuild` or `./bitwarden.sh update`

Next steps, run:
`./bitwarden.sh start`

다음으로 다음 명령을 사용하여 Bitwarden을 시작합니다.

./bitwarden.sh start

다음과 같은 결과가 표시됩니다.

 _     _ _                         _            
| |__ (_) |___      ____ _ _ __ __| | ___ _ __  
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \ 
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2021, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden

===================================================

bitwarden.sh version 1.43.0
Docker version 20.10.9, build c2ea9bc
docker-compose version 1.25.0, build unknown

Pulling mssql         ... done
Pulling web           ... done
Pulling attachments   ... done
Pulling api           ... done
Pulling identity      ... done
Pulling sso           ... done
Pulling admin         ... done
Pulling portal        ... done
Pulling icons         ... done
Pulling notifications ... done
Pulling events        ... done
Pulling nginx         ... done

Creating network "docker_default" with the default driver
Creating network "docker_public" with the default driver
Creating bitwarden-web           ... done
Creating bitwarden-mssql         ... done
Creating bitwarden-sso           ... done
Creating bitwarden-icons         ... done
Creating bitwarden-attachments   ... done
Creating bitwarden-identity      ... done
Creating bitwarden-notifications ... done
Creating bitwarden-api           ... done
Creating bitwarden-events        ... done
Creating bitwarden-admin         ... done
Creating bitwarden-portal        ... done
Creating bitwarden-nginx         ... done
1.43.0: Pulling from bitwarden/setup
Digest: sha256:29bd0777de8b902bd26a67f74c832c8032f1bea41e716277a98f7d439a8f2912
Status: Image is up to date for bitwarden/setup:1.43.0
docker.io/bitwarden/setup:1.43.0


Bitwarden is up and running!
===================================================

visit https://69.28.84.207
to update, run `./bitwarden.sh updateself` and then `./bitwarden.sh update`

완료되면 다음 단계로 진행할 수 있습니다.

Bitwarden 웹 인터페이스에 액세스

이제 웹 브라우저를 열고 https://your-server-ip URL을 사용하여 Bitwarden 웹 인터페이스에 액세스하십시오. 다음 페이지가 표시됩니다.

계정 만들기 버튼을 클릭합니다. 다음 페이지가 표시됩니다.

이메일, 이름, 마스터 비밀번호를 제공하고 제출 버튼을 클릭하십시오. Bitwarden 로그인 화면이 나타납니다.

이메일 주소, 비밀번호를 입력하고 로그인 버튼을 클릭합니다. 다음 페이지에서 Bitwarden 대시보드를 볼 수 있습니다.

결론

축하합니다! Debian 11에 Bitwarden 암호 관리자를 성공적으로 설치했습니다. 이제 조직에서 이 솔루션을 구현하고 중앙 위치에서 모든 자격 증명 관리를 시작할 수 있습니다. 궁금한 점이 있으면 언제든지 문의해 주세요.