Documentation / 19
How a Verified Telegram Collection Server Works
A server that collects for a case should not ask anyone to trust whoever runs it. Watch how TgWitness deploys one that a third party can check, what that check covers and what no customer-visible log can show.
One command, six steps
You run python -m tgwitness.cloud deploy, or the Server 24/7 wizard in the panel runs it for you. Your computer talks to two APIs, Cloudflare's and the provider's, and nothing else. The server builds itself from a single commit and never accepts a connection.
- Tunnel and DNS at Cloudflare. The tunnel's ingress forwards the panel hostname to the panel alone; a witness hostname gets two read-only paths.
- Firewall without inbound rules. Created through the provider API before the server exists, so nothing can ever connect in.
- Server behind it. No SSH key, no backups, no console agent; a cloud-init file holds everything it needs.
- First boot. SSH is masked and root locked; the server fetches exactly one commit, checks it and installs only packages whose SHA-256 is in that commit's locks.
- Collector and key. TgWitness starts and creates its signing key on the server; cloudflared connects outward to Cloudflare.
- Signed statement. The collector signs the server ID and the hash of its cloud-init; deploy checks both and writes
deployment.jsonfor the verifier.
Six steps, in the order deploy runs them. Nothing is created before you confirm in the wizard.
Who can reach a cloud server
A cloud server is a QEMU process on the provider's physical host. Its memory, disk, network and clock all belong to that host. There are two ways in: the control plane you and your API token use, and the hosts themselves.
- memory
- disk
- clock
Choose who tries to reach the server. Every customer action goes through the control plane and lands in the provider log; the host sits below it.
What stays fixed even then
- Checkpoints already published to independent witnesses cannot be rewritten.
- RFC 3161 and OpenTimestamps fix when each checkpoint existed; the host clock cannot move them.
- Telegram still holds the messages. Another capture of the same chat contradicts a forgery.
The realistic risk
- Manipulation at the moment of collection by someone with host access, not silent rewriting afterwards.
- Host access to every server on that host is a capability the provider guards closely; spending it covertly on one evidence server is a state-level decision.
- Answer it with two providers in different jurisdictions, or with the next assurance level.
How verify reads the provider log
The verifier asks the provider with a read-only key what happened to the server. Every action is sorted: creation and the start that belongs to it pass, any path into the server fails, power actions and anything nobody foresaw go to review. An unknown action never passes silently.
| After creation | Action | verify |
|---|---|---|
| 0 s | create_server | PASS server created |
| 1 s | apply_firewall | PASS part of the deployment |
| 4 s | start_server | PASS part of the deployment |
exit 0Creation, the firewall and the first start, all within 30 minutes of creation: the provider log passes.
tgwitness/providers/hetzner.py. The full report also checks the firewall, the tunnel, the signed statement and, with --evidence, the journal; the worst result decides.What Cloudflare records
Cloudflare is a second witness that the provider does not control. The tunnel record shows where the connector runs. With Gateway DNS, Cloudflare also logs every name the server looks up, and the provider firewall keeps DNS from going anywhere else.
- Name lookup through the system resolverLogged by Cloudflare
DNS over TLS, port 853 → Cloudflare Gateway - Plain DNS to another resolverBlocked by the provider firewall
port 53 - DNS over TLS to another resolverBlocked by the provider firewall
port 853 - DNS over HTTPS to another resolverPasses · not in the Gateway log
port 443 - Telegram data centre by IP addressPasses · not in the Gateway log
no lookup at all - Tunnel to the panelCloudflare records the connector's address
outbound only
Cloudflare logs every name the server looks up through its resolver, and the firewall stops DNS to anyone else. Connections by IP address and DNS over HTTPS stay outside this log.
Providers
Five providers run the same sealed server. They differ in what their own log records, and that log is what a verifier reads to see whether anyone reached the server through the provider.
| Provider | Log kept | Names who acted | Console in the log | Gateway DNS | Panel wizard |
|---|---|---|---|---|---|
| Hetzner Cloud | While the server exists | No | Yes | Yes | Yes |
| Amazon EC2 | 90 days | Yes | Agents and keys | No | No, command line |
| Akamai (Linode) | 90 days | Yes | No | No | No, command line |
| DigitalOcean | While the Droplet exists | No | No | No | No, command line |
| Vultr | 30 days | Yes | Not identified | No | No, command line |
The score measures the provider's log: how long it lasts, whether it names who acted, which ways into a running server it records and what a read key exposes. It does not measure the server, which is the same everywhere.
Hetzner Cloud
Hetzner records a request for web console credentials as an action and keeps the log while the server exists. Its firewall also takes outbound rules, so it is the only provider where Cloudflare can log every name the server looks up.
Stronger
- Console requests are in the log
- The log lasts as long as the server
- Outbound firewall rules make Gateway DNS possible
- User data is not returned through the API
- Panel wizard and removal through the API
Weaker
- The log does not name who acted
- Earlier firewall rules are not kept
The default choice: the strongest log for console access, the only one with Gateway DNS, and a wizard in the panel.
What the Hetzner Cloud log records
Actions on the server and on its firewall, with time and status. Read with a Read token of the same project.
Press an action to add it to the log. The result is the worst of all actions.
- server created
- part of the deployment, within 30 minutes of creation
- web console (VNC) credentials requested
- rescue system enabled: another OS with access to the disk
- root password reset
- disk rebuilt from an image
- ISO attached: the server can boot another OS
- image of the disk created: a copy of the signing key at rest
- provider backups enabled: copies of the disk, including the signing key at rest
- firewall removed from the server
- power or restart: collection was interrupted; compare with the journal
- firewall rules replaced; earlier rule contents are not in the provider log
- not expected in this mode
| Action | verify |
|---|---|
create_server | PASS server created |
start_server | PASS part of the deployment, within 30 minutes of creation |
exit 0The deployment itself: creation and the start that belongs to it pass.
tgwitness/providers/hetzner.py. An action nobody foresaw is marked for review, never passed.What the log does not show
- Who performed an action: Hetzner's log does not name the user.
- The contents of earlier firewall rules: the log shows that they changed, not what they were.
- Anything done on the physical host, below the API.
Cloudflare on Hetzner Cloud
Cloudflare is a second witness that Hetzner Cloud does not control.
- TunnelThe panel is reached only through a Cloudflare tunnel. Its ingress forwards the panel hostname to the panel alone.
- Connector checkCloudflare lists every connector with its address.
verifychecks that the connector runs from the server's address and reports any other. - Quick tunnelWorks without a domain, but no Cloudflare account keeps a record of it, so the report is at best
INCOMPLETE. - Gateway DNSAvailable. The Hetzner firewall lets DNS leave only to Cloudflare Gateway over TLS, so Cloudflare logs every name the server looks up. Free Zero Trust plan; the log lasts 24 hours there, and evidence mode copies it into the journal.
- drandEvidence mode can add rounds from
drand.cloudflare.com: records after a round are newer than it.
Server and price
| Type | vCPU · memory · disk | Price |
|---|---|---|
cpx22 | 2 vCPU · 4 GB · 80 GB | €19.99 a month excluding VAT in Nuremberg or Falkenstein, €16.99 in Helsinki; in Ashburn and Hillsboro cpx11 (2 vCPU · 2 GB) at €17.99 (price list, 21 November 2026) |
Deploy and verify
In the panel on your own computer open More tools → Extras → Server 24/7, paste a Hetzner token (Read & Write) and confirm. The wizard shows the server type, the price including VAT for your account and the version first, and creates nothing before you confirm. From a terminal:
python -m tgwitness.cloud deploy --provider hetzner --name case-1 --server-type cpx22 \
--ref v1.1.1 --quick-tunnel --provider-token-file hetzner.token
| To deploy | API token with Read & Write permission of a dedicated project (HCLOUD_TOKEN) |
|---|---|
| For the verifier | API token with Read permission of the same project |
Amazon EC2
CloudTrail names the user behind every call and covers the agent and key paths into an instance: EC2 Instance Connect, Systems Manager and the serial console. Its event history keeps 90 days.
Stronger
- Every call names who made it
- Agent and key paths into the instance are covered
- Volumes, snapshots and security groups are covered
Weaker
- Event history keeps 90 days by default
- Broad read access exposes the user data
- No outbound rules here, so no Gateway DNS
- Command line only
When the opponent might use an organisation's own AWS access: CloudTrail shows who did what. Produce the report within 90 days.
What the Amazon EC2 log records
CloudTrail management events with the user who made each call. Read with credentials allowed only ec2:DescribeInstances, ec2:DescribeSecurityGroups and cloudtrail:LookupEvents.
Press an action to add it to the log. The result is the worst of all actions.
- server created
- part of the deployment, within 30 minutes of creation
- EC2 Instance Connect pushed an SSH key
- serial console key pushed
- Systems Manager session
- Systems Manager command
- instance profile attached: agents can be granted access
- instance attribute changed (user data, type, kernel or security groups)
- snapshot of a volume: a copy of the signing key at rest
- a volume attached
- inbound rule added
- power or restart: collection was interrupted; compare with the journal
- metadata service options changed
| Action | verify |
|---|---|
RunInstances | PASS server created |
CreateSecurityGroup | PASS part of the deployment, within 30 minutes of creation |
exit 0The deployment itself: creation and the start that belongs to it pass.
tgwitness/providers/aws.py. An action nobody foresaw is marked for review, never passed.What the log does not show
- AWS staff and the underlying host.
- Anything older than 90 days, unless you keep a CloudTrail trail.
- Not a gap in the log but a risk: ec2:Describe* would return the user data with both tokens, so the verifier gets only the three actions above.
Cloudflare on Amazon EC2
Cloudflare is a second witness that Amazon EC2 does not control.
- TunnelThe panel is reached only through a Cloudflare tunnel. Its ingress forwards the panel hostname to the panel alone.
- Connector checkCloudflare lists every connector with its address.
verifychecks that the connector runs from the server's address and reports any other. - Quick tunnelWorks without a domain, but no Cloudflare account keeps a record of it, so the report is at best
INCOMPLETE. - Gateway DNSNot available on Amazon EC2: TgWitness sets outbound firewall rules only on Hetzner, and Gateway DNS needs them to keep DNS from going anywhere else.
- drandEvidence mode can add rounds from
drand.cloudflare.com: records after a round are newer than it.
Server and price
| Type | vCPU · memory · disk | Price |
|---|---|---|
t3.small | 2 vCPU · 2 GiB · EBS volume | about $17.52 a month on demand in Frankfurt, plus the EBS volume and $0.005 an hour (about $3.65) for the public IPv4 address (price list, 21 November 2026) |
Deploy and verify
Amazon EC2 runs from a terminal; the panel wizard covers Hetzner only.
python -m tgwitness.cloud deploy --provider aws --name case-1 --server-type t3.small \
--location eu-central-1 --ref v1.1.1 --quick-tunnel --provider-token-file aws.credentials
| To deploy | IAM credentials allowed ec2:DescribeVpcs, DescribeImages, CreateSecurityGroup, AuthorizeSecurityGroupIngress, RunInstances, CreateTags, DescribeInstances, DescribeSecurityGroupRules and RevokeSecurityGroupIngress |
|---|---|
| For the verifier | IAM credentials allowed only ec2:DescribeInstances, ec2:DescribeSecurityGroups and cloudtrail:LookupEvents |
Akamai (Linode)
Account events name the user, and the firewall keeps every rule version, so a verifier sees whether the rules ever changed. Lish and Glish console sessions are not events.
Stronger
- Every event names who acted
- Every firewall rule version is kept
- Host reboots and migrations are visible
Weaker
- Console sessions are not events
- Events keep 90 days
- No outbound rules here, so no Gateway DNS
- Command line only
When you want names in the log and a full firewall history, and can produce the report within 90 days.
What the Akamai (Linode) log records
Account events with the username, for 90 days. Read with a token limited to linodes, firewall and events, read-only.
Press an action to add it to the log. The result is the worst of all actions.
- server created
- part of the deployment, within 30 minutes of creation
- root password reset
- disk rebuilt from an image
- booted from the Lish console
- snapshot of the disks: a copy of the signing key at rest
- provider backups enabled: copies of the disk, including the signing key at rest
- boot configuration changed: can boot another kernel or a rescue system
- firewall disabled
- firewall rules changed; compare the rule version
- moved to another host
- power or restart: collection was interrupted; compare with the journal
| Action | verify |
|---|---|
linode_create | PASS server created |
linode_boot | PASS part of the deployment, within 30 minutes of creation |
exit 0The deployment itself: creation and the start that belongs to it pass.
tgwitness/providers/linode.py. An action nobody foresaw is marked for review, never passed.What the log does not show
- Lish and Glish console sessions. Root is locked at the first boot, so a console login would first need a password reset or a boot configuration change, and those are events.
- Anything older than 90 days.
- Anything done on the physical host, below the API.
Cloudflare on Akamai (Linode)
Cloudflare is a second witness that Akamai (Linode) does not control.
- TunnelThe panel is reached only through a Cloudflare tunnel. Its ingress forwards the panel hostname to the panel alone.
- Connector checkCloudflare lists every connector with its address.
verifychecks that the connector runs from the server's address and reports any other. - Quick tunnelWorks without a domain, but no Cloudflare account keeps a record of it, so the report is at best
INCOMPLETE. - Gateway DNSNot available on Akamai (Linode): TgWitness sets outbound firewall rules only on Hetzner, and Gateway DNS needs them to keep DNS from going anywhere else.
- drandEvidence mode can add rounds from
drand.cloudflare.com: records after a round are newer than it.
Server and price
| Type | vCPU · memory · disk | Price |
|---|---|---|
g6-standard-1 | 1 CPU · 2 GB · 50 GB | $12.00 a month (price list, 21 November 2026) |
Deploy and verify
Akamai (Linode) runs from a terminal; the panel wizard covers Hetzner only.
python -m tgwitness.cloud deploy --provider linode --name case-1 --server-type g6-standard-1 \
--ref v1.1.1 --quick-tunnel --provider-token-file linode.token
| To deploy | personal access token with linodes, firewall and events read/write scopes |
|---|---|
| For the verifier | personal access token with linodes, firewall and events read-only scopes |
DigitalOcean
Droplet actions stay while the Droplet exists, without the name of who acted. The Recovery Console and Cloud Firewall changes leave nothing in the log.
Stronger
- Droplet actions are kept while the Droplet exists
- User data is not returned through the API
Weaker
- The log does not name who acted
- The Recovery Console is not logged
- Firewall changes have no history
- The tag firewall applies moments after creation
- No outbound rules here, so no Gateway DNS
- Command line only
When you already work there and the case does not hinge on console access or firewall history.
What the DigitalOcean log records
Droplet actions with time and status. Read with a read-only personal access token.
Press an action to add it to the log. The result is the worst of all actions.
- server created
- root password reset
- disk rebuilt from an image
- disk restored from a backup or snapshot
- snapshot of the disk: a copy of the signing key at rest
- provider backups enabled: copies of the disk, including the signing key at rest
- boot kernel changed
- power or restart: collection was interrupted; compare with the journal
- server resized
- IPv6 enabled
| Action | verify |
|---|---|
create | PASS server created |
exit 0The deployment itself: creation and the start that belongs to it pass.
tgwitness/providers/digitalocean.py. An action nobody foresaw is marked for review, never passed.What the log does not show
- Recovery Console sessions. The console agent is not installed and root is locked at the first boot, so a console login would first need a password reset, which is an action.
- Cloud Firewall changes: they have no history, so only the current rules are checked.
- Who performed an action.
- Anything done on the physical host, below the API.
Cloudflare on DigitalOcean
Cloudflare is a second witness that DigitalOcean does not control.
- TunnelThe panel is reached only through a Cloudflare tunnel. Its ingress forwards the panel hostname to the panel alone.
- Connector checkCloudflare lists every connector with its address.
verifychecks that the connector runs from the server's address and reports any other. - Quick tunnelWorks without a domain, but no Cloudflare account keeps a record of it, so the report is at best
INCOMPLETE. - Gateway DNSNot available on DigitalOcean: TgWitness sets outbound firewall rules only on Hetzner, and Gateway DNS needs them to keep DNS from going anywhere else.
- drandEvidence mode can add rounds from
drand.cloudflare.com: records after a round are newer than it.
Server and price
| Type | vCPU · memory · disk | Price |
|---|---|---|
s-1vcpu-2gb | 1 vCPU · 2 GB · 50 GB | $12.00 a month (price list, 21 November 2026) |
Deploy and verify
DigitalOcean runs from a terminal; the panel wizard covers Hetzner only.
python -m tgwitness.cloud deploy --provider digitalocean --name case-1 --server-type s-1vcpu-2gb \
--ref v1.1.1 --quick-tunnel --provider-token-file digitalocean.token
| To deploy | personal access token with write access of a dedicated team |
|---|---|
| For the verifier | read-only personal access token of the same team |
Vultr
The activity log names who called the API, but keeps 30 days and does not identify the web console. Any key that can read the instance also receives its console address and its user data with both tokens.
Stronger
- The activity log names the user and the address
Weaker
- The log keeps 30 days
- The web console is not identified
- A read key receives the console address and both tokens
- No outbound rules here, so no Gateway DNS
- Command line only
The cheapest, and the weakest. Fine for a test; for a case, produce the report within 30 days and treat both tokens as exposed.
What the Vultr log records
Account activity log with method, path, username and address, for 30 days, longer with an audit-log subscription. Read with a user that has read access and the activity_logs permission.
Press an action to add it to the log. The result is the worst of all actions.
- server created
- part of the deployment, within 30 minutes of creation
- disk reinstalled
- disk restored from a backup or snapshot
- ISO attached: the server can boot another OS
- provider backups scheduled: copies of the disk, including the signing key at rest
- snapshot of the disk: a copy of the signing key at rest
- instance changed: user_data
- firewall rule or group removed
- power or restart: collection was interrupted; compare with the journal
| Action | verify |
|---|---|
POST /instances | PASS server created |
POST /firewalls/{firewall}/rules | PASS part of the deployment, within 30 minutes of creation |
exit 0The deployment itself: creation and the start that belongs to it pass.
tgwitness/providers/vultr.py. An action nobody foresaw is marked for review, never passed.What the log does not show
- Opening the web console: it is not identified as such in the activity log.
- Anything older than 30 days, unless an audit-log subscription keeps it.
- Not a gap in the log but a risk: any key that can read the instance receives its console address and its user data, so assume the verifier's key can read both tokens.
Cloudflare on Vultr
Cloudflare is a second witness that Vultr does not control.
- TunnelThe panel is reached only through a Cloudflare tunnel. Its ingress forwards the panel hostname to the panel alone.
- Connector checkCloudflare lists every connector with its address.
verifychecks that the connector runs from the server's address and reports any other. - Quick tunnelWorks without a domain, but no Cloudflare account keeps a record of it, so the report is at best
INCOMPLETE. - Gateway DNSNot available on Vultr: TgWitness sets outbound firewall rules only on Hetzner, and Gateway DNS needs them to keep DNS from going anywhere else.
- drandEvidence mode can add rounds from
drand.cloudflare.com: records after a round are newer than it.
Server and price
| Type | vCPU · memory · disk | Price |
|---|---|---|
vc2-1c-2gb | 1 vCPU · 2 GB · 55 GB | $10.00 a month (price list, 21 November 2026) |
Deploy and verify
Vultr runs from a terminal; the panel wizard covers Hetzner only.
python -m tgwitness.cloud deploy --provider vultr --name case-1 --server-type vc2-1c-2gb \
--ref v1.1.1 --quick-tunnel --provider-token-file vultr.token
| To deploy | API key of a dedicated account or sub-account |
|---|---|
| For the verifier | API key of a user with read access and the activity_logs permission |
This is the second of three assurance levels. Compare the levels.
Start
In the panel on your own computer open More tools → Extras → Server 24/7, choose Hetzner and paste a token. The wizard shows the server type, the price and the version, and creates nothing before you confirm. The other providers run from a terminal:
python -m tgwitness.cloud plan --provider hetzner --name case-1 --server-type cpx22 --ref v1.1.1 --quick-tunnel
python -m tgwitness.cloud deploy --provider hetzner --name case-1 --server-type cpx22 --ref v1.1.1 --quick-tunnel \
--provider-token-file hetzner.token
python -m tgwitness.cloud verify --record deployments/case-1/deployment.json \
--provider-token-file read-only.token --report report.md
A quick tunnel needs no domain, but no Cloudflare account keeps a record of it, so the report is at best INCOMPLETE. For a case that has to stand, deploy under your own domain with a Cloudflare token.
Every option, the token permissions, removal and the report format are in the verified server reference.