diff --git a/_articles/hosting/install-on-premise.md b/_articles/hosting/install-on-premise.md new file mode 100644 index 00000000..0b1ed833 --- /dev/null +++ b/_articles/hosting/install-on-premise.md @@ -0,0 +1,165 @@ +--- +layout: article +title: Installing and deploying +categories: [hosting] +featured: false +popular: false +hidden: true +tags: [hosting, docker, install, deploy] +--- + +## Configure Your Domain + +bitwarden will be served through ports 80 (http) and 443 (https) on the localhost machine. You should open these ports so that bitwarden can be accessed from within and/or outside of the network. + +It you are serving bitwarden to the outside world you will need to configure a domain name with DNS records that point to your host machine (ex. bitwarden.company.com). You should configure this domain before beginning your bitwarden installation. + +## Install Docker + +bitwarden will be deployed and ran on your machine using an array of [Docker](https://www.docker.com/what-docker){:target="_blank"} containers. bitwarden will work equally well with Docker Community (free) and Enterprise editions. You should evaluate which edition is best for your installation. Additionally, deployment of these containers is orchestrated through the use of [Docker Compose](https://docs.docker.com/compose/){:target="_blank"}. Docker and Docker Compose must first be installed on your machine before beginning a bitwarden installation. + +See the following official Docker documentation for more information: + +- [Install Docker](https://docs.docker.com/engine/installation/){:target="_blank"} +- [Install Docker Compose](https://docs.docker.com/compose/install/){:target="_blank"} + +{% note %} +Some Docker installations such as Windows and macOS already come with Docker Compose installed. +{% endnote %} + +For reference, you can find the official bitwarden images hosted on Docker Hub at [https://hub.docker.com/u/bitwarden/](https://hub.docker.com/u/bitwarden/){:target="_blank"}. + +## Adjust Docker Resources + +SQL Server requires that Docker be allocated with 4 GB of RAM. By default, Docker on macOS and Windows only has 2 GB of RAM allocated. Docker on Linux should be ok. + +To adjust this, simply go to Docker (click on the docker icon) → Preferences → Advanced. Change the slider to 4 GB or more, save, and restart Docker. + +You can read more about this at [https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker](https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker){:target="_blank"}. + +## Install bitwarden + +We've made installing bitwarden very simple. Depending in your environment (non-Windows vs. Windows) we provide Bash (Linux and macOS) and PowerShell (Windows) scripts to aide in installing and managing your bitwarden installation. The following steps will include references for both Bash and PowerShell. + +1. Download the main bitwarden script to your machine in the desired location: + + {% note %}All bitwarden assets will be installed in the `./bitwarden` directory relative to where the main script resides.{% endnote %} + + Bash + + curl -s -o bitwarden.sh \ + https://raw.githubusercontent.com/bitwarden/core/master/scripts/bitwarden.sh \ + && sudo chmod u+x bitwarden.sh + + PowerShell + + Invoke-RestMethod -OutFile bitwarden.ps1 ` + -Uri https://raw.githubusercontent.com/bitwarden/core/master/scripts/bitwarden.ps1 + +2. Start the installer: + + Bash + + ./bitwarden.sh install + + PowerShell + + .\bitwarden.ps1 -install + +3. Complete the prompts in the installer. + + **SSL Certificate** + + - bitwarden can generate a maintain renewal of a trusted SSL certificate for your domain for completely free provided by [Let's Encrypt](https://letsencrypt.org){:target="_blank"} and [Certbot](https://certbot.eff.org){:target="_blank"}. Certificate renewal checks occur each time bitwarden is restarted. + + - If you already have your own SSL certificate you can place the following files in the `./bitwarden/ssl/your.domain.com` directory: + - certificate.crt (required) + - private.key (required) + - ca.crt (optional, if trusted) + - dhparam.pem (optional, if using Diffie Hellman ephemeral parameters) + + - If you are only testing, you can choose to generate a self-signed certificate for your installation. + + {% warning %}It is not recommended to use bitwarden without a SSL certificate. You should at least use a self-signed certificate.{% endwarning %} + + **Installation Id/Key** + + Each bitwarden installation requires a unique installation id and installation key. You should not share your installation id or installation key across multiple bitwarden installations. They should be treated as secrets. + + You can obtain an installation id and key from [https://bitwarden.com/install](https://bitwarden.com/install){:target="_blank"}. + + **Push Notifications** + + If you would like to take advantage of having push notifications automatically keep your bitwarden client applications synced in real time you can choose to use the bitwarden push notification relay service. This relay service is provided by external bitwarden servers. You should ensure that your machine can communicate with the `https://push.bitwarden.com` endpoint. Your bitwarden installation will POST **non-sensitive data** (reference ids) to the relay service which will then notify the bitwarden client applications to "phone home" for an update back to your installation. + + The use of the push notification relay service is optional. If you do not use this service you will need to keep your client applications in sync manually. + +## Post-install Environment Configuration + +Some features such as a SMTP mail server and YubiKey OTP API credentials are not configured by the installer. You can find the environment file for these settings (and all others) in the following location: `./bitwarden/env/global.override.env`. Edit this file and REPLACE the placeholders values for them. + +``` +globalSettings__yubico__clientId=REPLACE +globalSettings__yubico__key=REPLACE +globalSettings__mail__smtp__host=REPLACE +globalSettings__mail__smtp__username=REPLACE +globalSettings__mail__smtp__password=REPLACE +globalSettings__mail__smtp__ssl=true +globalSettings__mail__smtp__port=587 +``` + +You can get a YubiKey client id and key at [https://upgrade.yubico.com/getapikey/](https://upgrade.yubico.com/getapikey/){:target="_blank"}. + +## Deploy bitwarden + +Once you've completed installing and configuring your bitwarden installation you can start it up: + +{% note %} +The first time you start bitwarden it may take some time as it downloads all of the images from Docker Hub. +{% endnote %} + +Bash + + ./bitwarden.sh start + +PowerShell + + .\bitwarden.ps1 -start + +You can then verify that all containers are up and running correctly: + + docker ps + +{% image hosting/docker-ps.png %} + +Finally, you need to initialize and update the bitwarden database: + +Bash + + ./bitwarden.sh updatedb + +PowerShell + + .\bitwarden.ps1 -updatedb + +Congratulations! bitwarden is now up and running at `https://your.domain.com`. Visit the web vault in your web browser to confirm. You should register a new account and log in. + +## Main Script Commands + +The bitwarden main script (`bitwarden.sh` or `bitwarden.ps1`) has the following commands available: + +{% note %} +PowerShell users will run the commands with a prefixed `-`. For example `.\bitwarden.ps1 -start`. +{% endnote %} + +{% table %} +| Command | Description | +|------------|-----------------------------------------| +| install | Start the installer. | +| start | Start all containers. | +| restart | Restart all containers (same as start). | +| stop | Stop all containers. | +| updatedb | Update the database. | +| update | Update all containers and the database. | +| updateself | Update this main script. | +{% endtable %} diff --git a/_articles/hosting/licensing-on-premise.md b/_articles/hosting/licensing-on-premise.md new file mode 100644 index 00000000..ba9e03a8 --- /dev/null +++ b/_articles/hosting/licensing-on-premise.md @@ -0,0 +1,11 @@ +--- +layout: article +title: Licensing for paid features +categories: [hosting] +featured: false +popular: false +hidden: true +tags: [hosting, licensing] +--- + + diff --git a/_articles/hosting/what-platforms-are-supported.md b/_articles/hosting/what-hosted-platforms-are-supported.md similarity index 76% rename from _articles/hosting/what-platforms-are-supported.md rename to _articles/hosting/what-hosted-platforms-are-supported.md index 09c6114e..b2da17bf 100644 --- a/_articles/hosting/what-platforms-are-supported.md +++ b/_articles/hosting/what-hosted-platforms-are-supported.md @@ -4,9 +4,10 @@ title: What platforms can I host on? categories: [hosting] featured: false popular: false -tags: [platforms, hosting] +hidden: true +tags: [platforms, hosting, docker] --- -Bitwarden is a cross-platform application that is deployed using Docker Linux containers. This means that bitwarden can be hosted on Linux, macOS, and Windows machines. +bitwarden is a cross-platform application that is deployed using Docker Linux containers. This means that bitwarden can be hosted on Linux, macOS, and Windows machines. You can read more about Docker and container technologies at [https://www.docker.com/what-docker](https://www.docker.com/what-docker){:target="_blank"}. diff --git a/_categories/hosting.md b/_categories/hosting.md index 0fa22cd4..63793e4c 100644 --- a/_categories/hosting.md +++ b/_categories/hosting.md @@ -2,4 +2,5 @@ layout: category title: On-premise Hosting featured: true +hidden: true --- diff --git a/images/hosting/docker-ps.png b/images/hosting/docker-ps.png new file mode 100644 index 00000000..a11d9d31 Binary files /dev/null and b/images/hosting/docker-ps.png differ diff --git a/index.html b/index.html index 8ed79e3d..d3ae64b9 100644 --- a/index.html +++ b/index.html @@ -25,6 +25,7 @@ title: Help Center {% for category in site.categories %} + {% if category.hidden != true %}