Install Heyform on Ubuntu 24.04
Install docker
$mkdir heyform
$nano docker-compose.yml
networks:
keydb:
mongo:
services:
heyform:
image: heyform/community-edition:latest
restart: always
volumes:
# Persist uploaded images
- ./assets:/app/static/upload
depends_on:
- mongo
- keydb
ports:
- '9513:8000'
environment:
APP_HOMEPAGE_URL: https://[your domain]
SESSION_KEY: key1
FORM_ENCRYPTION_KEY: key2
MONGO_URI: 'mongodb://mongo:27017/heyform'
REDIS_HOST: keydb
REDIS_PORT: 6379
mongo:
image: percona/percona-server-mongodb:4.4
restart: always
volumes:
# Persist MongoDB data
- mongodb_data:/data/db
keydb:
image: eqalpha/keydb:latest
restart: always
command: keydb-server --appendonly yes --protected-mode no
volumes:
# Persist KeyDB data
- keydb:/data
volumes:
mongodb_data:
keydb:
$docker compose up -d
Reverse proxy and let's encrypt
# Nginx config
# To deploy to a public server, you will also need to configure nginx for reverse proxying the NodeJs program
server {
listen 80;
server_name [your domain];
location / {
proxy_pass http://localhost:9513;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
}
}
Create account
Disable user registration
$nano docker-compose.yml
Add
APP_DISABLE_REGISTRATION: true
Add Unsplash
UNSPLASH_CLIENT_ID: [your unsplash client ID]