2. First deploy
In short. You tell your computer where the server is. You build the app on the server,
create the app’s settings file with your login password, and start the app. At the end,
the app answers at https://<your-domain> and you can log in. Trading stays off until
4. Go live.
Each command block says where to type it: on the server or on your computer.
Step 1. Fill in your computer’s deploy settings
- On your computer, go to the folder of your copy of the repository.
-
Copy the template of the deploy settings. Git ignores the new file:
-
Open
deploy/.deploy.envin a text editor. Fill in these three lines: - Do not change the other lines. Save the file.
Step 2. Build the app on the server
-
On your computer, in the repository folder, start the deploy:
- When ssh asks, type the PIN of the security key and touch the key. For a key file, type the passphrase.
- Wait. The server gets the tag, checks it and builds the app. The first build takes some minutes.
Step 3. Create the settings file
-
On the server, make the hash of your login password:
-
At
Password:, type the password that you will use to log in to the app. The screen does not show it. -
Copy the line that the command shows. It starts with
$argon2id$. -
On the server, make a random session secret:
- Copy the line that the command shows. Also keep a copy in your password manager. WARNING: Do not lose the session secret. A backup restores only with the session secret that was set when the app wrote the backup.
-
On the server, create the settings file and open it:
-
Write these three lines. Put the hash between single quotes.
- Save the file and close the editor.
Step 4. Deploy again
-
On your computer, start the deploy again:
- Type the PIN and touch the security key, or type the passphrase.
Is it working?
On the
/api/status page, trading_enabled is false at this time. This is correct. You
turn trading on in 4. Go live.
If a check fails, see Troubleshooting.
Previous: 1. Prepare the server · Next: 3. Backups