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

ButtonWhat it does
NEWCreates 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.
COPYCopies 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 DOWNChanges the order of the list. The order is only for your convenience.
RENAMERenames the scenario's file. To change the name shown in the list, use Guided Edit.
DELETEDeletes 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:

  1. Select the active scenario and click COPY.
  2. Edit the copy and test it.
  3. Activate the copy.
  4. Watch the traffic in Query Port Status and Connection History to make sure it works.
  5. Delete the original.
Do not activate your backup scenario just to free the active one for editing: that sends the traffic to the Backup PACS in the meantime.

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:

  1. Runs the pre-flight check (below). If it finds problems, it lists them and asks whether to continue anyway.
  2. Applies the scenario: copies it to active_rules.conf and reloads the proxy. Open connections finish where they started; new connections use the new rules. Routing never stops.
  3. Checks Windows Firewall for ports that are new, and offers to open them.
  4. Sends the notification email, when the scenario has email turned on.
  5. 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>.
Recording: Backup/Contingency is selected and activated in the main window; afterwards the title bar and the scenario title show it as the active scenario.

The pre-flight check

Problems (probably stop the proxy or the traffic)Warnings
  • A rule's listen port is missing or not valid.
  • Two rules listen on the same port.
  • The port is used by the status page or by another program (named, with its process ID).
  • The port is held by an old Windows port proxy rule, probably left from DTRS v3.
  • The listen address is not one of this server's addresses.
  • A destination is neither an address with a port nor an upstream group.
  • The proxy service rejects the scenario's syntax.
  • A destination does not answer right now (checked for 3 seconds).
  • The scenario has no proxy rules.
  • A test of a listen address failed for another reason.

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}}
LinesMeaning
# Activated on, # Edited on, # Created onWritten by PacsSwitch: when the scenario was last activated, saved or created.
# NAME, # DESCRIPTIONThe name in the list, title bar, status page and emails, and a note for other administrators.
# SEND EMAIL NOTIFICATIONTRUE 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

This page was revised 2026-10-30.


← The main windowGuided Edit →