The setup guide is currently in work-in-progress mode and may update without notice. Controbutions are welcome!
- Official GitHub CLI: https://github.com/cli/cli/blob/trunk/docs/install_linux.md (requires Android 7+ and latest Termux app version from F-droid)
- The CLI tooling for your PaaS service of choice.
- Divio CLI:
python3 -m pip install --user divio-cli
- Railway CLI:
npm i -g @railway/cli
orsudo sh -c "$(curl -sSL https://raw.githubusercontent.com/railwayapp/cli/master/install.sh)"
(to install globally if Node.js and NPM isn't installed for Linux/macOS)
- Divio CLI:
You need Git, Python3 (for divio-cli
package), OpenSSL (for Termux Android app users,
the openssl-tool
APT package is also required) and OpenSSH installed on the machine.
-
- If the official GitHub CLI is ibstalled, you can fork from the command line with
gh repo fork ajhalili2006/vaultwarden-on-paas-helpers --clone
.
- If the official GitHub CLI is ibstalled, you can fork from the command line with
-
Clone your fork into your machine with
git clone https://github.com/YOUR-USERNAME/bitwarden-on-paas-helpers.git
. (Only proceed if--clone
isn't passed)- To also configure the upstream remote for official GH CLI users, do
gh repo clone YOUR-USERNAME/vaultwarden-on-paas-helpers
.
- To also configure the upstream remote for official GH CLI users, do
-
Login to Divio Control Panel then copy your API token in the Access Token page.
- To fetch/pull/push to and from the Git repo or access the server through SSH, you need to add your SSH key to your account. Read this guide on how to add your SSH keys.
-
Create a new project. When prompted to choose an subscription, leave the defaults and hit Save.
-
Go back to your terminal window and do
divio login [PASTE-YOUR-ACCESS-KEY-HERE]
-
Navigate into your local copy of your fork with
cd vaultwarden-on-paas-helpers
(may depends on how you clone and where). -
Run
divio project configure
, pressy
then hit Enter. Then type your new project's slug and hit Enter. You may notice some text simliar to these below after hitting Enter. Now, copy your Git remote and rungit remote add divio [YOUR-DIVIO-GIT-REMOTE-HERE]
.
$ divio project configure
# This action will overwrite the local Divio configuration file for your project or create a new one. Do you want to continue? [y/N]: y
# Please enter the application slug of the local project: bitwardenrs-thepinsteam
# Configuration file: /data/data/com.termux/files/home/bitwardenrs_heroku/.divio/config.json
# Git remote: git@git.divio.com:bitwardenrs-thepinsteam.git
-
Run the
tools/setup-vaultwarden-instance
script withdivio
argument.- You may prompted to re-enter your Divio API key because it doesn't rely on the
~/.netrc
file on your drive for security reasons. - This might take some while because the script is actively interacting with the API.
- Once the provisioning of the Postgrrs database is completed, follow the prompts to complete the setup.
- You may prompted to re-enter your Divio API key because it doesn't rely on the
-
Upon reaching this message below, run the
tools/push2divio
to push to its Git repository and deploy.
==========================================================
The setup was completed successfully. To finish the
deployment and to access the Bitwarden Web Vault,
run the following command to deploy to Divio:
$ ./tools/push2divio
This will force-push into your project's Git repository
and then run `divio project deploy`.
If you ever need to update your Vaultwarden instance, run
the following command to issue an image rebuild:
$ ./tools/update-instance divio
By the way, you should pratice manually backing up your
Postgres database to ensure your data is safe, even during
an instance upgrade. Enjoy your new Vaultwarden instance!
==========================================================
- Congrats! You successfully deployed an BitwardenRS instance on Divio. Now navigate to https://your-project.us.aldyrn.io and create a account.
WORK IN PROGRESS
- Fire up the deployment page by pressing the button below.
-
Fill up the required missing fields. Don't forget to set
MAKE_IT_FAIL
to any value so the startup script will fail artifically instead of complaining about missing required configuration such as SMTP settings and domain name on your runtime logs. -
Open your terminal and clone your hard-forked repo with
gh repo clone YOUR-USERNAME/vaultwarden-on-paas-helpers
(if GitHub CLI is not installed trygit clone git@github.com:YOUR-USERNAME/vaultwarden-on-paas-helpers.git
. -
Navigate into your local copy of your fork with
cd vaultwarden-on-paas-helpers
(may depends on how you clone and where). -
Run
./tools/setup-vaultwarden-instance railway
to install the CLI and connect your local repo to the newly-created project, among other things.- The script will set
MAKE_IT_FAIL
tofalse
after completing the setup wizard.
- The script will set
- Can't install Railway CLI on Termux?
- Railway CLI is currently only work on Linux, macOS and Windows. Probably try following the setup guide on an cloud dev environment like Gitpod.