Skip to main content
Contributor
July 21, 2005

Technical Tip: How to properly shut down or reboot a FortiGate

  • July 21, 2005
  • 0 replies
  • 71322 views
Description This article describes best practices for shutting down or rebooting a FortiGate.
Scope FortiGate.
Solution

Always shut down the FortiGate operating system properly before turning off the power switch to avoid potential hardware problems.

 

To power off or restart a FortiGate unit correctly, follow the steps:

  1. From the GUI, go to the top right and select the 'admin' User Login -> System -> Shutdown or Reboot, and then select OK to proceed:

 

Screenshot_1.png

 

From the CLI, execute one of the following commands depending on whether it is necessary to perform a shutdown or reboot of the device: 

 

execute shutdown

execute reboot

 

Shutting down

 

  1. In the case of a shutdown, once the shutdown has been performed via GUI or CLI, it is possible to safely turn off the power switch or disconnect the power cables from the power supply.

     

Schedule the shutdown or reboot at a specific time:

Where needed, the automated schedule action for firewall shutdown or reboot can be defined using the following automation stitch:

config system automation-action
    edit "Shutdown"
        set action-type cli-script
        set script "exec shutdown" (or in case of reboot: set script "exec reboot")
        set accprofile "super_admin"
     next
end


config system automation-trigger

    edit "Automatic_shutdown"

        set trigger-type scheduled
        set trigger-hour "xx" <- 'xx' is the hour of the time to schedule the script action.
        set trigger-minute "yy" <- 'yy' is the minute to schedule the script action.

 next

end

 

config system automation-stitch

    edit "Automatic_shutdown"
        set trigger "Automatic_shutdown"
            config actions
                edit 1
                    set action "Shutdown"

                    set required enable
                next

            end
    next

end

 

To configure the schedule for shutdown or reboot from the GUI, go to Security Fabric -> Automation and configure 'Action', 'Trigger', and 'Stitch' as below:

Screenshot_2.png

 

In the case of a reboot, the only difference is to write in the 'Script' field: execute reboot.

 

Screenshot_3.png

 

Screenshot_4.png

 

Note:

It is necessary to define the trigger hour and trigger minute. The requirement and the command will be executed based on the firewall time. Check the firewall date and time with the following command:


execute date
execute time 

 

It is also possible to program daily restarts for the FortiGate. It can only be set with the CLI command below (example):

 

config system global 
    set daily-restart enable 
    set restart-time 05:06
 
Note: 
FortiGate devices support different methods to stop or restart the system. Selecting the correct method is important to ensure system stability, configuration integrity, and to avoid unintended service interruptions.
 
Recommended system power actions:

Graceful Shutdown:

  • Command: execute shutdown.

  • When to use it:

    • Physical maintenance or hardware replacement.

    • Relocating the device.

    • Planned long downtime.

  • Why is it recommended:

    • Safely stops all running processes.

    • Ensures the file system and configuration database are properly closed before power is removed.

System reboot:

  • Command: execute reboot.

  • When to use:

  • Applying configuration changes:

    • Completing firmware upgrades.
    • Restoring normal operation after maintenance.
  •  
  • Why is it recommended:

    • Gracefully restarts services.

    • Preserves system integrity and configuration data.

Power cycle:

  • Method: Physically disconnecting and reconnecting the power source.

  • When to use:

    • Last resort only, when the system is completely unresponsive.

    • No access is available via GUI, SSH, or console.

  • Important considerations:

    • May interrupt active processes.

    • Can lead to file system corruption or incomplete write operations.

 

Note:

If the reason for the reboot is part of a troubleshooting process, it is recommended to back up the configuration before rebooting or shutting down, in case something goes wrong and the appliance does not start up properly.
After an unexpected power outage, be sure to gracefully reboot the FortiGate through the GUI or CLI to ensure configuration and services load and function correctly. This can prevent or recover unexpected issues/behaviour from happening post power outage.

 

Related articles: