From server.properties:

1

First Step

2

Second Step

Select your Server

3

Third Step

Make sure to turn OFF the server.

4

Fourth Step

Under the General Section, Click the Files tab

5

Fifth Step

Click the server.properties file

6

Sixth Step

Scroll down to till you see difficulty=[value] and edit the [value] to your prefered difficulty (peaceful, easy, normal or hard) and hit the Save Content button

7

Seventh Step

Now, Head to the Console tab and hit Start

There you go! You’ve now learned how to change difficulty!