Installation for a noob

hello guys, is there a written guide how to properly install this on a vps with ubuntu 22 lts or debian 11, i have followed some google guides but cant get it to work…
thanks

Personally I just used the Wiki to go through basic understand of how things work as well as getting a decent understanding of the way the official Bitwarden server works from their support page.

Then mostly going through and testing, getting stuck and going to the wiki or Google to figure out a specific issue as it arises.
Really though there are several methods to manage Vaultwarden.
Probably the easiest is to use docker-compose, or possibly some nice GUI such as portainer (though that would also involve installing another service, making the process slightly more involved and adding more learning) to easily manage the service and make changes as needed.

I’d be happy to try and answer questions though and provide examples if needed, though as mentioned there are several ways you can go about setting it up and it really comes down to each use case.

and still not able to get it properly installed… anyone else who can help plz. thanks

I assume you have already an access via SSH to your Ubuntu Server 22 instance with sudo access. Log in and try this:

#Update software list and install upgrades
sudo apt update && sudo apt upgrade -y
#Install required software that is required by Docker
sudo apt install apt-transport-https ca-certificates curl software-properties-common
#Download GPG keys and add it to the system keyring
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
#Download Docker for your Ubuntu version
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#Update packages list
sudo apt update
#To install a specific version of Docker Engine - Community, list the available versions in the repo, then select and install
apt-cache policy docker-ce
#Finally install the Docker
sudo apt install docker-ce

#Allow to manage Docker as a non-root user
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

#Test if you can run docker container without sudo
docker run hello-world
#Display all containers, -a to see even currently non active
docker ps -a
#Delete our test hellow world container
docker rm blissful_khorana
#See Docker version
docker -v

#Update software list and install upgrades
sudo apt update && sudo apt upgrade -y

#Prepare catalog for Vaultwarden Docker volume
cd /srv/
sudo mkdir vaultwarden
#Set permissions
sudo chown $USER:$USER vaultwarden/
#Generate ADMIN_TOKEN string and replace it with XXXXXXXXX later
rc=1; while [[ $rc -ne 0 ]]; do openssl rand -base64 32 |grep -ie '^Qa';rc=$?; done
#Download and launch Vaultwarden, bind container to all network interfaces. Port 3012 is for a websocket, 80 for HTTP. We will configure HTTPS later.
docker run -d --name vaultwarden -v /srv/vaultwarden:/data -e WEBSOCKET_ENABLED=true -e ADMIN_TOKEN='XXXXXXXXX' -p 0.0.0.0:3012:3012 -p 0.0.0.0:80:80 --restart always vaultwarden/server:latest

If you succeed with that first step, later I can show you how to deploy reverse proxy as a second step which will be mandatory to login first time with your admin token as an administrator.

1 Like

thanks for the reply, i decided to got with debian, but the guide you are providing is using docker, is there any way of doing it without docker? thanks for the reply.

Code above requires few changes for Debian. Use it only for Ubuntu. There are currently no better way than using a Docker container for that purpose. What is your reason for not using Docker actually?
However if you insist, here is a short tutorial how to deploy Vaultwarden on Debian 11 without Docker.

ok, after trying others passbolt, i decide to install vaultwarden using docker…
@CyberWarden can i pm if have questions? thanks

No. The purpose of me spending time here is to provide solutions publicly. Please create new topics eventually, so everybody here can learn from it and solve their issues too.

Hello, i need help for proxy, i try, but don´t work.