[新服务] 在线二步验证器——2FAuth |谷歌验证器(Google Authenticator)替代品
date
Nov 10, 2023
slug
newservice-mfa-2fauth
status
Published
summary
新服务-2fauth
tags
service
type
Post
Summary
- ‣
步骤
set up with docker compose
export DOCKER_PROJ=2fauth
export DOCKER_PROJ_DOMAIN=$DOCKER_PROJ.xxxxxxx.org
mkdir -p /data/$DOCKER_PROJ/data; cd /data/$DOCKER_PROJ
chown 1000:1000 data
chmod 700 data
cat > docker-compose.yml <<EOF
version: "3"
services:
2fauth:
image: 2fauth/2fauth
container_name: 2fauth
volumes:
- ./data:/2fauth
#ports:
#- 8120:8000/tcp
environment:
- APP_NAME=2FAuth
- APP_KEY=SomeRandomStringOf32CharsExactly
- APP_URL=https://$DOCKER_PROJ_DOMAIN
- IS_DEMO_APP=false
- LOG_CHANNEL=daily
- LOG_LEVEL=notice
- DB_DATABASE="/srv/database/database.sqlite"
- CACHE_DRIVER=file
- SESSION_DRIVER=file
- AUTHENTICATION_GUARD=web-guard
networks:
default:
name: npm_nginx_proxy_manager-network
external: true
EOF
docker-compose down; docker-compose up -d; sleep 1s; docker-compose logs -f
# update
docker-compose down
docker image prune
docker-compose pull
docker-compose up -d; sleep 1s; docker-compose logs -f
Nginx Proxy Manager NPM
只需要打开“Websockets Support”即可