Skip to content

Environment Variables

All configuration is set via the .env file at /home/ubuntu/p/.env.

Required

VariableDescription
DATABASE_URLPostgreSQL connection string
AZURE_VAULT_URLURL of your Azure Key Vault
LEAF_KEY_NAMEName of the leaf signing key in Key Vault
JWT_SECRETSecret used to sign JWT tokens

Azure PKI

VariableDescription
ROOT_CERT_PATHPath to the root CA certificate PEM file
CHAIN_PEM_PATHPath to the certificate chain PEM file

Blockchain

VariableDescription
SEPOLIA_RPC_URLEthereum Sepolia RPC endpoint
DEPLOYER_PRIVATE_KEYPrivate key of the wallet that pays for gas
CONTRACT_ADDRESSAddress of the on-chain registry contract

Optional

VariableDefaultDescription
BASE_DOWNLOAD_URLhttp://localhost:8003/downloadPublic URL used in download links returned by the API
ACCESS_TOKEN_EXPIRE_MINUTES15How long access tokens are valid
REFRESH_TOKEN_EXPIRE_DAYS30How long refresh tokens are valid

Example .env

ini
# Database
DATABASE_URL=postgresql://tauth:tauth123@localhost/tauth

# Azure Key Vault
AZURE_VAULT_URL=https://your-vault.vault.azure.net/
LEAF_KEY_NAME=leaf-test
ROOT_CERT_PATH=/home/ubuntu/p/tauth/tauth-c2pa-root.pem
CHAIN_PEM_PATH=/home/ubuntu/p/pki/tauth-sub-ca.pem

# JWT
JWT_SECRET=replace-with-a-random-64-char-string

# Blockchain
SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/your-project-id
DEPLOYER_PRIVATE_KEY=0xabc123...
CONTRACT_ADDRESS=0xdef456...

# Download links
BASE_DOWNLOAD_URL=http://13.51.170.190:8003/download

Generating a JWT secret

bash
openssl rand -hex 32

Built on C2PA · Secured by Azure Key Vault · Anchored on Ethereum