# Enabling webserver on edge agent

**URL:** <https://forums.losant.com/t/enabling-webserver-on-edge-agent/3175>\
**Category:** Help\
**Tags:** edge\
**Created:** [August 4, 2020, 8:03pm UTC](https://forums.losant.com/t/enabling-webserver-on-edge-agent/3175 "2020-08-04T20:03:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [August 4, 2020, 8:03pm UTC](https://forums.losant.com/t/enabling-webserver-on-edge-agent/3175/1 "2020-08-04T20:03:29Z")

</div>

I’m a bit confused turning on the webserver on the edge agent.

Do I have to add the -p 8080:8080 statement in the docker run command, AND setting config file to: [webserver] enabled and port 8080 ?

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [August 4, 2020, 9:01pm UTC](https://forums.losant.com/t/enabling-webserver-on-edge-agent/3175/3 "2020-08-04T21:01:42Z")

</div>

@Lars_Andersson,

That is correct, but you do not need to add the port to the config file. You can check out our [Edge Agent Usage documentation](https://docs.losant.com/edge-compute/edge-agent-usage/#webserver-http-request-trigger--http-response-node) where we have some great instruction on how to enable the webserver option of the Edge Agent as well as other options for use.

So, just to reiterate, you are correct that you will need to add `-p 8080:8080` to the `docker run` command. You can read more about the `-p`, or publish option [in Docker’s documentation](https://docs.docker.com/config/containers/container-networking/) for other Container Networking information.

You will also need to add the following to your config file:

```auto
[webserver]
enabled = true

```

Thank you,  
Heath
