Changing the image #1959

Closed
opened 2025-10-09 17:39:03 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @ITHanke on GitHub.

Hi Guys,

I need some help with the docker image. Some options i want is to have:

  • Disable registration of new users
  • Enabling YubiKey OTP authentication

But where and when i put these command? At getting the docker file? Or in the bash of the docker image what is running?

Originally created by @ITHanke on GitHub. Hi Guys, I need some help with the docker image. Some options i want is to have: - Disable registration of new users - Enabling YubiKey OTP authentication But where and when i put these command? At getting the docker file? Or in the bash of the docker image what is running?
Author
Owner

@Brice187 commented on GitHub:

Or you can use docker-compose.yml to set environment vars:

version: '2'

services:
  bitwarden:
    image: bitwardenrs/server:latest
    restart: always
    environment:
      - SIGNUPS_ALLOWED=false
      - ADMIN_TOKEN=PLEASEUSEASTRONGTOKEN
      - DOMAIN=https://passwords.example.com
    volumes:
      - ./data/:/data/
    networks:
      frontend:
    labels:
      - "traefik.backend=bitwarden"
      - "traefik.docker.network=traefik_frontend"
      - "traefik.enable=true"
      - "traefik.port=80"
      - "traefik.frontend.rule=Host:passwords.example.com"
      - "traefik.frontend.headers.contentSecurityPolicy=default-src 'self'; script-src 'self'; style-src 'self' ; object-src 'none'; frame-ancestors 'self'; form-action 'none'; base-uri 'self'"

networks:
  frontend:
    external:
      name: traefik_frontend
@Brice187 commented on GitHub: Or you can use docker-compose.yml to set environment vars: ``` version: '2' services: bitwarden: image: bitwardenrs/server:latest restart: always environment: - SIGNUPS_ALLOWED=false - ADMIN_TOKEN=PLEASEUSEASTRONGTOKEN - DOMAIN=https://passwords.example.com volumes: - ./data/:/data/ networks: frontend: labels: - "traefik.backend=bitwarden" - "traefik.docker.network=traefik_frontend" - "traefik.enable=true" - "traefik.port=80" - "traefik.frontend.rule=Host:passwords.example.com" - "traefik.frontend.headers.contentSecurityPolicy=default-src 'self'; script-src 'self'; style-src 'self' ; object-src 'none'; frame-ancestors 'self'; form-action 'none'; base-uri 'self'" networks: frontend: external: name: traefik_frontend ```
Author
Owner

@fbartels commented on GitHub:

A lot of the configuration is done through environment variables. The available options are documented at https://github.com/dani-garcia/bitwarden_rs/blob/master/.env.template

@fbartels commented on GitHub: A lot of the configuration is done through environment variables. The available options are documented at https://github.com/dani-garcia/bitwarden_rs/blob/master/.env.template
Author
Owner

@mprasil commented on GitHub:

I think this was answered, so closing the issue, but feel free to reopen if you need more help.

@mprasil commented on GitHub: I think this was answered, so closing the issue, but feel free to reopen if you need more help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1959