Digitally sovereign, open source contact form script hosted on its own sub-domain. Used on my LLC website. Fork of https://github.com/styxlab/ghost-contact-form.git https://github.com/styxlab/ghost-contact-form
  • JavaScript 43.7%
  • HTML 26.5%
  • CSS 21.3%
  • Shell 5.3%
  • Dockerfile 3.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-25 00:59:35 +00:00
assets minor fixes 2020-02-01 18:51:37 +01:00
ghost-admin first drop 2020-02-01 18:40:02 +01:00
.env-example Add .env-example, update .gitignore 2026-08-21 19:31:11 +00:00
.gitignore Add .env-example, update .gitignore 2026-08-21 19:31:11 +00:00
demo.html first drop 2020-02-01 18:40:02 +01:00
docker-compose.yml fixed contact form 2026-08-25 00:59:35 +00:00
Dockerfile Initial commit: contact-form 2026-06-23 20:27:45 +00:00
ghost-contact-svc.js Use subject field from contact form if provided 2026-08-25 00:44:16 +00:00
ghost-contact.service first drop 2020-02-01 18:40:02 +01:00
install.sh first drop 2020-02-01 18:40:02 +01:00
LICENSE Initial commit 2020-02-01 15:47:13 +01:00
README.md added note about original repo no onger being available 2026-08-21 20:13:26 +00:00
README.md.bak spell check passed 2020-02-02 13:41:33 +01:00
test.sh first drop 2020-02-01 18:40:02 +01:00

This is a fork of ghost-contact-form by styxlab — who have since moved to their own self-hosted Forgejo. The original GitHub repo may no longer be maintained. It's used here to power the contact form on tobiaseigen.org.

📖 Setup runboko): Set up a self-hosted contact form on mailcow/nginx

ghost-contact-form

Add a beautiful, fully functional contact form to your Ghost blog or website without paying for external services.

Not running on Ghost? This solution also works with Gatsby, Hugo, Hexo, Nuxt and any other static site generator.

Tutorial

Prerequisites

  • A supported version of Node.js
  • npm to manage packages

Quickstart Install

$ git clone https://github.com/styxlab/ghost-contact-form.git
$ cd ghost-contact-form
$ sh install.sh

Configure

Adapt the .env file to your needs. The following variables must be defined.

SMTP_HOST = mail.server.com
SMTP_USER = user@server.com
SMTP_PASS = strong password
ALLOW_ORIGIN = https://your-blog.com
EMAIL_FROM = noreply@your-blog.com
EMAIL_TO = your@email.com

Additionally, you can add a port variable PORT = , if you want to change the default port 7000 to something else.

Usage

$ node ghost-contact-svc.js

You should see the message Listening on http://localhost:7000.

Test Locally

http://localhost:7000/v1/demo

Deploy (More detailed info in the tutorial)

  • copy the work folder ghost-contact-form to your server
  • use ghost-contact.service as a starting point for running ghost-contact-svc.js as a systemd daemon
  • configure your web-server to map endpoint http://localhost:7000/ to a public endpoint, e.g. https://api.your-blog.com/
  • Use the files in folder ghost-admin to configure your Ghost front-end
  • Other front-end configuration files upon request!