For administrators
← All topics

Installing, step by step

From an empty server to the first sign-in: checking the bundle, ./draften install, HTTPS, the licence and the first mailbox.

The whole installation is done by one command, ./draften install, run in the unpacked bundle. Here is the procedure from an empty server to the first sign-in. What an installation contains and what lies where is described in Installing on your own server.

Step 1: Prepare the server

The server needs no internet for the installation: the bundle brings all the images.

Step 2: Check that the bundle is from us

For every release bundle draften-<version>.tar we publish its checksum. Compute it and compare:

sha256sum draften-<version>.tar

Every later update the installation checks by itself against our keys. The first installation has nothing to compare with, though — this is its check. If the checksums differ, do not install the bundle and get in touch with us.

Step 3: Unpack the bundle and run the installer

Choose the directory the installation will live in, unpack the bundle into it and run the installer:

mkdir /srv/draften
tar -xf draften-<version>.tar -C /srv/draften
cd /srv/draften
./draften install

The installer loads the images, checks the bundle and asks for what it needs.

Step 4: Answer the installer's questions

Every answer can also be given right in the command, so you can script the installation; ./draften help lists the options. For example:

./draften install --url https://draften.firma.cz --org "Firma Ltd" \
  --admin-email jan@firma.cz --admin-name "Jan Novák" --locale cs --updater yes

Step 5: Keep a copy of .env off the server

The installer writes the settings and secrets into the .env file in the installation directory. Copy it — at least the MASTER_KEY value — to a safe place off the server. This key encrypts the mailbox access, the model keys and the passwords for sending mail. Without it nobody can read them, not even from a backup — and we do not have it.

Step 6: Set your password and sign in

At the end the installer prints a link for setting the first administrator's password. Open it in a browser, set the password and you are signed in. The link works once and is valid for 7 days. What the password page looks like is shown in the guide Signing in.

Only the installer prints the link. Do not copy it anywhere or forward it — whoever has it sets the administrator's password.

Step 7: Publish the address

Depending on what you chose in step 4:

A certificate can be added later too:

./draften certificate cert.pem key.pem --url https://draften.firma.cz

Step 8: Upload the licence

We send the licence as a file licence-<number>.json. In the interface, open Installation → Installation, choose the file in the Licence card at the bottom and upload it. Until the installation has a licence, the assistants process no mail and no mailbox or assistant can be created. More in The licence.

Step 9: Set the default keys and outgoing mail

On the same Installation page, set the Default API keys for the models and the Default outgoing mail (where invitations and password links come from). They apply to every organisation that does not set its own. Details: Model API keys and Outgoing mail.

Step 10: Connect a mailbox and set up an assistant

From here you carry on as on any other installation:

  1. Add and connect a mailbox.
  2. Set up an assistant with the wizard.
  3. Invite more people — People and roles.

Step 11: Check that everything runs

./draften status

prints the version, the health of the web and the workers, the HTTPS status and the database dumps. In the interface, the Operations page shows whether the workers check in — see Operations and capacity.

Next

Plain text version