# Planned internal webserver?

**URL:** <https://discourse.pi-hole.net/t/planned-internal-webserver/57353>\
**Category:** beta\
**Created:** [August 26, 2022, 7:57pm UTC](https://discourse.pi-hole.net/t/planned-internal-webserver/57353 "2022-08-26T19:57:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmaster](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tmaster/32/8389_2.png) [@tmaster](https://discourse.pi-hole.net/u/tmaster)\
**Post date:** [August 26, 2022, 7:57pm UTC](https://discourse.pi-hole.net/t/planned-internal-webserver/57353/1 "2022-08-26T19:57:31Z")

</div>

I see this [Add HTTP server and JSON API by DL6ER · Pull Request #659 · pi-hole/FTL · GitHub](https://github.com/pi-hole/FTL/pull/659)

# Add HTTP server and JSON API

Not sure if this is a side project or to be merged into the main release.

And wanted to make everyone aware we use lighttpd for other projects at the same time. For me it runs a local webserver virtual radar and dump1090 If your going to add a internal webserver it needs to support being on another port and be compatible with lighttpd running at the same time.. Used to use apache but after installing pi hole lighttpd works much better and uses less memory on the pi. Please dont break everything. And btw it would be nice if pihole didn't keep erasing my lighttpd port configs on reinstalls.

---

<div class="post-metadata">

**Author:** ![tomporter518](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tomporter518/32/3504_2.png) [@tomporter518](https://discourse.pi-hole.net/u/tomporter518)\
**Post date:** [August 26, 2022, 8:44pm UTC](https://discourse.pi-hole.net/t/planned-internal-webserver/57353/2 "2022-08-26T20:44:52Z")

</div>

I use lighttpd for things other than pi-hole as well. To maintain your custom port, you can use an external.conf file in the /etc/lighttpd folder. If your lighttpd version is new enough you can use the syntax:  
`replace : NAME := VALUE (replace/overwrite earlier value) (since 1.4.46)`,  
like  
`server.port := 8080` to override the pi-hole supplied value from the lighttpd.conf.

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [August 26, 2022, 9:38pm UTC](https://discourse.pi-hole.net/t/planned-internal-webserver/57353/4 "2022-08-26T21:38:04Z")

</div>

> [@tmaster](#):
>
> it needs to support being on another port

> <https://github.com/pi-hole/FTL/blob/98dad054f562d46f482fd5116dcbc6f332451df6/src/config/toml_writer.c#L179>

We'll have the port user configurable.

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [August 26, 2022, 10:06pm UTC](https://discourse.pi-hole.net/t/planned-internal-webserver/57353/5 "2022-08-26T22:06:20Z")

</div>

> [@tmaster](#):
>
> btw it would be nice if pihole didn't keep erasing my lighttpd port configs on reinstalls.

Please note the prominent warning in the lighttpd configuration file:

```auto
###############################################################################
# FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE. #
# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
# #
# CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE: #
# /etc/lighttpd/external.conf #
###############################################################################

```

As another user pointed out, you can make a permanent and non-conflicting port change in file _ **/etc/lighttpd/external.conf** _.

There is an existing feature request for our installer to be aware of existing lighttpd installs.

> [@Option to select a web port number at install time](https://discourse.pi-hole.net/t/option-to-select-a-web-port-number-at-install-time/10715):
>
> It would be very convenient to be able to specify a port number for the Pi-Hole web interface at install time. I need to save port 80 for a conventional web server.
