STATIC-HOSTING.md
As an alternative to runnning BenotPDF locally or in a Docker container, you can very easily host it as a set of static web pages. Here are a few examples:
One of simplest ways to host BentoPDF is to create a project at Netlify and create a static deployment. You can accomplish this by first downloading the pre-built distribution file from our GitHub releases. Each release includes a dist-{version}.zip file that contains all necessary files for self-hosting.
dist-{version}.zip fileWhen a new BentoPDF release becomes available, you will need to repeat steps 1-3, then go into "Deploys" and upload the new release.
Alternatively, you can configure a Netlify project to automatically deploy whenever your BentoPDF is updated.
https://[projectname]/netlify.app to view your deployment of BentoPDF.Whenever the BentoPDF source code is updated, you can sync the changes into your repo. This will kick off a new build and deploy within Netlify.
If you want to use BentoPDF's simple mode, go into Deploy Settings, then Environment Variables, and Add a variable. Add SIMPLE_MODE and set it to true. You will need to manually kick a new build to get this to take effect.
Vercel provides similar services to Netlify dynamic hosting.
Whenever the BentoPDF source code is updated, you can sync the changes into your repo. This will kick off a new build and deploy within BentoPDF.
If you want to use BentoPDF's simple mode, go into Project Settings, then Environment Variables, and Create a new variable. Add SIMPLE_MODE and set it to true. You will need to redeploy to get this to take effect.
You can also host your own instance of BentoPDF using GitHub pages. An advantage of this over the other options is you are able to do everything in GitHub without any third party service.
Settings->Pages, and change the 'Source' to 'GitHub Actions'Settings->Secrets and Variables > Actions, then select 'Variables', and add the repository variable BASE_URL. Set the value to /bentopdf. If you've renamed the repo to something other than bentopdf, put that here.Actions in the top menu, and select 'I understand' to enable ActionsWhen the build completes, you can find the website at https://[your-github-username]/bentopdf
If/when you merge changes from the source BentoPDF repository, the build and deploy action will automatically be kicked off and the new version will be automatically deployed to GitHub Pages.
By default, every self-hosted BentoPDF build emits canonical URLs and an
hreflang/x-default set that point back to https://www.bentopdf.com. This
is intentional for two reasons:
You have two clean overrides depending on what you want.
If you operate a public deployment and want it to be the indexed copy for
your audience, set SITE_URL at build time to your origin. The build will
emit canonicals, hreflang, and structured data pointing at your domain.
docker build --build-arg SITE_URL=https://pdf.example.com -t bentopdf-self .
SITE_URL
in your project's environment variables and re-deploy. The build script
reads it during npm run build.Set the runtime environment variable ROBOTS_NOINDEX=true. The container
injects <meta name="robots" content="noindex, follow"> into every served
HTML file at startup. The canonical link still points at the official site
by default, so when crawlers do follow internal links they still see
bentopdf.com as the authoritative source.
docker run -d -p 8080:8080 -e ROBOTS_NOINDEX=true ghcr.io/alam00000/bentopdf:latest
You can combine the two: build with your own SITE_URL and run with
ROBOTS_NOINDEX=true for a private deployment that's neither competing
with bentopdf.com nor advertising itself.
Simple Mode (SIMPLE_MODE=true) controls the UI — it ships a stripped-down
homepage suitable for company intranets and single-purpose deployments. It
does not by itself control whether your instance is indexed by search
engines. A public-facing simple-mode deployment is fully indexable by default,
just like the full-mode build. If you want a simple-mode deployment hidden
from search engines, combine SIMPLE_MODE=true at build time with
ROBOTS_NOINDEX=true at runtime.