This article was completed in
3
mid-month, and the reverse proxy still adoptsfrp + npm
the scheme. Because it has not been filed, it needs to bring a port when accessing;
What is HumHub?
HumHub
is an open source social networking platform with various use cases such as a social intranet, community or collaboration platform.HumHub
Consists of a core application that can be extended with additional modules and tuned to your needs with many configuration options.
HumHub
Worth a try if you're looking for a solid, customizable social networking software
Install
environment variable
docker
Environment variables related to
variable | default value | describe |
---|---|---|
MYSQL_ROOT_PASSWORD |
none | administrator password |
MYSQL_DATABASE |
none | database name |
MYSQL_USER |
none | database user |
MYSQL_PASSWORD |
none | database password |
The above variables are all parameters related to database mirroring, and HumHub
the description of the official document has not been found.
docker cli install
If you are familiar with the command line, it may be docker cli
faster to use
When installing below
mriedmann/humhub
latest
The version number corresponding to the version of the mirror image is1.13.0
; when this article was published, it was1.13.2
;- Lao Su did not expose the database port;
# 新建文件夹 humhub 和 子目录
mkdir -p /volume2/docker/humhub/{
config,data,modules,uploads/profile_image}
# 进入 humhub 目录
cd /volume2/docker/humhub
# 运行 MariaDB 容器
docker run -d \
--restart unless-stopped \
--name humhub_db \
-v $(pwd)/data:/var/lib/mysql \
-e "MYSQL_ROOT_PASSWORD=root" \
-e "MYSQL_DATABASE=humhub" \
-e "MYSQL_USER=humhub" \
-e "MYSQL_PASSWORD=humhub" \
mariadb:10.6
# 运行 humhub 容器
docker run -d \
--restart unless-stopped \
--name humhub-web \
--link=humhub_db:db \
-p 8140:80 \
-v $(pwd)/config:/var/www/localhost/htdocs/protected/config \
-v $(pwd)/uploads:/var/www/localhost/htdocs/uploads \
-v $(pwd)/modules:/var/www/localhost/htdocs/protected/modules \
mriedmann/humhub:latest
docker compose install
You can also use docker-compose
the installation, save the following content as docker-compose.yml
a file
version: '3.1'
services:
humhub:
image: mriedmann/humhub:latest
container_name: humhub-web
links:
- "db:db"
ports:
- "8140:80"
volumes:
- ./config:/var/www/localhost/htdocs/protected/config
- ./uploads:/var/www/localhost/htdocs/uploads
- ./modules:/var/www/localhost/htdocs/protected/modules
db:
image: mariadb:10.6
container_name: humhub-db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: humhub
MYSQL_USER: humhub
MYSQL_PASSWORD: humhub
Then execute the following command
# 新建文件夹 humhub 和 子目录
mkdir -p /volume2/docker/humhub/{
config,data,modules,uploads/profile_image}
# 进入 humhub 目录
cd /volume2/docker/humhub
# 将 docker-compose.yml 放入当前目录
# 一键启动
docker-compose up -d
run
Setup Wizard
Type in your browser http://群晖IP:8140
to see the setup wizard. Simplified Chinese is supported by default
In the previous version, it may be reported uploads/profile_image
that there is a directory permission problem in the directory, such as 权限 - Profile Image (Hint: Make /var/www/localhost/htdocs/uploads/profile_image writable for the Webserver/PHP!)
this error; but 1.13.0
it is normal on .
Next comes the database settings
- Host name: because it is used
--link=humhub_db:db
, fill in the aliasdb
; - Port:
MariaDB
The default port is3306
; - Username: must be
MYSQL_USER
consistent with ; - Password: must be
MYSQL_PASSWORD
consistent with ; - Database name: must be
MYSQL_DATABASE
consistent with ;
start initialization
Set platform name
For other configurations, Lao Su chose跳过这一步
set administrator
Lao Su chooses to keep the example, this is to get familiar with it faster
This is all set up
login run
You can register a new account, and Lao Su directly uses the administrator account to log in
After successful login
The software adopts a responsive design, so it can adapt to different screen sizes, and the effect on mobile phones is also good
reverse proxy
Suppose our actual access address is:https://humhub.laosu.ml:444
domain name | LAN address | Remark |
---|---|---|
humhub.laosu.ml |
http://192.168.0.197:8140 |
humhub access address |
npm
settings in
SSL
all ticked
HumHub
After reverse generation, there is a phenomenon of port truncation, so Advanced
the following code needs to be added to
location / {
proxy_set_header Host $host:444;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_pass http://192.168.0.197:8140;
proxy_redirect http:// https://;
}
reference documents
humhub/humhub: HumHub is an Open Source Enterprise Social Network. Easy to install, intuitive to use and extendable with countless freely available modules.
地址:https://github.com/humhub/humhub
HumHub - The flexible Open Source Social Network Kit for Collaboration
地址:https://www.humhub.com/en
About HumHub | HumHub Documentation
address: https://docs.humhub.org/docs/about/humhub
mriedmann/humhub-docker: Alpine-based PHP-FPM and NGINX HumHub docker-container
地址:https://github.com/mriedmann/humhub-docker