访问你的 HeyForm 实例
- 打开浏览器,访问:
http://<Server_IP> - 通过注册页面创建你的第一个账户。
管理注册功能(安全提示)
注册功能默认开启。
要禁止新用户注册:
- Edit the
.envfile:APP_DISABLE_REGISTRATION=true - Apply changes:
docker compose -f /root/heyform/docker-compose.yml up -d
这可以防止未经授权的用户创建账户。
重要文件与目录
- Application directory:
/root/heyform - Docker 环境配置文件:
/root/heyform/.env - Docker Compose 文件:
/root/heyform/docker-compose.yml - 已上传的表单图片:
/root/heyform/assets/ - MongoDB 数据卷:
mongodb_datastored under/var/lib/docker/volumes/ - KeyDB 数据卷:
keydbstored under/var/lib/docker/volumes/ - Nginx 反向代理配置:
/etc/nginx/sites-available/heyform.conf
域名与 SSL 配置
将你的域名指向服务器 IP。
编辑 Nginx 配置:
vim /etc/nginx/sites-available/heyform.conf
Replace server_name <IP>; with server_name <your-domain>;
Install Certbot:
apt install -y certbot python3-certbot-nginx
运行 Certbot 签发 SSL 证书:
certbot --nginx --non-interactive --agree-tos --email <your-email> -d <your-domain>
测试并重载 Nginx:
sudo nginx -t
sudo systemctl reload nginx
Open in browser: https://<your-domain>