-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathllms-full.txt
More file actions
10005 lines (7230 loc) · 388 KB
/
Copy pathllms-full.txt
File metadata and controls
10005 lines (7230 loc) · 388 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
url: 'https://docs.sysreptor.com/setup/installation.md'
---
::: details System Requirements
### Server
* Ubuntu\[^1]
* 8GB RAM
\[^1]: It may also run on [Kali](https://emvee-nl.github.io/posts/SysReptor/), [MacOS](https://alive-club-f8d.notion.site/Sysreptor-Install-M2-Studio-12e1fd44f31080a28acae6de346c6a30), RHEL, and more as long as you take care of all dependencies. Our install and update procedures, however, focus on Ubuntu.
### Client
 · 
* Network connection to the server
* Up-to-date desktop browser, one of:
* Chrome
* Edge
* Firefox
* Safari
:::
::: tabs
\== Easy Script Installation
Installation via script is the easiest option.
Install additonal requirements:
```shell
sudo apt update
sudo apt install -y sed curl openssl uuid-runtime coreutils
```
Install Docker:
```shell
curl -fsSL https://get.docker.com | sudo bash
```
Make sure your user is allowed to use Docker. For this, you can add your user to the docker group:
```shell
sudo groupadd docker 2>/dev/null # Creates the Docker group if it doesn't exist
sudo usermod -aG docker $USER # Add the current user to the Docker group
newgrp docker # Instantly apply the group membership
```
Download the SysReptor install script and run:
```shell
bash <(curl -s https://docs.sysreptor.com/install.sh)
```
The installation script creates a new `sysreptor` directory holding the source code and everything you need.\
It will set up all configurations, create volumes and secrets, download images from Docker hub and bring up your containers.
\== Manual Installation
Install Docker:
```shell
curl -fsSL https://get.docker.com | sudo bash
```
Make sure your user is allowed to use Docker. For this, you can add your user to the docker group:
```shell
sudo groupadd docker 2>/dev/null # Creates the Docker group if it doesn't exist
sudo usermod -aG docker $USER # Add the current user to the Docker group
newgrp docker # Instantly apply the group membership
```
Download and extract the latest SysReptor setup files:
```shell
curl -s -L --output sysreptor.tar.gz https://github.com/syslifters/sysreptor/releases/latest/download/setup.tar.gz
tar xzf sysreptor.tar.gz
```
Create your `app.env`:
```shell
cd sysreptor/deploy
cp app.env.example app.env
```
Generate Django secret key and add to `app.env`:
```shell
printf "SECRET_KEY=\"$(openssl rand -base64 64 | tr -d '\n=')\"\n"
```
Generate database and Redis passwords and add to `.env` (copy from `.env.example` if needed):
```shell
cp -n .env.example .env
printf "POSTGRES_PASSWORD=$(openssl rand -hex 32)\nREDIS_PASSWORD=$(openssl rand -hex 32)\n"
```
Optional: If you want to encrypt sensitive data at rest (data in the database and uploaded files and images), generate encryption keys and add to `app.env`:
```shell
KEY_ID=$(uuidgen) && printf "ENCRYPTION_KEYS=[{\"id\": \"${KEY_ID}\", \"key\": \"$(openssl rand -base64 32)\", \"cipher\": \"AES-GCM\", \"revoked\": false}]\nDEFAULT_ENCRYPTION_KEY_ID=\"${KEY_ID}\"\n"
```
Optional: Add Professional license key to `app.env`:
```
LICENSE="<your license key>"
```
Optional: Professional installations need an additional docker container for the spell check. Add `languagetool/docker-compose.yml` to `docker-compose.yml` in the `deploy` directory:
```
name: sysreptor
include:
- sysreptor/docker-compose.yml
- languagetool/docker-compose.yml
```
Create docker volumes:
```shell
docker volume create sysreptor-db-data
docker volume create sysreptor-app-data
```
Launch containers (from the `deploy` directory):
```shell
docker compose up -d
```
Add initial superuser:
```shell
username=reptor
docker compose exec app python3 manage.py createsuperuser --username "$username"
```
Add demo data:
```
# Projects
url="https://docs.sysreptor.com/assets/demo-projects.tar.gz"
curl -s "$url" | docker compose exec --no-TTY app python3 manage.py importdemodata --type=project --add-member="$username"
# Designs
url="https://docs.sysreptor.com/assets/demo-designs.tar.gz"
curl -s "$url" | docker compose exec --no-TTY app python3 manage.py importdemodata --type=design
# Finding templates
url="https://docs.sysreptor.com/assets/demo-templates.tar.gz"
curl -s "$url" | docker compose exec --no-TTY app python3 manage.py importdemodata --type=template
```
:::
::: details Optional: Verify docker images
```shell
SYSREPTOR_VERSION=$(cat sysreptor/deploy/.env | grep 'SYSREPTOR_VERSION=' | cut -d'=' -f2-)
# SYSREPTOR_VERSION=$(docker exec -it sysreptor-app bash -c 'echo "$VERSION"')
# Verify setup.tar.gz
curl -s -L --output sysreptor.tar.gz.sigstore.json https://github.com/syslifters/sysreptor/releases/${SYSREPTOR_VERSION}/download/setup.tar.gz.sigstore.json
cosign verify-blob sysreptor.tar.gz --key https://docs.sysreptor.com/cosign.pub --bundle sysreptor.tar.gz.sigstore.json
# Verify docker images
cosign verify --key https://docs.sysreptor.com/cosign.pub "syslifters/sysreptor:${SYSREPTOR_VERSION}"
cosign verify --key https://docs.sysreptor.com/cosign.pub "syslifters/sysreptor-languagetool:${SYSREPTOR_VERSION}" # Pro only
```
:::
Access your application at http://127.0.0.1:8000/.
We recommend [using a webserver](/setup/webserver) like Caddy (recommended), nginx or Apache to prevent [potential vulnerabilities](https://github.com/Syslifters/sysreptor/security/advisories) and to enable HTTPS.
Further [configurations](/setup/configuration) can be edited in `sysreptor/deploy/app.env`.
## Stopping SysReptor
To stop SysReptor and all associated containers, go to the `sysreptor/deploy` directory and run `docker compose stop`.
::: info 
Need help or have questions? Get support and connect with us and the SysReptor community.
[Get help](https://github.com/Syslifters/sysreptor/discussions/categories/q-a)
:::
---
---
url: 'https://docs.sysreptor.com/setup/configuration.md'
---
# Configuration
`app.env` (located in `deploy` directory) controls the behaviour of your SysReptor installation.
[Server settings](#server-settings) are defined in `app.env` and passed as environment variables to the SysReptor docker container.
[Application settings](#application-settings) can be configured in `app.env` or via the settings page in the web interface.
After making changes, go to `sysreptor/deploy` and restart the containers:
```shell
docker compose up -d
```
## Server Settings
### Django Secret Key
Django server secret key (see https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-SECRET\_KEY).
Make sure this key remains secret.
```shell title="Generate random secret key:"
printf "SECRET_KEY=$(openssl rand -base64 64 | tr -d '\n=')\n"
```
```dotenv title="Example (regenerate this value!):"
SECRET_KEY="TODO-change-me-Z6cuMithzO0fMn3ZqJ7nTg0YJznoHiJXoJCNngQM4Kqzzd3fiYKdVx9ZidvTzqsm"
```
If you renew the Django secret key, all existing sessions terminate and links for setting new passwords (e.g., from password reset emails) are invalidated.
### Data Encryption at Rest
Encrypt data at rest by configuring an encryption key. This will encrypt sensitive data in your database and files uploaded in your notes (~~except images~~, images are also encrypted).
Database and file storage administrators cannot access encrypted data. The key is held in the web application. Data encryption at rest does not help against malicious actors with access to the web server.
You have to define one `DEFAULT_ENCRYPTION_KEY_ID` which will be used for data encryption. However, you can rotate your keys by defining multiple keys in `ENCRYPTION_KEYS`.\
All specified keys are used for decrypting stored data.
Note that the `DEFAULT_ENCRYPTION_KEY_ID` must be part of `ENCRYPTION_KEYS`.
```shell title="Generate random encryption keys:"
KEY_ID=$(uuidgen) && printf "ENCRYPTION_KEYS=[{\"id\": \"${KEY_ID}\", \"key\": \"$(openssl rand -base64 32)\", \"cipher\": \"AES-GCM\", \"revoked\": false}]\nDEFAULT_ENCRYPTION_KEY_ID=\"${KEY_ID}\"\n"
```
```dotenv title="Example (regenerate these values!):"
ENCRYPTION_KEYS='[{"id": "TODO-change-me-unique-key-id-5cdda4c0-a16c-4ae2-8a16-aa2ff258530d", "key": "256 bit (32 byte) base64 encoded AES key", "cipher": "AES-GCM", "revoked": false}]'
DEFAULT_ENCRYPTION_KEY_ID="TODO-change-me-unique-key-id-5cdda4c0-a16c-4ae2-8a16-aa2ff258530d"
```
### Debug mode
Debug mode enables Django's debug toolbar and stack traces. Do not use debug mode in production environments.
```dotenv title="Example:"
DEBUG=off
```
### Browsable API
Enable the Django REST Framework browsable API interface for debugging and development purposes. The browsable API is enabled by default in debug mode.
```dotenv title="Example:"
ENABLE_BROWSABLE_API=off
```
### Allowed Hosts
Comma-separated allowed hostnames/domain names for this installation. This setting might resolve issues with failing WebSocket connections.
In production environments, `ALLOWED_HOSTS` must be set to your domain name(s). If left unset, any host header is accepted, which may expose your installation to security vulnerabilities.
```dotenv title="Example:"
ALLOWED_HOSTS="sysreptor.example.com,sysreptor.example.local"
```
### FIDO2/WebAuthn
If you want to use FIDO2/WebAuthn for MFA, you have to define the hostname ([WebAuthn Relying Party ID](https://www.w3.org/TR/webauthn-2/#relying-party-identifier)) of your installation.
```dotenv title="Example:"
MFA_FIDO2_RP_ID="sysreptor.example.com"
```
### License Key
License key for SysReptor Professional.
```dotenv title="Example:"
LICENSE="your-license-key"
```
### S3 Storage
Uploaded files and images can be stored in an S3 bucket. Files are stored on the filesystem in a docker volume by default. If data at rest encryption is configured, all uploaded files (incl. images) are encrypted.
`DEFAULT_S3_*` settings to apply to all file storages. It is possible to configure different settings per storage.
```dotenv title="Global storage configuration: store everything in S3 bucket"
DEFAULT_STORAGE="s3" # Default: "filesystem"
DEFAULT_S3_ACCESS_KEY="access-key"
DEFAULT_S3_SECRET_KEY="secret-key"
DEFAULT_S3_SESSION_TOKEN="session-token" # optional
DEFAULT_S3_BUCKET_NAME="bucket-name"
DEFAULT_S3_ENDPOINT_URL="endpoint-url"
```
```dotenv title="Uploaded file storage configuration"
UPLOADED_FILE_STORAGE="s3" # Default: "filesystem"
UPLOADED_FILE_S3_ACCESS_KEY="access-key"
UPLOADED_FILE_S3_SECRET_KEY="secret-key"
UPLOADED_FILE_S3_SESSION_TOKEN="session-token" # optional
UPLOADED_FILE_S3_BUCKET_NAME="bucket-name"
UPLOADED_FILE_S3_ENDPOINT_URL="endpoint-url"
UPLOADED_FILE_LOCATION="uploadedfiles"
```
```dotenv title="Uploaded image storage configuration"
UPLOADED_IMAGE_STORAGE="s3" # Default: "filesystem"
UPLOADED_IMAGE_S3_ACCESS_KEY="access-key"
UPLOADED_IMAGE_S3_SECRET_KEY="secret-key"
UPLOADED_IMAGE_S3_SESSION_TOKEN="session-token" # optional
UPLOADED_IMAGE_S3_BUCKET_NAME="bucket-name"
UPLOADED_IMAGE_S3_ENDPOINT_URL="endpoint-url"
UPLOADED_IMAGE_LOCATION="uploadedimages"
```
```dotenv title="Uploaded asset storage configuration"
UPLOADED_ASSET_STORAGE="s3" # Default: "filesystem"
UPLOADED_ASSET_S3_ACCESS_KEY="access-key"
UPLOADED_ASSET_S3_SECRET_KEY="secret-key"
UPLOADED_ASSET_S3_SESSION_TOKEN="session-token" # optional
UPLOADED_ASSET_S3_BUCKET_NAME="bucket-name"
UPLOADED_ASSET_S3_ENDPOINT_URL="endpoint-url"
UPLOADED_ASSET_LOCATION="uploadedasset"
```
Archived project files can also be uploaded to an S3 bucket. Archives are stored on the filesystem in a docker volume by default.
```dotenv title="Archived file storage configuratio"
ARCHIVED_FILE_STORAGE="s3" # Default: "filesystem"
ARCHIVED_FILE_S3_ACCESS_KEY="access-key"
ARCHIVED_FILE_S3_SECRET_KEY="secret-key"
ARCHIVED_FILE_S3_SESSION_TOKEN="session-token" # optional
ARCHIVED_FILE_S3_BUCKET_NAME="bucket-name"
ARCHIVED_FILE_S3_ENDPOINT_URL="endpoint-url"
ARCHIVED_FILE_LOCATION="archivedfiles"
```
### Emails
SysReptor sends emails for password resets. Configure the SMTP server to use for sending emails.
See https://docs.djangoproject.com/en/stable/ref/settings/#email-host
```dotenv title="Email settings"
EMAIL_HOST=mail.example.com
EMAIL_PORT=587
EMAIL_USE_TLS=on
EMAIL_HOST_USER=username
EMAIL_HOST_PASSWORD=password
DEFAULT_FROM_EMAIL=sysreptor@example.com
```
To test your email settings, you can run the following command:
```shell title="Send test email"
docker compose run --rm --no-TTY app python3 manage.py sendtestemail <your-email@example.com>
```
### Backup Key
The backup key is used for creating backups via the [web interface](/setup/backups#create-backups-via-web-interface) or the [REST API](/setup/backups#create-backups-via-api). The key should be random and must have 20 or more characters.\
Make sure this key remains secret.
```shell title="Generate random backup key:"
printf "BACKUP_KEY=$(openssl rand -base64 25 | tr -d '\n=')\n"
```
```dotenv title="Example (do not use this value!):"
BACKUP_KEY="WfyqYzRVZAOFbCtltYEFN36XBzRz6Ys6ZA"
```
Backup requests via the web interface or the REST API are long running requests that need to download a large backup file. These requests might be aborted when `gunicorn` server worker processes are restarted and the backup request exceeds the restart timeout. This timeout can be increased by setting the following value.
```dotenv title="Example:"
SERVER_WORKER_RESTART_TIMEOUT=3600 # 1 hour
```
### Reverse Proxy
Interpret `X-Forwarded-*` headers when SysReptor is behind a reverse proxy.
See also https://docs.djangoproject.com/en/stable/ref/settings/#use-x-forwarded-host
```dotenv
USE_X_FORWARDED_HOST=on
USE_X_FORWARDED_PORT=on
```
When SysReptor is accessible via HTTPS (recommended), use following setting to redirect all HTTP requests to HTTPS.
This flag also enables setting the `Secure` flag for cookies.
```dotenv
SECURE_SSL_REDIRECT=on
```
### Proxy Server
Set the proxy variables `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` to allow outbound connections using a proxy server.
```dotenv title="Example:"
HTTP_PROXY="http://192.168.0.111:8080"
HTTPS_PROXY="http://192.168.0.111:8080"
```
::: info The proxy server must be reachable from container
Make sure that the proxy server is reachable from inside your docker container.
Loopback addresses (e. g. `127.0.0.1`) or `localhost` will not work.
:::
### Custom CA Certificates
If your SysReptor is behind a proxy with a custom certificate, you can use this setting to specify your custom CA certificates.
```dotenv
CA_CERTIFICATES="-----BEGIN CERTIFICATE-----\nMIIDqDCCApCgAwIBAgIFAMjv7sswDQYJKoZIhv..."
```
### WebSockets
Disable WebSockets and always use HTTP fallback for collaborative editing.
This is not recommended because some features are only available with WebSockets and HTTP fallback has higher latency.
This setting sould only be activated if WebSockets are blocked by a firewall or not supported by a reverse proxy.
```dotenv title="Example:"
DISABLE_WEBSOCKETS=true
```
## Application Settings
 
Application settings can be configured in `app.env` or via the settings page in the web interface (stored in the database).
When a setting is configured both in `app.env` (environment varaible) and via the settings page (database), the value from `app.env` takes precedence.
Settings configured in `app.env` cannot be changed or overwridden via the web interface.
### Private Designs
Users without Designer permission can create and edit private designs that cannot be read or used by other users. If a pentest project is created using a private design, a copy of the private design becomes accessible by project members. Use this setting to enable private designs.
```dotenv title="Example:"
ENABLE_PRIVATE_DESIGNS=true
```
### Compress Images
Uploaded images are compressed to reduce file size, but to retain quality suitable for PDF files. Disable image compression using this setting.
```dotenv title="Example:"
COMPRESS_IMAGES=false
```
### PDF Rendering
It is possible to generate accessible PDFs in PDF/UA format.
Accessible PDFs can be read by screen readers and are compliant with accessibility standards.
Generating accessible PDFs is incompatible with PDF compression. If you enable accessible PDFs, PDF compression is automatically disabled.
```dotenv title="Example:"
GENERATE_ACCESSIBLE_PDFS=true
```
SysReptor limits the rendering time a PDF can take. If the rendering time exceeds the limit, the PDF render task is aborted. The default limit is 300 seconds (5 minutes).
If you experience slow PDF rendering, try to [optimize your design](/designer/debugging#slow-pdf-rendering) before increasing the limit.
```dotenv title="Example:"
PDF_RENDERING_TIME_LIMIT=300
```
### Sharing Settings
Notes can be shared with people who do not have a SysReptor account via public links. See [Notes](/reporting/notes) for how to create and manage share links.
These settings apply to the whole instance: you can turn off sharing completely, or require a password or read-only access on every shared link.
```dotenv title="Example:"
DISABLE_SHARING=false
SHARING_PASSWORD_REQUIRED=false
SHARING_READONLY_REQUIRED=false
```
### Languages
Configure which languages are available in the language selection.
By default all languages are shown.
When this setting is configured, only selected languages are shown.
All other languages are hidden.
This setting also defines the order of languages in the selection.
The first language is used as default.
```dotenv title="Example:"
PREFERRED_LANGUAGES="de-DE,en-US"
```
### Spell Check
You can add words to the spell check dictionary in the markdown editor (see https://docs.sysreptor.com/reporting/spell-check/).
Words are added to a global spell check dictionary by default, which is available to all users. If words should be added to user's personal spell check dictionaries, set this setting to `true`.
Using both global and personal dictionaries at the same time is not possible. Words of personal dictionaries are not shared between users. If one user adds an unknown word to their personal dictionary, the spell checker will still detect an error for other users, even when they are working in the same project or finding.
```dotenv title="Spell check dictionary configuration"
SPELLCHECK_DICTIONARY_PER_USER=false
```
The picky mode enables additional spell check rules.
It is also possible to selectively enable and disable rules or rule-categories by passing a LanguageTool configuration as JSON.
See https://languagetool.org/http-api/ for available options on the `/check` request.
See https://community.languagetool.org/rule/list for available rules (note: rule IDs might differ for languages).
```dotenv title="Spell check rule configuration"
SPELLCHECK_MODE_PICKY=true
SPELLCHECK_LANGUAGETOOL_CONFIG='{"disabledRules": "TODO,TO_DO_HYPHEN,PASSIVE_VOICE,PASSIVE_SENTENCE_DE"}'
```
### Archiving
Archived projects require at least `ARCHIVING_THRESHOLD` number of users to restore the archive (see https://docs.sysreptor.com/reporting/archiving/).
By default two users are required, enforcing a 4-eye principle.
If `ARCHIVING_THRESHOLD=1` every user is able to restore archived projects on their own, disabling the 4-eye principle.
Changing this setting does not affect previously archived projects.
```dotenv title="Example:"
ARCHIVING_THRESHOLD=2
```
If `PROJECT_MEMBERS_CAN_ARCHIVE_PROJECTS` is set to `true` (default), every project member can archive/restore a project.
Otherwise, only users with global archiver permission can archive/restore projects.
This means that encryption happens with fewer encryption keys and it will be more difficult to keep up the quorum (`ARCHIVING_THRESHOLD`) for restoring projects (this could lead to availability problems).
```dotenv title="Example:"
PROJECT_MEMBERS_CAN_ARCHIVE_PROJECTS=false
```
The process of archiving finished projects and deleting old projects can be automated by following settings. The values are time spans in days.
* `AUTOMATICALLY_ARCHIVE_PROJECTS_AFTER`: Finished projects are automatically archived X days after the project was finished (if possible). Re-activating the project resets the timer.
* `AUTOMATICALLY_DELETE_PROJECTS_AFTER`: Finished (and archived) projects are automatically assigned a delete date X days after the project was finished. The delete date can be customized per project or set to never delete. Re-activating or restoring preserved the delete date. Active projects are never deleted.
```dotenv title="Example:"
# Automatically archive finished projects after 3 months
AUTOMATICALLY_ARCHIVE_PROJECTS_AFTER=90
# Automatically delete finished (and archived) projects after 2 years
AUTOMATICALLY_DELETE_PROJECTS_AFTER=730
```
### Single Sign-On (SSO)
Configuration for SSO via OIDC. Find detailed instructions at https://docs.sysreptor.com/setup/oidc-setup/.
```dotenv title="OIDC example:"
OIDC_AUTHLIB_OAUTH_CLIENTS='{
"keycloak": {
"label": "Keycloak",
"client_id": "<client-id>",
"client_secret": "<client-secret>",
"server_metadata_url": "https://keycloak.example.com/realms/dev/.well-known/openid-configuration",
"client_kwargs": {
"scope": "openid email",
"code_challenge_method": "S256"
},
"reauth_supported": false,
"user_identifier_claim": "email",
"require_email_verified": true
}
}'
```
If your reverse proxy enforces authentication and provides the username via a HTTP-Header, use following settings to enable SSO.
```dotenv title="Remote-User example"
REMOTE_USER_AUTH_ENABLED=true
REMOTE_USER_AUTH_HEADER="Remote-User"
```
By default users can decide whether they want to log in via SSO or username/password. It is possible to globally disable login via username/password via this setting.
Make sure all users have SSO identities configured before enabling this option. Else they will not be able to log in anymore.
It is also possible to disable username/password login for specific users via the user management.
```dotenv title="Disable username/password authentication example"
LOCAL_USER_AUTH_ENABLED=false
```
Configuration of the default authentication provider when multiple authentication providers are enabled (e.g. OIDC via Microsoft Entra ID and username/password).
This setting will redirect users to the default authentication provider, skipping the selection. Other authentication providers can still be used if login via the default provider fails.
Possible values: `azure`, `google`, `remoteuser`, `local` (username/password authentication)
```dotenv title="Default authentication provider example"
DEFAULT_AUTH_PROVIDER="azure"
DEFAULT_REAUTH_PROVIDER="local"
```
### Local User Authentication
Local user authentication via username/password is enabled by default. Disable local user authentication to force users to use SSO.
```dotenv title="Example:"
LOCAL_USER_AUTH_ENABLED=true
FORGOT_PASSWORD_ENABLED=false
```
By enabling the `FORGOT_PASSWORD_ENABLED` option, users can reset their passwords via password-forgotten emails. This setting only takes effect if `ALLOWED_HOSTS` is set to a non-wildcard (`*`) value, `LOCAL_USER_AUTH_ENABLED=true` and email settings are configured.
### Guest User Permissions
Restrict capabilities of guest users.
```dotenv title="Example:"
GUEST_USERS_CAN_CREATE_PROJECTS=True
GUEST_USERS_CAN_IMPORT_PROJECTS=False
GUEST_USERS_CAN_EDIT_PROJECTS=True
GUEST_USERS_CAN_UPDATE_PROJECT_SETTINGS=True
GUEST_USERS_CAN_DELETE_PROJECTS=True
GUEST_USERS_CAN_SEE_ALL_USERS=False
GUEST_USERS_CAN_SHARE_NOTES=False
```
### AI Agent
Enable the AI Agent feature to assist with report writing and analysis.
The AI Agent can be enabled or disabled globally. When disabled, the AI Agent feature is not available to any users.
LLM models must be configured via `AI_AGENT_MODELS` before the feature can be used (see [LLM models](#llm-provider) below).
```dotenv title="Example:"
AI_AGENT_ENABLED=true
```
Customize the disclaimer text shown to users when they use the AI Agent feature.
```dotenv title="Example:"
AI_AGENT_DISCLAIMER="AI can make mistakes. Do not use without manual review."
```
Provide a custom system prompt to prime the AI Agent with specific instructions or context. This can be used to customize the behavior of the AI Agent for your organization's needs. This system prompt is appended to the default system prompt used by SysReptor.
```dotenv title="Example:"
AI_AGENT_SYSTEM_PROMPT='Customized system prompt.'
```
#### LLM models {#llm-models}
Configure LLM models for AI-assisted report writing and analysis.
SysReptor uses [LangChain](https://docs.langchain.com/) to interface with different LLM providers.
It is possible to use cloud-based LLM providers (e.g. OpenAI, Anthropic) as well as self-hosted LLMs (e.g. via VLLM).
The quality of the output strongly depends on the chosen LLM model. Smaller (e.g. self-hosted) models might perform worse than larger (cloud-based) models.
```json
AI_AGENT_MODELS='[
{
"id": "gpt-oss-120b",
"model": "gpt-oss-120b",
"api_key": "...",
"base_url": "https://llm.example.com/"
}
]'
```
Each entry describes one model. The first entry is the default model.
When multiple models are configured, users can select the model in the AI chat.
Model IDs and labels are exposed to all authenticated users; API keys and other secrets are not.
| Field | Description |
| --- | --- |
| `id` | Unique identifier used for model selection in SysReptor |
| `model` | Model name passed to LangChain (e.g. `gpt-5`, `claude-opus-4-8`) |
| `provider` | LangChain provider (e.g. `openai`, `anthropic`, `deepseek`, `mistralai`, `ollama`). Defaults to OpenAI-compatible provider (`deepseek`) |
| `api_key` | API key for the provider |
| `base_url` | API base URL (for OpenAI-compatible or custom endpoints) |
| `label` | Display name in the UI (defaults to `id`) |
| *other* | Additional model-specific LangChain parameters (e.g. `temperature`, `reasoning_effort`, etc.) |
Many LLM providers offer OpenAI-compatible APIs.
You can use the `openai` or `deepseek` provider to connect to OpenAI-compatible APIs by setting `base_url`.
The provider name refers to API format capability, not the specific LLM vendor.
LangChain's `deepseek` provider supports OpenAI-compatible APIs and parses reasoning outputs.
This enables displaying reasoning steps in the web interface.
The standard `openai` provider also works but omits reasoning content.
The `deepseek` provider has nothing to do with the Deepseek LLM vendor.
::: details LLM provider examples
**OpenAI-compatible** APIs with reasoning (e.g. LiteLLM, VLLM, OpenRouter, TogetherAI, DeepSeek, etc.)
```json
{
"id": "gpt-oss-120b",
"label": "GPT OSS 120B",
"provider": "deepseek",
"model": "gpt-oss-120b",
"api_key": "...",
"base_url": "https://llm.example.com:4000/"
}
```
**OpenAI**
```json
{
"id": "gpt-5",
"label": "GPT 5",
"provider": "openai",
"model": "gpt-5",
"api_key": "..."
}
```
**Anthropic**
```json title="Anthropic"
{
"id": "claude-opus-4-8",
"label": "Claude Opus 4.8",
"provider": "anthropic",
"model": "claude-opus-4-8",
"api_key": "..."
}
```
**Mistral AI**
```json
{
"id": "mistral-large",
"label": "Mistral Large",
"provider": "mistralai",
"model": "mistral-large-2512",
"api_key": "..."
}
```
**Ollama**
```json
{
"id": "llama3.1",
"label": "Llama 3.1",
"provider": "ollama",
"model": "llama3.1",
"api_key": "...",
"base_url": "https://llm.example.com/"
}
```
If your LLM provider is not listed above, you can use an LLM proxy like [LiteLLM](https://docs.litellm.ai/) or [OpenRouter](https://openrouter.ai/) that provides an OpenAI-compatible API.
Configure the proxy to connect to your LLM provider, then use the `deepseek` provider (as shown above) to connect SysReptor to the proxy.
This approach works with any LLM that your proxy supports and enables reasoning output display when available.
:::
To test your LLM settings, run:
```shell
docker compose run --rm app python3 manage.py aichat --agent=project_ask --user=<username> --project=<project-id>
```
### Custom Statuses
It is possible to define custom statuses for findings and sections.
In addition to the custom statuses the statuses `in-progress` and `finished` are always available.
By default, the statuses `ready-for-review` and `needs-improvement` are also available.
```dotenv title="Example:"
STATUS_DEFINITIONS='[
{"id": "ready-for-review", "label": "Ready for review", "icon": "mdi-check"},
{"id": "needs-improvement", "label": "Needs improvement", "icon": "mdi-exclamation-thick"},
]'
```
It is possible to enforce specific status transition workflows by defining which statuses can follow each status.
This is useful for implementing review processes where certain steps must be followed in order.
Use the `allowed_next_statuses` field to specify which statuses can be set after the current status.
When `allowed_next_statuses` is not defined or an empty list, any status transition is allowed.
To define a terminal status where no further transitions are allowed, set `allowed_next_statuses` to the current status.
Status transitions for built-in statuses (`in-progress`, `finished`) can also be restricted by defining them in `STATUS_DEFINITIONS`.
Please note that `in-progress` is always the initial status and `finished` should be the last status.
```dotenv title="Example: Linear workflow"
STATUS_DEFINITIONS='[
{"id": "in-progress", "label": "In progress", "icon": "mdi-pencil", "allowed_next_statuses": ["ready-for-review"]},
{"id": "ready-for-review", "label": "Ready for review", "icon": "mdi-check", "allowed_next_statuses": ["needs-improvement", "finished"]},
{"id": "needs-improvement", "label": "Needs improvement", "icon": "mdi-exclamation-thick", "allowed_next_statuses": ["ready-for-review"]},
{"id": "finished", "label": "Finished", "icon": "mdi-check-all", "allowed_next_statuses": ["finished"]}
]'
```
Note: `allowed_next_statuses` is not enforced for [superusers with enabled admin permissions](/users/user-permissions#superuser). This is to allow administrators to fix incorrect status assignments if necessary.
### Plugins
Extend the functionality of SysReptor by enabling plugins. Plugins are disabled by default and need to be explicitly enabled.
Enable plugins in the application settings page in the web interface by ticking plugin enabled checkboxes.
You can also manage plugins via the environment variable `ENABLED_PLUGINS` in `app.env`.
`ENABLED_PLUGINS` is a comma separated list of plugin names or plugin IDs.
If `ENABLED_PLUGINS` is set in `app.env`, it takes precedence and the Settings UI will be read-only for plugin enable/disable.
```dotenv title="Example:"
ENABLED_PLUGINS="cyberchef,graphqlvoyager,checkthehash"
```
Some plugins require additional configuration. These plugin settings are configured as separate entries in `app.env` or via the settings page in the web interface.
Please refer to the plugin documentation for more information on available plugin setting.
---
---
url: 'https://docs.sysreptor.com/setup/webserver.md'
---
# Setup Webserver
The Django webserver is not recommended due to missing transport encryption, missing performance and security tests.\
We recommend a webserver like Caddy, [nginx](/setup/webserver-nginx) or Apache and to enable https.
## Easy setup with Caddy (recommended) {#caddy}
You can run `setup.sh` in `deploy/caddy` to set up an additional Docker container with Caddy as a webserver.
```
bash deploy/caddy/setup.sh
```
### Optional: LetsEncrypt HTTPS certificate
If you want Caddy to take care of your LetsEncrypt certificate, you must set up:
1. a valid domain name resolving to your public IP address
2. port 80 of your must be publicly reachable
---
---
url: 'https://docs.sysreptor.com/setup/updates.md'
---
# Updates
We recommend to create a [backup](/setup/backups) of your installation before updating.
::: tabs
\== Update via Script (recommended)
We deliver the shell script `update.sh` in the `sysreptor` directory.
If updates are available, the script downloads the release from GitHub. It replaces your Docker images by the newest release and restarts all containers.
Your current SysReptor directory will be renamed for backup purposes. The script will download the newer version and place it into the directory where the old version was.
It will then copy your `app.env`, `.env`, `docker-compose.yml` and if present the `Caddyfile` to the correct locations of your newer version. The new SysReptor version launched and the docker images of your old verions are cleaned up.
```shell title="Run update script:"
bash sysreptor/update.sh
```
Using the `--backup` switch, a SysReptor backup will be created prior to the update. The update will fail if the backup fails.
```shell title="Run update script:"
bash sysreptor/update.sh --backup
```
Please make sure to monitor your disk space and clean up old backups, as automatic backups might increase disk usage significantly.
\== Manual update
Download and extract the latest SysReptor release:
```shell
curl -s -L --output sysreptor.tar.gz https://github.com/syslifters/sysreptor/releases/latest/download/setup.tar.gz
tar xzf sysreptor.tar.gz
```
Copy the following files from your old installation to the new installation.
* `deploy/app.env`
* `deploy/docker-compose.yml`
* `deploy/caddy/Caddyfile` (optional, if present)
Copy the contents of your `deploy/.env` file to the new installation. Make sure to keep the new version number intact and don't replace it by the old version number.
`cd` to `sysreptor/deploy` and launch the containers:
```shell
docker compose up -d
```
:::
::: details Optional: Verify docker images
```shell
SYSREPTOR_VERSION=$(cat sysreptor/deploy/.env | grep 'SYSREPTOR_VERSION=' | cut -d'=' -f2-)
# SYSREPTOR_VERSION=$(docker exec -it sysreptor-app bash -c 'echo "$VERSION"')
# Verify setup.tar.gz
curl -s -L --output sysreptor.tar.gz.sigstore.json https://github.com/syslifters/sysreptor/releases/${SYSREPTOR_VERSION}/download/setup.tar.gz.sigstore.json
cosign verify-blob sysreptor.tar.gz --key https://docs.sysreptor.com/cosign.pub --bundle sysreptor.tar.gz.sigstore.json
# Verify docker images
cosign verify --key https://docs.sysreptor.com/cosign.pub "syslifters/sysreptor:${SYSREPTOR_VERSION}"
cosign verify --key https://docs.sysreptor.com/cosign.pub "syslifters/sysreptor-languagetool:${SYSREPTOR_VERSION}" # Pro only
```
:::
Find instructions how to [downgrade](/setup/downgrades) to previous versions.
## Recommended: Automatic updates
We recommend to deploy automatic updates and run the script once per day. This ensures you receive updates early.
If `cron` is not installed, install and start:
```shell
sudo apt update
sudo apt install -y cron
sudo systemctl start cron
#sudo /etc/init.d/cron start
```
Open `crontab`:
```shell
crontab -e
```
Schedule your update, e.g. every day at midnight:
```shell
0 0 * * * /bin/bash /home/yourpath/sysreptor/update.sh # Optional (pro only): --backup
```
Make sure your user has write permissions to the parent directory of your SysReptor directory. In this example, you need write permissions to `/home/yourpath/`.
---
---
url: 'https://docs.sysreptor.com/setup/backups.md'
---
# Backups
## Create backups via CLI
Backups can be created via a CLI command or an API request.
The backup archive contains a database export and all uploaded files.
Execute following command to create a backup:
```shell title="Create backup via CLI"
docker compose run --rm app python3 manage.py backup > backup.zip
```
Backups can be encrypted using a 256-bit AES key.
Specify the key as hex string via the `--key` CLI argument.
```shell title="Create encrypted backup via CLI"
docker compose run --rm app python3 manage.py backup --key="<aes-key-as-hex>" > backup.zip.crypt
```
To avoid exposing the key in the process list (e.g. interactive use), pass `--key=-` to enter the hex key from the terminal without echo:
```shell title="Create encrypted backup with key from terminal"
docker compose run --rm -it app python3 manage.py backup --key=- > backup.zip.crypt
```
## Create a backup during update
When [updating](/setup/updates) SysReptor, you can use the `--backup` switch, which will create a backup before applying the update.
## Create backups via web interface
 · 
Users with [`superuser` permissions](/users/user-permissions#superuser) and access to the [`BACKUP_KEY`](/setup/configuration#backup-key) can create backups using the web interface.
If no [`BACKUP_KEY`](/setup/configuration#backup-key) is configured, you cannot create backups via the web interface.
## Create backups via API
 · 
Users with [`superuser` permissions](/users/user-permissions#superuser) and [`system` users](/users/user-permissions#system) can [create backups via the API](https://demo.sysre.pt/api/public/utils/swagger-ui/#/v1/v1_utils_backup_create) in combination with the configured [`BACKUP_KEY`](/setup/configuration#backup-key).