Build · Conditional step

Timestamp proxy with nginx for the Evidency TSA

Run a small nginx proxy that forwards RFC 3161 timestamp requests to the Evidency TSA and adds the X-API-KEY header. Use it when your client cannot send custom HTTP headers, such as Adobe Acrobat or a DocuSeal build without the Custom Headers field. The API key then stays in the proxy configuration and never has to be entered in the client.

A conditional step of the DocuSeal setup: it is required when your DocuSeal build has no Custom Headers field (see step 5). The Acrobat worked example uses it too.

1. Create the files

Create a folder for the proxy with three files.

EVIDENCY_PROJECT_ID=<your-project-id>
EVIDENCY_API_KEY=<your-api-key>

Save this as .env. Keep it out of version control.

# docker-compose.yml
services:
  tsa-proxy:
    image: nginx:alpine
    ports:
      - "8089:8089"
    env_file: .env
    volumes:
      - ./default.conf.template:/etc/nginx/templates/default.conf.template:ro
# default.conf.template
server {
    listen 8089;
    location / {
        proxy_pass https://api-sandbox.evidency.io/v3/projects/${EVIDENCY_PROJECT_ID}/timestamp;
        proxy_ssl_server_name on;
        proxy_set_header X-API-KEY "${EVIDENCY_API_KEY}";
    }
}
File Purpose

.env

Holds the project ID and the API key. Read by the container at start.

docker-compose.yml

Runs the nginx:alpine service on port 8089.

default.conf.template

Forwards each request to the Evidency timestamp endpoint for your project and adds X-API-KEY.

2. Start the proxy

Run this in the folder that contains docker-compose.yml:

docker compose up -d

Check that the container tsa-proxy-tsa-proxy-1 is running. Then check its log for start worker process.

To check the proxy, send any RFC 3161 request to http://localhost:8089/. A correct reply is HTTP 200 with content type application/timestamp-reply, and a TSA status of 0 (granted).

3. Point your client at the proxy

Use http://localhost:8089/ as the timestamp server URL. Leave the header field empty, because the proxy adds the header.

  • Adobe Acrobat: set the timestamp server in Preferences as described in the Acrobat tutorial.

  • DocuSeal in the same Docker Compose stack: use http://tsa-proxy:8089/ as the timeserver URL. Add the proxy service to the DocuSeal docker-compose.yml, or put both stacks on a shared network. From a DocuSeal container that runs outside this stack, use http://host.docker.internal:8089/ on Docker Desktop.

4. Keep the key safe

  • The API key lives in .env and in the container environment. Do not commit .env, paste it in tickets, or screenshot it.

  • Bind the proxy to localhost or an internal network only. Anyone who can reach port 8089 can request timestamps against your quota.

Are you looking to strengthen the evidential value of your electronic signatures?

Tell us more