I’m trying to install Bitwarden in LXC but I always end up with this error

I’m trying to install Bitwarden in LXC but I always end up with this error.

root@bitwarden:~# bash bitwarden.sh install
 _     _ _                         _            
| |__ (_) |___      ____ _ _ __ __| | ___ _ __  
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \ 
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

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

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

bitwarden.sh version 2022.12.0
Docker version 20.10.5+dfsg1, build 55c4c88
docker-compose version 1.25.0, build unknown

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

(!) 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): 

2022.12.0: Pulling from bitwarden/setup
025c56f98b67: Pull complete 
6afacb7d1b96: Pull complete 
f960150eb0dd: Pull complete 
e872d1dca3eb: Pull complete 
af3ffbb2228b: Pull complete 
d8ae17d77145: Pull complete 
a701558804da: Pull complete 
6e527c9ec8da: Pull complete 
97e86156d896: Pull complete 
b8caea07e199: Pull complete 
Digest: sha256:7b6bf8394c3ea3c70702fd9803a0135f3a8625df4b9fe0a6f2443386e6e7307e
Status: Downloaded newer image for bitwarden/setup:2022.12.0
docker.io/bitwarden/setup:2022.12.0
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown.

LXC conf

arch: amd64
cores: 2
features: keyctl=1,nesting=1
hostname: bitwarden
memory: 2048
net0: name=eth0,bridge=vmbr1,hwaddr=C6:A9:46:C4:25:D1,ip=dhcp,type=veth
ostype: debian
rootfs: local-zfs:subvol-109-disk-0,size=8G
swap: 1024
unprivileged: 1

Hi @gusto,

I know I’ve personally ran into some issues when I attempted to install docker in an LXC container on my home server.
While I didn’t end up attempting to install Bitwarden in the LXC it could very well be a similar issue. I found this guide below on how to install portainer in a Proxmox LXC, which may help to assist you.

Presumably much of the steps will be the same to first install the docker engine and then enable docker in the LXC.

sudo apt-get install docker-ce docker-ce-cli containerd.io

And

sudo apt install docker.io
sudo systemctl enable docker
sudo systemctl start docker
sudo systemctl status docker

I would try these first and see if you can get docker to run inside of the LXC first before attempting to run the install script. Then let us know how that goes


I also note that your config is set to the minimum requirements, you may also wish to up this to the recommend 4GB for self-hosting on the standard install.

Hope this helps :slightly_smiling_face:

I have installed LXC Debian 11 with LAMP for a long time.
LXC configuration (see first post).
Now I want to add Bitwarden. My procedure is the same as on this website.

sudo apt update && sudo apt upgrade -y
sudo apt install curl -y
sudo apt install apt-transport-https ca-certificates gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

sudo apt update
sudo apt install docker-ce
sudo apt install docker-compose

sudo usermod -aG docker $USER

curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh
sudo chmod 700 bitwarden.sh
sudo systemctl start docker.service

sudo bash bitwarden.sh install

I run the script, enter the domain name, ssl no and then I get an error (see the first post)

when I check docker, it’s running

sudo systemctl status docker.service