How To Install Langflow on Ubuntu Without Docker
Installing Langflow on an Ubuntu machine without Docker requires setting up installing dependencies manually. Follow these steps:
1. Update System Packages
sudo apt update && sudo apt upgrade -y
2. Install Dependencies
Langflow requires Python and other system libraries.
sudo apt install python3 python3-venv python3-pip build-essential -y
3. Install Langflow
pip install --break-system-packages langflow
4. Create setting file
Create an envioment file
sudo nano .env
Add the settings to the file
LANGFLOW_ENABLE_LOG_RETRIEVAL=true
LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000
LANGFLOW_LOG_LEVEL=DEBUG
LANGFLOW_AUTO_LOGIN=True
5. Create a Systemd Service
To run Langflow as a background service:
Create a new service file:
sudo nano /etc/systemd/system/langflow.service
Add the following content:
[Unit]
Description=Langflow Service
After=network.target
[Service]
User=harry
EnvironmentFile=/home/harry/.env
ExecStart=/usr/bin/python3 -m langflow run --host 0.0.0.0 --port 8000
Restart=always
[Install]
WantedBy=multi-user.target
(Replace username harry with your actual username if different.)
Reload systemd and enable the service:
sudo systemctl daemon-reload
sudo systemctl enable langflow
sudo systemctl start langflow
Check the service status:
sudo systemctl status langflow
Now Langflow should be running on your Ubuntu machine without Docker on port 8000. Using a web browser navigate to http://<server_ip_address>:8000