A scenario is one complete routing setup: a named set of proxy rules that says, for every port PacsSwitch listens on, where the traffic goes. Keep one scenario for each way you route, for example Primary/Production and Backup/Contingency, and switch between them by activating one.
Where scenarios are kept
Each scenario is a text file (.conf) in <data folder>\nginx\conf\profiles, for example Starter_1_Primary.conf. The list in the main window shows the scenario names, which come from the # NAME: line inside each file, so the file name and the name can differ. Names must be unique; PacsSwitch refuses a copy, a save or an import that would repeat one.
When a scenario is activated, PacsSwitch copies it to active_rules.conf, which is what the proxy runs. Choose Active config (live, read-only) in the Type list of the main window to see that file exactly as the proxy uses it.
Creating and organizing scenarios
| Button | What it does |
|---|---|
| NEW | Creates a scenario from the template, named New_<date-time>.conf, with one example rule and email turned off. Open it with Guided Edit to give it a name, a description and your rules. |
| COPY | Copies the selected scenario and asks for the new name. The quickest way to start a variation, and the safe way to change the active scenario (below). |
| MOVE UP / MOVE DOWN | Changes the order of the list. The order is only for your convenience. |
| RENAME | Renames the scenario's file. To change the name shown in the list, use Guided Edit. |
| DELETE | Deletes the scenario's file permanently, after asking. It warns you when a scheduled change still switches to this scenario. Make a backup first (BACKUP / RESTORE) if you may want it again. |
RENAME and DELETE are not available for the active scenario.
Editing a scenario
Most changes are made with Guided Edit, a form that writes the file for you and checks it before saving. ADV. EDIT lets you change the text directly, for settings the form does not cover: click it, edit the text, then click SAVE, or CANCEL to throw the changes away. Guided Edit keeps any lines it does not understand exactly as written.
Guided Edit copies the previous version of the file to <data folder>\backups\scenario_edits before it saves.
Changing the active scenario
The active scenario is read-only, so live routing never changes half-way through an edit. To change it:
- Select the active scenario and click COPY.
- Edit the copy and test it.
- Activate the copy.
- Watch the traffic in Query Port Status and Connection History to make sure it works.
- Delete the original.
Testing a scenario
TEST SCENARIO asks the proxy service to check the selected scenario's syntax, without activating it. Right-click the button and choose Test Scenario and Send Email to also send the scenario's notification email, which checks the email settings at the same time.
To test the routing itself before it goes live, use the PacsSwitch Test Sender and Test Listener on a test server.
Activating a scenario
Select the scenario and click ACTIVATE SCENARIO, then confirm. PacsSwitch then:
- Runs the pre-flight check (below). If it finds problems, it lists them and asks whether to continue anyway.
- Applies the scenario: copies it to
active_rules.confand reloads the proxy. Open connections finish where they started; new connections use the new rules. Routing never stops. - Checks Windows Firewall for ports that are new, and offers to open them.
- Sends the notification email, when the scenario has email turned on.
- Updates the status page and the title bar, and writes
# Activated on <date>at the top of the scenario. The scenario it replaced gets# Deactivated on <date>.
The pre-flight check
| Problems (probably stop the proxy or the traffic) | Warnings |
|---|---|
|
|
A destination that does not answer is only a warning, because a PACS may be down for maintenance when you switch to it. The same check runs before the service or proxy starts.
Reading a scenario file
# Scenario Configuration
# Activated on 2026-10-29 11:38:47
# NAME: Primary/Production
# DESCRIPTION: PACS Traffic is sent to Velloria Comprehensive Health's Primary/Production PACS Servers
# SEND EMAIL NOTIFICATION: TRUE
# PROXY RULE NAME: Radiology Dicom Store
server { listen 12001 so_keepalive=on; proxy_pass 192.168.86.50:12001; }
# NOTIFICATION_SENDER: dtrs-alerts@yourcompany.com
# NOTIFICATION_RECIPIENT: Team@VelloriaComprehensiveHealth.com
# NOTIFICATION_SUBJECT: {{HOSTNAME}}: [DTRS Alert] {{NAME}} - {{EVENT}}
# NOTIFICATION_BODY:
# Scenario: {{NAME}} - {{DESCRIPTION}}
| Lines | Meaning |
|---|---|
# Activated on, # Edited on, # Created on | Written by PacsSwitch: when the scenario was last activated, saved or created. |
# NAME, # DESCRIPTION | The name in the list, title bar, status page and emails, and a note for other administrators. |
# SEND EMAIL NOTIFICATION | TRUE sends the notification email when the scenario is activated, started or stopped. |
# PROXY RULE NAME and server { ... } | One proxy rule: the name, then the port to listen on and the destination. Rules with access control or other settings take several lines. |
# NOTIFICATION_... | The email: sender, recipients, subject and body, with variables such as {{NAME}} and {{EVENT}} (the full list is in Guided Edit). |
Related pages
- Guided Edit
- Scheduled scenario changes
- The main window
- First setup: your first scenario, the service and the status page
This page was revised 2026-10-30.