To run a Zeitgitter server in a Docker container, the following steps are necessary:
- Copy
sample.env
toserver.env
and update it with your information:ZEITGITTER_OWN_URL
: Choose a name, such as<funny-name>.example.ch
, which will make the Server known under a short name of funny-name. Or,zeitgitter.example.org
, which will make it known as example.ZEITGITTER_OWNER
: Who (person, affiliation) maintains the time server.ZEITGITTER_KEYID
: The unique name and mail address your OpenPGP key should be created for, e.g.funny-name Timestamping Service <funny-name@example.ch
orExample.org Timestamping service <zeitgitter@example.org>
.ZEITGITTER_CONTACT
andZEITGITTER_COUNTRY
should be self-explanatory.
- Set up a TLS reverse proxy to accept your HTTPS traffic and forward it to port 15177, where the Zeitgitter timestamping server will pick it up and process it.
- Run
docker-compose up --quiet-pull -d
- Done! Congratulations, you have a running timestamping server!
- To enable trust in your server:
- Ensure
./persistent-data/repo
is persistent, i.e., will not be deleted by hardware or software failures or human error (this typically implies RAID and backup) - Protect
./persistent-data/.gnupg
from prying eyes, especially ensure that absolutely no one not listed as owner has access to your private timestamping key - Consider publishing your timestamps (see next section)
- Consider allowing other timestamping servers to cross-timestamp with you (see next section)
- Ensure
- Chose a machine where as few people as possible have access to.
- Check out this repository into it.
- Copy
./sample.env
to./server.env
and update it with your information (see explanation above). - Copy
./zeitgitter/zeitgitter.conf
to./persistent-data/zeitgitter.conf
- Update the information in there, ignoring those five labeled with
EASYCONFIG
(the settings in./server.env
will take precedence). - Set up a TLS reverse proxy to accept your HTTPS traffic and forward it to port 15177, where the Zeitgitter timestamping server will pick it up and process it.
- Ensure
./persistent-data/repo
is persistent, i.e., will not be deleted by hardware or software failures or human error (this typically implies RAID and backup).- Missing timestamping entries in your repo will cast doubt on the trustworthiness of your timestamping server.
- If you do run into problems with losing some data, immediately document your data losses in your repository (signed and timestamped) and, if possible, inform your users that they should resubmit any timestamping requests that have been lost.
- Publish your timestamp repository to a public
git
repository.- Create one or more public repositories.
- Create an SSH key and put it in
./persistent-data/.ssh
. - Add the key as a trusted push source to the public repositories.
- Configure
zeitgitter.conf
to push to those repositories (push-repository
andpush-branch
configuration variables).
- Protect
./persistent-data/.gnupg
from prying eyes, especially ensure that absolutely no one not listed as owner has access to your private timestamping key.- Anyone with knowledge of the private key can create (false) timestamps in your name, casting doubt on all your timestamps ever created.
- Cross-timestamping does help reduce the impact of this, but everyone will have to go the extra mile to show that their timestamps were issued at the time they claim to be and not back-dated.
- See Key Loss below.
- Set up cross-timestamping:
- Obtain timestamps from other servers (by default, this will be
https://gitta.zeitgitter.net
andhttps://diversity.zeitgitter.net
) - If possible, provide your data to the list of public timestamping servers using a pull request.
- If possible, get in touch with other timestamping server providers, so they can cross-timestamp with you.
- Obtain timestamps from other servers (by default, this will be
- Run
docker-compose up -d
- Start monitoring, e.g. by running
./tools/zeitgitter-repo-health.sh
on a monitoring server. (It maintains a copy of the repository, pulled from the remote repository in regular intervals, so ensure there is enough space available on that machine.) - Done! Congratulations, you have a professionally-run timestamping server!
If you serve multiple web sites or services via Docker, you probably already have done that before. If this is your first time, you may use the following instructions or search the WWW for "TLS reverse proxy".
We use the sample configuration data (https://hagrid.snakeoil
, rubeus@hagrid.snakeoil
) for our example. Of course, you have to adopt this to your needs.
- Ensure the DNS entry for
hagrid.snakeoil
points to your server. - Install Apache and Let's Encrypt, if you have not done that already:
apt install apache python3-certbot-apache
- Put the following into a new file
/etc/apache2/sites-available/hagrid.snakeoil.conf
; this is for HTTP service for the domain; we will later upgrade to HTTPS):<VirtualHost *:80> ServerAdmin rubeus@hagrid.snakeoil ServerName hagrid.snakeoil DocumentRoot /var/www/hagrid ErrorLog ${APACHE_LOG_DIR}/hagrid_error.log CustomLog ${APACHE_LOG_DIR}/hagrid.log combined ProxyPreserveHost On ProxyPass /.well-known ! ProxyPass / http://localhost:15177/ ProxyPassReverse / http://localhost:15177/ </VirtualHost>
- Activate the site:
a2ensite hagrid.snakeoil.conf a2enmod proxy_http systemctl restart apache2
- Upgrade to HTTPS with Let's Encrypt (the options after
--apache
are optional, but recommended):letsencrypt -d hagrid.snakeoil --apache --must-staple --redirect --hsts --uir
- Done!
Your repository can (and, for trust reasons, should) be publicly available. Pushing your git repository to a remote repository such as GitLab or GitHub provides both as an effective means of publication as well as independent second storage, colloquially known as "backup". Just to be sure, this should not be your only means of backup, but you get the idea.
Your PGP private key is slightly more complicated: It should not be lost (i.e., destroyed) and should also not be leaked (i.e., made available to anyone else). The confidentiality is one important step toward the prevention of key abuse, i.e., providing signatures which are not recorded and cross-timestamped and therefore cannot be distinguished from illegitimate or fraudulent timestamps.
To prevent loss, it is recommended to store the PGP key on a reliable long-term medium (e.g., 2 different brands of USB stick or printed on a piece of paper) and locked away in a safe.
To prevent leakage, the system should be kept up-to-date both in terms of software but also network security:
- Do limit the number of people with access to the machine (both physical and virtual),
- do limit the number of services running on the machine, and
- configure it securely, if possible with security monitoring.
All clients by default record the Key ID they first saw when talking to your timestamping service and will verify the key of all future timestamping signatures against this recorded ID ("trust on first use", TOFU).
Therefore, the recommended way to deal with the destruction or leakage of the private key is to do the following:
- Stop running the timestamping service.
- Commit any remaining signatures to the repository and push it.
- Put up a notice of what happened on the old server (or, better, its TLS proxy).
- Put up a notice of what happened into the repository happened and commit this information (preferably signed by your personal key) and push this information to the remote repositories. not-yet-published signatures).
- Create an entirely new replacement server with different URL, shortname, email address, and repository.
- Retire the old server.