Journal indexDockup / field note
Note / self-host-docuseal

How to Self-Host DocuSeal in 2026: Signing Links, SMTP and Audit Data

Self-host DocuSeal with correct ports, persistent storage, HTTPS, secrets, backups and upgrade checks. Learn how to fix when email links point to localhost.

Most DocuSeal installation notes end at the first page load. That is too early: email links point to localhost or proxy headers make secure cookies fail. A useful production test is more demanding — upload a template, place fields, send a signing request, complete it and download both the signed document and audit information.

DocuSeal's role is straightforward: document signing with an auditable signing trail. Its operational boundary includes more than the web process, so the dependency, stored state and public route all have to be named explicitly before real data arrives.

The production shape of DocuSeal

Draw three boundaries around DocuSeal: ingress to port 3000, durable state and supporting requirements. The container is replaceable, but the other two need explicit owners. The network contract for DocuSeal is SMTP plus durable database and file storage. Keep private endpoints on internal DNS, permit only required outbound calls and give DocuSeal a scoped service credential.

The diagram is complete when a clean client can upload a template, place fields, send a signing request, complete it and download both the signed document and audit information. Capture timing and resource data for document storage, PDF processing, mail delivery, concurrent signers and database transactions. If the transaction fails, the first boundary that does not behave as documented identifies whether to investigate routing, local capacity or a supporting service.

Design the DocuSeal restore before launch

Protect DocuSeal's state before optimizing its container. The required set is database, signed files, templates and audit events. Mount /data before bootstrap, write harmless sample data and replace the container to prove that path is actually persistent. If multiple stores must agree, document the order in which writes are paused and backups are taken.

Keep copies outside the deployment server and encrypt material containing credentials or private content. Recovery succeeds when templates, submissions, signed files and audit events return and a completed submission remains verifiable. The distinction between a persistent mount and an independent copy is covered in persistent storage and snapshots.

Close temporary setup access

Threat-model the action DocuSeal performs, not just its login form. Here the high-risk mistake is changing SECRET_KEY_BASE or treating a file copy as a complete audit backup. Implement this boundary: limit template administration, protect signer data and set the external HTTPS host before sending links.

Generate SECRET_KEY_BASE once, keep it out of Git and preserve it with the recovery manifest because changing it can invalidate encrypted or signed application state. Do not solve a permission error by running the container as root or mounting the host broadly. Resource limits also belong to the security design when document storage, PDF processing, mail delivery, concurrent signers and database transactions can be triggered by users.

Record a known-good DocuSeal deployment

Convert the DocuSeal smoke test into a repeatable release command or short runbook. Its output must demonstrate this outcome: upload a template, place fields, send a signing request, complete it and download both the signed document and audit information. Record the application version, container digest, route hostname and test-data identifier with the result.

Run the same check after a routine container swap and after restoring database, signed files, templates and audit events elsewhere. The restore has succeeded when templates, submissions, signed files and audit events return and a completed submission remains verifiable. Compare timing and consumption related to document storage, PDF processing, mail delivery, concurrent signers and database transactions; a large change is worth investigation even when the final action still passes.

Then exercise a safe failure: temporarily deny the test identity access to SMTP plus durable database and file storage. Confirm that DocuSeal surfaces the fault and returns to normal without destructive manual edits. Preserve only the necessary, redacted log excerpt. This four-part gate covers startup, persistence, recovery and failure handling.

A Docker baseline for DocuSeal

Start DocuSeal in a way that leaves the route private until bootstrap is complete.

docker run -d \
  --name docuseal \
  --restart unless-stopped \
  -p 127.0.0.1:3000:3000 \
  -v docuseal-data:/data \
  -e SECRET_KEY_BASE=replace-with-a-long-random-value \
  docuseal/docuseal:latest

If the process loops, compare the image's expected user with the owner of each mounted path. If it stays up, test port 3000 locally and then move directly to the workflow: upload a template, place fields, send a signing request, complete it and download both the signed document and audit information. Version-pin the image only after that end-to-end check passes, and record the exact configuration beside the service.

Prevent proxy success from masking application failure

Treat the external DocuSeal URL as configuration that survives redeploys. First set the application host and HTTPS settings before sending signing links; then route the hostname to port 3000 with the original host and scheme intact.

The deployment reachability checklist can prove that requests enter the container. After that point, the known failure — email links point to localhost or proxy headers make secure cookies fail — should be investigated in DocuSeal, its state or its workload rather than in certificate automation.

Rehearse the risky DocuSeal change

A green container is necessary but not sufficient. The service-level indicator is successful completion of “upload a template, place fields, send a signing request, complete it and download both the signed document and audit information”, while the likely pressure signals are document storage, PDF processing, mail delivery, concurrent signers and database transactions.

Change control matters because database migrations and SECRET_KEY_BASE continuity must be tested because signed files alone do not reconstruct the audit trail. Preserve the old image, test migrations on copied state and document whether rollback is supported after the schema moves. If email links point to localhost or proxy headers make secure cookies fail, diagnose the first boundary that differs from the working environment.

Attach DocuSeal to Dockup's lifecycle

The platform layer for DocuSeal consists of port 3000, ingress, TLS, runtime configuration, storage and dependency reachability. Dockup can reproduce those pieces for its own infrastructure or a server the customer connects.

Then the operator finishes the product layer: set the application host and HTTPS settings before sending signing links; enforce this access rule — limit template administration, protect signer data and set the external HTTPS host before sending links; and run “upload a template, place fields, send a signing request, complete it and download both the signed document and audit information”. Recording that test alongside the deployment avoids confusing automated provisioning with application readiness.

Frequently asked questions

What does DocuSeal need for a production deployment?

Route the DocuSeal container on port 3000 through one HTTPS origin. The supporting network requirement is SMTP plus durable database and file storage. Do not call DocuSeal ready until you can upload a template, place fields, send a signing request, complete it and download both the signed document and audit information.

Which DocuSeal data belongs in a backup?

Persist /data and include database, signed files, templates and audit events in the same recovery manifest. A clean DocuSeal restore passes only when templates, submissions, signed files and audit events return and a completed submission remains verifiable.

Does DocuSeal require HTTPS behind a reverse proxy?

Use HTTPS for the public DocuSeal origin and keep port 3000 on the internal route. Apply the DocuSeal setting correctly: set the application host and HTTPS settings before sending signing links. For DocuSeal, HTTPS protects credentials or user content in transit and keeps origin-sensitive client behavior consistent.

How should a DocuSeal upgrade be tested?

Restore current DocuSeal state into an isolated deployment, apply the candidate version and repeat its acceptance transaction. Pay particular attention because database migrations and SECRET_KEY_BASE continuity must be tested because signed files alone do not reconstruct the audit trail. Keep the previous DocuSeal image until its data-migration and rollback boundary are understood.