Remark42 with Docker Compose
Remark42 is a self-hosted comment engine that needs no database. Comments go into a file-based BoltDB store under /srv/var, so one container and one persistent volume is the whole stack. Two settings are mandatory: SITE, the site id you also put in the embed snippet, and REMARK_URL, the public URL of the server.
Before using the one-click template, here is a minimal Docker Compose example for running Remark42 locally or on your own server.
If you're new to Docker Compose, check out our guide on how to self-host a Docker Compose app. You can also browse more examples in our Docker Compose library.
Self-host Remark42 with Docker Compose (minimal)
services:
remark42:
image: ghcr.io/umputun/remark42:latest
ports:
- "8080:8080"
environment:
SITE: mysite
REMARK_URL: http://localhost:8080
SECRET: changeme
volumes:
- remark-data:/srv/var
volumes:
remark-data:
Deploy Remark42 on Hostim.dev (one-click)
Remark42 is a lightweight, self-hosted comment system and Disqus alternative with OAuth login, spam protection, and a minimalist UI.
💬 Self-host your comments. Privacy-first. Zero tracking.
Guest project runs for 1 hour. Log in to save and extend to 5 days.
Why Host Remark42 on Hostim.dev?
- One-click Docker deployment
- Persistent storage included
- HTTPS and free domain
- OAuth-ready (GitHub, Google, Facebook, etc.)
- Live logs and metrics
What's included
| Resource | Details |
|---|---|
| App | ghcr.io/umputun/remark42:latest |
| Volume | /srv/var |
| Domain | Free *.hostim.dev |
| SSL | Auto-enabled |
| Port | 8080 |
| Config | Anonymous auth enabled by default |
How to Deploy
- Go to your Hostim.dev dashboard.
- Create Project → Use a Template.
- Select Remark42.
- Choose a plan.
- Deploy.
Frequently asked questions
Does Remark42 require a database?
No. Remark42 stores comments in an embedded file-based BoltDB under /srv/var, so there is no PostgreSQL, MySQL or Redis to run. One container and one persistent volume is the complete deployment.
What is the minimum Remark42 configuration?
Two environment variables: SITE, the site identifier, and REMARK_URL, the full public URL the server is reachable at, such as https://comments.example.com. Without a correct REMARK_URL the widget loads but authentication and comment posting fail.
Where does Remark42 store comments?
In /srv/var inside the container, which must be a persistent volume. That directory holds the BoltDB files for every site id, the avatars and the backups, so it is the only path that has to survive a redeploy.
How do I enable OAuth login in Remark42?
Add the client id and secret for each provider as environment variables, for example AUTH_GITHUB_CID and AUTH_GITHUB_CSEC for GitHub, AUTH_GOOGLE_CID and AUTH_GOOGLE_CSEC for Google. The callback URL to register with the provider is REMARK_URL followed by /auth/<provider>/callback.
How do I embed Remark42 on a website?
Add a remark_config script block setting host to the Remark42 URL and site_id to the same value as the SITE variable, an empty div with id remark42, and the loader script. The full snippet is in the Website Integration Snippet section on this page.
Why is the Remark42 widget not loading?
The site_id in the embed snippet must match the SITE environment variable exactly, and host must match REMARK_URL including the scheme. A mismatch in either leaves the container healthy while the widget stays blank, which is the most common cause.
How do I back up Remark42?
Back up the whole /srv/var directory. Remark42 also writes daily backups of each site into /srv/var/backup, but those live on the same volume, so they are not a substitute for copying the volume off the server.
How do I update Remark42?
Run docker compose pull and then docker compose up -d to move to the newest umputun/remark42 image. On Hostim, redeploy the app. Comments live in the /srv/var volume and survive the update.
Additional Notes
Add SITE Variable
Add SITE=your-site-id under Environment Variables.
OAuth Setup (Optional)
Add:
AUTH_GITHUB_CIDAUTH_GITHUB_CSEC- or other provider vars
Website Integration Snippet
<script>
var remark_config = {
host: "https://your-remark42-domain.hostim.dev",
site_id: "your-site-id",
components: ["embed"],
theme: "light",
};
</script>
<div id="remark42"></div>
<script>
!(function (e, n) {
for (var o = 0; o < e.length; o++) {
var r = n.createElement("script"),
c = ".js",
d = n.head || n.body;
"noModule" in r ? ((r.type = "module"), (c = ".mjs")) : (r.async = !0),
(r.defer = !0),
(r.src = remark_config.host + "/web/" + e[o] + c),
d.appendChild(r);
}
})(remark_config.components || ["embed"], document);
</script>
Source + Docs
- GitHub: https://github.com/umputun/remark42
- Docs: https://remark42.com/docs/getting-started/installation/
Looking for something else? Browse all templates →