External Webserver Basics - webbukkit/dynmap GitHub Wiki

This page assumes

  • You are reasonably experienced with the standalone web server you are using.
  • You have the standalone web server and CraftBukkit running on the same machine.
  • Your Web Server supports PHP. (Only needed for web-to-Minecraft chat)
  • If you are on Linux, you should know how to use the terminal and chmod.

Step 1: Disable the internal updating mechanism in plugins/dynmap/configuration.txt

To disable the internal updating mechanism and enable the json-file updating mechanism. This will write to the file standalone/dynmap_world.json in your web-path at an interval that is specified with writeinterval. Change the following: (line 42 untill 75)

  - class: org.dynmap.InternalClientUpdateComponent
    sendhealth: true
    sendposition: true
    allowwebchat: true
    webchat-interval: 5
    hidewebchatip: false
    trustclientname: false
    includehiddenplayers: false
    # (optional) if true, color codes in player display names are used
    use-name-colors: false
    # (optional) if true, player login IDs will be used for web chat when their IPs match
    use-player-login-ip: true
    # (optional) if use-player-login-ip is true, setting this to true will cause chat messages not matching a known player IP to be ignored
    require-player-login-ip: false
    # (optional) block player login IDs that are banned from chatting
    block-banned-player-chat: true
    # Require login for web-to-server chat (requires login-enabled: true)
    webchat-requires-login: false
    # If set to true, users must have dynmap.webchat permission in order to chat
    webchat-permissions: false
    # Limit length of single chat messages
    chatlengthlimit: 256
  #  # Optional - make players hidden when they are inside/underground/in shadows (#=light level: 0=full shadow,15=sky)
  #  hideifshadow: 4
  #  # Optional - make player hidden when they are under cover (#=sky light level,0=underground,15=open to sky)
  #  hideifundercover: 14
  #  # (Optional) if true, players that are crouching/sneaking will be hidden 
    hideifsneaking: false
    # If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
    protected-player-info: false
    # If true, hide players with invisibility potion effects active
    hide-if-invisiblity-potion: true
    # If true, player names are not shown on map, chat, list
    hidenames: false
  #- class: org.dynmap.JsonFileClientUpdateComponent
  #  writeinterval: 1
  #  sendhealth: true
  #  sendposition: true
  #  allowwebchat: true
  #  webchat-interval: 5
  #  hidewebchatip: false
  #  includehiddenplayers: false
  #  use-name-colors: false
  #  use-player-login-ip: false
  #  require-player-login-ip: false
  #  block-banned-player-chat: true
  #  hideifshadow: 0
  #  hideifundercover: 0
  #  hideifsneaking: false
  #  # Require login for web-to-server chat (requires login-enabled: true)
  #  webchat-requires-login: false
  #  # If set to true, users must have dynmap.webchat permission in order to chat
  #  webchat-permissions: false
  #  # Limit length of single chat messages
  #  chatlengthlimit: 256
  #  hide-if-invisiblity-potion: true
  #  hidenames: false

To:

  #- class: org.dynmap.InternalClientUpdateComponent
   # sendhealth: true
   # sendposition: true
   # allowwebchat: true
   # webchat-interval: 5
   # hidewebchatip: false
   # trustclientname: false
   # includehiddenplayers: false
   # # (optional) if true, color codes in player display names are used
   # use-name-colors: false
   # # (optional) if true, player login IDs will be used for web chat when their IPs match
   # use-player-login-ip: true
   # # (optional) if use-player-login-ip is true, setting this to true will cause chat messages not matching a known player IP to be ignored
   # require-player-login-ip: false
   # # (optional) block player login IDs that are banned from chatting
   # block-banned-player-chat: true
   # # Require login for web-to-server chat (requires login-enabled: true)
   # webchat-requires-login: false
   # # If set to true, users must have dynmap.webchat permission in order to chat
   # webchat-permissions: false
   # # Limit length of single chat messages
   # chatlengthlimit: 256
   # # Optional - make players hidden when they are inside/underground/in shadows (#=light level: 0=full shadow,15=sky)
   # hideifshadow: 4
   # # Optional - make player hidden when they are under cover (#=sky light level,0=underground,15=open to sky)
   # hideifundercover: 14
   # # (Optional) if true, players that are crouching/sneaking will be hidden 
   # hideifsneaking: false
   # # If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
   # protected-player-info: false
   # # If true, hide players with invisibility potion effects active
   # hide-if-invisiblity-potion: true
   # # If true, player names are not shown on map, chat, list
   # hidenames: false
  - class: org.dynmap.JsonFileClientUpdateComponent
    writeinterval: 1
    sendhealth: true
    sendposition: true
    allowwebchat: true
    webchat-interval: 5
    hidewebchatip: false
    includehiddenplayers: false
    use-name-colors: false
    use-player-login-ip: false
    require-player-login-ip: false
    block-banned-player-chat: true
    hideifshadow: 0
    hideifundercover: 0
    hideifsneaking: false
  #  # Require login for web-to-server chat (requires login-enabled: true)
    webchat-requires-login: false
  #  # If set to true, users must have dynmap.webchat permission in order to chat
    webchat-permissions: false
  #  # Limit length of single chat messages
    chatlengthlimit: 256
    hide-if-invisiblity-potion: true
    hidenames: false

do not uncomment the comments, these will have two #'s in front of the configuration line. These lines are only to explain the option and will break your config if they are uncommented.

Step 2: Disable the internal webserver

To disable the internal webserver change the following line (340).

# Disables Webserver portion of Dynmap (Advanced users only)
disable-webserver: false

To:

# Disables Webserver portion of Dynmap (Advanced users only)
disable-webserver: true

Step 3: Copying files to your webserver and change paths

Copy your files in plugins/dynmap/web to a directory of your webserver. Change configuration.txt so that it points with both tilespath and webpath to the paths where you placed the web-files. For *nix based systems:

# The path where the tile-files are placed.
tilespath: /path/to/web/server/dynmap/web/tiles

# The path where the web-files are located.
webpath: /path/to/web/server/dynmap/web

Or for Windows

# The path where the tile-files are placed.
tilespath: c:\\path\\to\\web\\server\\dynmap\\web\\tiles

# The path where the web-files are located.
webpath: c:\\path\\to\\web\\server\\dynmap\\web

Step 4: apply configuration changes.

Now restart your Minecraft server. Join your Minecraft server and place a few blocks (randomly) to trigger dynmap to generate tiles for your map. You can also type dynmap fullrender worldname in your server console to render the whole world with the name worldname.

Now refresh your browser. It should now display online players on http://mywebserver/dynmap/, keeping them up-to-date.

Troubleshooting

If you don't see any tiles on the map, check the tiles directory to see whether they get actually generated. If there are no tiles, it is likely that Minecraft does not have rights to write the tiles in the web-path directory your chose. Another possibility is that you have not filled in tilespath correctly.

If you don't see any players or don't see the players moving, go to http://mywebserver/standalone/dynmap_world.json (where world is the name of your world). You should see some code and hitting refresh every few seconds should change that code (the servertime should be updated). If this file is not there or you don't see the file changing, you likely have filled in the wrong webpath in the configuration.

In Linux, if web-to-mc-chat does not work, you also need to chmod the 'standalone' folder to 77x choose any of the following and try the next one if the one you chose doesn't work:

$ chmod -R 770 standalone

770 symbolic | rwxrwx--- user | read, write and execute group | read, write and execute others | no permission

774 symbolic | rwxrwxr-- user | read, write and execute group | read, write and execute others | read

775 symbolic | rwxrwxr-- user | read, write and execute group | read, write and execute others | read, write

777 symbolic | rwxrwxr-- user | read, write and execute group | read, write and execute others | read, write and execute

generally "$ chmod -R 770 standalone" should do fine, only use the others if you know what you are doing. If the command isn't working try "$ chmod 770 -R standalone" instead.

This is to allow sendmessage.php to create the jsonfile. This is needed because its your Web Server creating the file and not the minecraft server.

If web-to-mc-chat does not work on IIS, you likely need to install PHP.