FlexPort is a distributed web-based file manager that allows you to:
- Browse and manage files in your system
- Transfer files via FTP/SFTP
- Upload files from URLs
- Monitor file transfer sessions
- Direct file operations: Upload, download, and delete files
- Server-to-server transfers: Transfer files from FTP and SFTP servers
- URL-based uploads: Download files from URLs to your server
- Transfer monitoring: Track all file transfer operations
- User authentication: Secure access using PAM authentication
- Modern UI: Responsive interface with list and tile views
Prerequisites:
- Docker and Docker Compose installed on your system
Steps:
-
Clone the repository to your server:
git clone https://github.com/yourusername/flexport.git cd flexport
-
Create the Docker configuration files in the project root:
backend-dockerfile
for the backendfrontend-dockerfile
for the frontenddocker-compose.yml
for orchestration
-
Start the application:
docker compose up -d
-
Access the application at
http://yourserver:3000
Prerequisites:
- Python 3.12+
Steps:
-
Install dependencies:
cd backend uv venv .venv source .venv/bin/activate uv pip install -r requirements.txt
-
Run the server:
uvicorn main:app --host 0.0.0.0 --port 8009 --reload
Prerequisites:
- Node.js 18+
- npm
Steps:
-
Install dependencies:
cd frontend npm install
-
For development:
npm run dev
-
For production:
npm run build
Then serve the
dist
directory with a web server like nginx.
Use this method to run FlexPort as a system service:
-
Copy the project to
/opt/flexport
:sudo cp -r flexport/ /opt/
-
Install the systemd service file:
sudo cp flexport.service /etc/systemd/system/
-
Enable and start the service:
sudo systemctl daemon-reload sudo systemctl enable flexport sudo systemctl start flexport
-
Check the service status:
sudo systemctl status flexport
To test the FTP/SFTP functionality:
-
Set up a test FTP server:
- For quick testing, you can use
pyftpdlib
:pip install pyftpdlib python -m pyftpdlib -p 21
- For quick testing, you can use
-
Configure your test credentials:
- Host:
localhost
(or your server IP) - Username: (as configured on your FTP server)
- Password: (as configured on your FTP server)
- Port: 21 for FTP, 22 for SFTP
- Host:
-
Test file transfers:
- Create a test directory with sample files
- Try to browse and download these files using FlexPort
- Monitor the session progress in the Sessions panel
-
JWT Secret Key:
- Always change the default JWT secret key in production
- Set it as an environment variable in
.env
file or Docker configuration
-
CORS Configuration:
- Restrict CORS to only trusted domains in the production environment
-
Run as Non-root User:
- When using the systemd service, consider running as a non-root user with appropriate permissions
-
Secure the API Endpoints:
- Add rate limiting to prevent brute force attacks
- Consider adding IP-based restrictions for sensitive endpoints
-
Authentication Fails:
- Ensure the user exists on the system
- Check PAM configuration
- Verify permissions
-
File Operations Fail:
- Check file and directory permissions
- Ensure the service has access to the requested paths
-
FTP/SFTP Connection Issues:
- Verify the host is reachable (try ping or telnet)
- Check credentials and port settings
- Ensure the server allows the requested operations
-
When running with systemd, check logs with:
journalctl -u flexport
-
In Docker, check logs with:
docker logs flexport-backend docker logs flexport-frontend
Contributions are welcome! Here are some current areas for improvement:
- Add comprehensive test suite
- Enhance security features
- Implement file search functionality
- Add file preview for common formats
- Improve drag and drop interface
FlexPort is licensed under the MIT License. See the LICENSE file for details.