diff --git a/api/example.env b/api/example.env
index 88ad929..d23bd53 100644
--- a/api/example.env
+++ b/api/example.env
@@ -22,8 +22,6 @@ PHOTOVIEW_UI_ENDPOINT=http://localhost:1234/
 
 # Set to 1 for the server to also serve the built static ui files
 PHOTOVIEW_SERVE_UI=0
-# When PHOTOVIEW_SERVE_UI is 1, PHOTOVIEW_PUBLIC_ENDPOINT is used instead of PHOTOVIEW_API_ENDPOINT and PHOTOVIEW_UI_ENDPOINT
-#PHOTOVIEW_PUBLIC_ENDPOINT=http://localhost:4001/
 
 # Enter a valid mapbox token, to enable maps feature
 # A token can be created for free at https://mapbox.com
diff --git a/api/server.go b/api/server.go
index 4b6dec0..287d55e 100644
--- a/api/server.go
+++ b/api/server.go
@@ -117,6 +117,8 @@ func main() {
 
 		if uiEndpoint := utils.UiEndpointUrl(); uiEndpoint != nil {
 			log.Printf("Photoview UI public endpoint ready at %s\n", uiEndpoint.String())
+		} else {
+			log.Println("Photoview UI public endpoint ready at /")
 		}
 
 		if !shouldServeUI {
diff --git a/api/utils/Endpoints.go b/api/utils/Endpoints.go
index cf542b7..021be41 100644
--- a/api/utils/Endpoints.go
+++ b/api/utils/Endpoints.go
@@ -45,43 +45,37 @@ func ApiListenUrl() *url.URL {
 }
 
 func ApiEndpointUrl() *url.URL {
-	apiEndpointStr := EnvAPIEndpoint.GetValue()
+	var apiEndpointStr string
 
 	shouldServeUI := ShouldServeUI()
 	if shouldServeUI {
-		apiEndpointStr = EnvPublicEndpoint.GetValue()
-		if apiEndpointStr == "" {
-			apiEndpointStr = "/"
-		}
+		apiEndpointStr = "/"
+	} else {
+		apiEndpointStr = EnvAPIEndpoint.GetValue()
 	}
 
-	apiEndpointUrl, err := url.Parse(apiEndpointStr)
+	apiEndpointURL, err := url.Parse(apiEndpointStr)
 	if err != nil {
 		log.Fatalf("ERROR: Environment variable %s is not a proper url (%s)", EnvAPIEndpoint.GetName(), EnvAPIEndpoint.GetValue())
 	}
 
 	if shouldServeUI {
-		apiEndpointUrl.Path = path.Join(apiEndpointUrl.Path, "/api")
+		apiEndpointURL.Path = path.Join(apiEndpointURL.Path, "/api")
 	}
 
-	return apiEndpointUrl
+	return apiEndpointURL
 }
 
 func UiEndpointUrl() *url.URL {
-	uiEndpointStr := EnvUIEndpoint.GetValue()
-
 	shouldServeUI := ShouldServeUI()
 	if shouldServeUI {
-		uiEndpointStr = EnvPublicEndpoint.GetValue()
-		if uiEndpointStr == "" {
-			return nil
-		}
+		return nil
 	}
 
-	uiEndpointUrl, err := url.Parse(uiEndpointStr)
+	uiEndpointURL, err := url.Parse(EnvUIEndpoint.GetValue())
 	if err != nil {
 		log.Fatalf("ERROR: Environment variable %s is not a proper url (%s)", EnvUIEndpoint.GetName(), EnvUIEndpoint.GetValue())
 	}
 
-	return uiEndpointUrl
+	return uiEndpointURL
 }
diff --git a/api/utils/environment_variables.go b/api/utils/environment_variables.go
index c846abf..32c75d0 100644
--- a/api/utils/environment_variables.go
+++ b/api/utils/environment_variables.go
@@ -15,11 +15,10 @@ const (
 
 // Network related
 const (
-	EnvListenIP       EnvironmentVariable = "PHOTOVIEW_LISTEN_IP"
-	EnvListenPort     EnvironmentVariable = "PHOTOVIEW_LISTEN_PORT"
-	EnvAPIEndpoint    EnvironmentVariable = "PHOTOVIEW_API_ENDPOINT"
-	EnvUIEndpoint     EnvironmentVariable = "PHOTOVIEW_UI_ENDPOINT"
-	EnvPublicEndpoint EnvironmentVariable = "PHOTOVIEW_PUBLIC_ENDPOINT"
+	EnvListenIP    EnvironmentVariable = "PHOTOVIEW_LISTEN_IP"
+	EnvListenPort  EnvironmentVariable = "PHOTOVIEW_LISTEN_PORT"
+	EnvAPIEndpoint EnvironmentVariable = "PHOTOVIEW_API_ENDPOINT"
+	EnvUIEndpoint  EnvironmentVariable = "PHOTOVIEW_UI_ENDPOINT"
 )
 
 // Database related
diff --git a/docker-compose.example.yml b/docker-compose.example.yml
index 43696e7..bb0d58f 100644
--- a/docker-compose.example.yml
+++ b/docker-compose.example.yml
@@ -27,11 +27,6 @@ services:
       - PHOTOVIEW_LISTEN_PORT=80
       - PHOTOVIEW_MEDIA_CACHE=/app/cache
 
-      # Change This: The publicly exposed url
-      # For example if the server is available from the domain example.com,
-      # change this value to http://example.com/
-      - PHOTOVIEW_PUBLIC_ENDPOINT=http://localhost:8000/
-
       # Optional: To enable map related features, you need to create a mapbox token.
       # A token can be generated for free here https://account.mapbox.com/access-tokens/
       # It's a good idea to limit the scope of the token to your own domain, to prevent others from using it.
@@ -40,7 +35,7 @@ services:
     volumes:
       - api_cache:/app/cache
 
-      # Change this to the directory where your photos are located on your server.
+      # Change This: to the directory where your photos are located on your server.
       # If the photos are located at `/home/user/photos`, then change this value
       # to the following: `/home/user/photos:/photos:ro`.
       # You can mount multiple paths, if your photos are spread across multiple directories.
