Skip to content

Commit b773513

Browse files
fix: replace instances of 127.0.0.1 to localhost (langflow-ai#8536)
* Replace instances of 127.0.0.1 to localhost * fix some replace-all issues * fix some replace-all issues * update starterprojects * Upgrade uvlock
1 parent 5c38d02 commit b773513

33 files changed

+4024
-5751
lines changed

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The service will start, and you will may notice a dialog in the lower right indi
5353
│ We collect anonymous usage data to improve Langflow. │
5454
│ To opt out, set: DO_NOT_TRACK=true in your environment. │
5555
│ │
56-
│ 🟢 Open Langflow → http://127.0.0.1:7860 │
56+
│ 🟢 Open Langflow → http://localhost:7860 │
5757
╰───────────────────────────────────────────────────────────────────────╯
5858
```
5959

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ LANGFLOW_DATABASE_CONNECTION_RETRY=false
3232
LANGFLOW_LANGCHAIN_CACHE=SQLiteCache
3333

3434
# Server host
35-
# Example: LANGFLOW_HOST=127.0.0.1
35+
# Example: LANGFLOW_HOST=localhost
3636
LANGFLOW_HOST=
3737

3838
# Worker processes

.github/workflows/python_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ jobs:
138138
if: steps.check-version.outputs.skipped == 'false'
139139
run: |
140140
source new-venv/bin/activate
141-
python -m langflow run --host 127.0.0.1 --port 7860 --backend-only &
141+
python -m langflow run --host localhost --port 7860 --backend-only &
142142
SERVER_PID=$!
143143
# Wait for the server to start
144-
timeout 120 bash -c 'until curl -f http://127.0.0.1:7860/api/v1/auto_login; do sleep 5; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
144+
timeout 120 bash -c 'until curl -f http://localhost:7860/api/v1/auto_login; do sleep 5; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
145145
# Terminate the server
146146
kill $SERVER_PID || (echo "Failed to terminate the server" && exit 1)
147147
sleep 20 # give the server some time to terminate

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ jobs:
9696
mkdir src/backend/base/dist
9797
mv dist/*.whl src/backend/base/dist
9898
uv pip install src/backend/base/dist/*.whl
99-
uv run python -m langflow run --host 127.0.0.1 --port 7860 --backend-only &
99+
uv run python -m langflow run --host localhost --port 7860 --backend-only &
100100
SERVER_PID=$!
101101
# Wait for the server to start
102-
timeout 120 bash -c 'until curl -f http://127.0.0.1:7860/api/v1/auto_login; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
102+
timeout 120 bash -c 'until curl -f http://localhost:7860/api/v1/auto_login; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
103103
# Terminate the server
104104
kill $SERVER_PID || (echo "Failed to terminate the server" && exit 1)
105105
sleep 20 # give the server some time to terminate
@@ -177,10 +177,10 @@ jobs:
177177
- name: Test CLI
178178
run: |
179179
uv pip install dist/*.whl
180-
uv run python -m langflow run --host 127.0.0.1 --port 7860 --backend-only &
180+
uv run python -m langflow run --host localhost --port 7860 --backend-only &
181181
SERVER_PID=$!
182182
# Wait for the server to start
183-
timeout 120 bash -c 'until curl -f http://127.0.0.1:7860/health_check; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
183+
timeout 120 bash -c 'until curl -f http://localhost:7860/health_check; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
184184
# Terminate the server
185185
kill $SERVER_PID || (echo "Failed to terminate the server" && exit 1)
186186
sleep 20 # give the server some time to terminate

.github/workflows/release_nightly.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ jobs:
111111
mkdir src/backend/base/dist
112112
mv dist/*.whl src/backend/base/dist/
113113
uv pip install src/backend/base/dist/*.whl
114-
uv run python -m langflow run --host 127.0.0.1 --port 7860 --backend-only &
114+
uv run python -m langflow run --host localhost --port 7860 --backend-only &
115115
SERVER_PID=$!
116116
# Wait for the server to start
117-
timeout 120 bash -c 'until curl -f http://127.0.0.1:7860/api/v1/auto_login; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
117+
timeout 120 bash -c 'until curl -f http://localhost:7860/api/v1/auto_login; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
118118
# Terminate the server
119119
kill $SERVER_PID || (echo "Failed to terminate the server" && exit 1)
120120
sleep 20 # give the server some time to terminate
@@ -188,10 +188,10 @@ jobs:
188188
- name: Test CLI
189189
run: |
190190
uv pip install dist/*.whl
191-
uv run python -m langflow run --host 127.0.0.1 --port 7860 --backend-only &
191+
uv run python -m langflow run --host localhost --port 7860 --backend-only &
192192
SERVER_PID=$!
193193
# Wait for the server to start
194-
timeout 120 bash -c 'until curl -f http://127.0.0.1:7860/health_check; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
194+
timeout 120 bash -c 'until curl -f http://localhost:7860/health_check; do sleep 2; done' || (echo "Server did not start in time" && kill $SERVER_PID && exit 1)
195195
# Terminate the server
196196
kill $SERVER_PID || (echo "Failed to terminate the server" && exit 1)
197197
sleep 20 # give the server some time to terminate

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Once the application is running, the command output should look similar to:
7777
│ We collect anonymous usage data to improve Langflow. │
7878
│ To opt out, set: DO_NOT_TRACK=true in your environment. │
7979
│ │
80-
│ 🟢 Open Langflow → http://127.0.0.1:7860 │
80+
│ 🟢 Open Langflow → http://localhost:7860 │
8181
╰───────────────────────────────────────────────────────────────────────╯
8282
```
8383

docs/docs/API-Reference/api-reference-api-examples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem';
99
This page provides examples and practices for managing Langflow using the Langflow API.
1010

1111
The Langflow API's OpenAPI spec can be viewed and tested at your Langflow deployment's `docs` endpoint.
12-
For example, `http://127.0.0.1:7860/docs`.
12+
For example, `http://localhost:7860/docs`.
1313

1414
## Export values
1515

@@ -18,10 +18,10 @@ You might find it helpful to set the following environment variables in your ter
1818
The examples in this guide use environment variables for these values.
1919

2020
- Export your Langflow URL in your terminal.
21-
Langflow starts by default at `http://127.0.0.1:7860`.
21+
Langflow starts by default at `http://localhost:7860`.
2222

2323
```bash
24-
export LANGFLOW_URL="http://127.0.0.1:7860"
24+
export LANGFLOW_URL="http://localhost:7860"
2525
```
2626

2727
- Export the `flow-id` in your terminal.

docs/docs/Components/components-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ When a **Webhook** component is added to the workspace, a new **Webhook cURL** t
268268

269269
```bash
270270
curl -X POST \
271-
"http://127.0.0.1:7860/api/v1/webhook/**YOUR_FLOW_ID**" \
271+
"http://localhost:7860/api/v1/webhook/**YOUR_FLOW_ID**" \
272272
-H 'Content-Type: application/json'\
273273
-d '{"any": "data"}'
274274
```

docs/docs/Components/components-embedding-models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ For a list of Ollama embeddings models, see the [Ollama documentation](https://o
420420
To use this component in a flow, connect Langflow to your locally running Ollama server and select an embeddings model.
421421

422422
1. In the Ollama component, in the **Ollama Base URL** field, enter the address for your locally running Ollama server.
423-
This value is set as the `OLLAMA_HOST` environment variable in Ollama. The default base URL is `http://127.0.0.1:11434`.
423+
This value is set as the `OLLAMA_HOST` environment variable in Ollama. The default base URL is `http://localhost:11434`.
424424
2. To refresh the server's list of models, click <Icon name="RefreshCw" aria-label="Refresh"/>.
425425
3. In the **Ollama Model** field, select an embeddings model. This example uses `all-minilm:latest`.
426426
4. Connect the **Ollama** embeddings component to a flow.

docs/docs/Components/components-io.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ To send the same example messages programmatically to your Langflow server, do t
211211
It looks similar to this:
212212
```text
213213
curl --request POST \
214-
--url 'http://127.0.0.1:7860/api/v1/run/51eed711-4530-4fdc-9bce-5db4351cc73a?stream=false' \
214+
--url 'http://localhost:7860/api/v1/run/51eed711-4530-4fdc-9bce-5db4351cc73a?stream=false' \
215215
--header 'Content-Type: application/json' \
216216
--data '{
217217
"input_value": "What's the recommended way to install Docker on Mac M1?",
@@ -226,7 +226,7 @@ Note the `output_type` and `input_type` parameters that are passed with the mess
226226
4. Add a custom `session_id` to the message's `data` object.
227227
```text
228228
curl --request POST \
229-
--url 'http://127.0.0.1:7860/api/v1/run/51eed711-4530-4fdc-9bce-5db4351cc73a?stream=false' \
229+
--url 'http://localhost:7860/api/v1/run/51eed711-4530-4fdc-9bce-5db4351cc73a?stream=false' \
230230
--header 'Content-Type: application/json' \
231231
--data '{
232232
"input_value": "Whats the recommended way to install Docker on Mac M1",
@@ -246,7 +246,7 @@ A new chat session called `docker-question-on-m1` has appeared, using your uniqu
246246
For example, disabling storing messages from the **Chat Input** component adds a **Tweak** to your command:
247247
```text
248248
curl --request POST \
249-
--url 'http://127.0.0.1:7860/api/v1/run/51eed711-4530-4fdc-9bce-5db4351cc73a?stream=false' \
249+
--url 'http://localhost:7860/api/v1/run/51eed711-4530-4fdc-9bce-5db4351cc73a?stream=false' \
250250
--header 'Content-Type: application/json' \
251251
--data '{
252252
"input_value": "Text to input to the flow",

0 commit comments

Comments
 (0)