Compare commits
No commits in common. "9abd361c7f72c5fb4948d6e8b6e0ce6dd75d64d1" and "4bbed566004e9e793233074574e76d427d6ccc32" have entirely different histories.
9abd361c7f
...
4bbed56600
29
README.md
29
README.md
@ -1,6 +1,6 @@
|
||||
# UpFast
|
||||
|
||||
Simple tool for uploading and sharing files that you can self-host.
|
||||
simple tool for uploading and sharing files that is selfhostable.
|
||||
|
||||
## How to host
|
||||
|
||||
@ -15,27 +15,28 @@ We will also be setting up an specific user to run the app as safe as possible w
|
||||
sudo useradd --shell /bin/bash --system \
|
||||
--home-dir "/usr/local/upfast" -m upfast
|
||||
|
||||
# Change to upfast user and go to upfast dir
|
||||
# Change to upfast user and cd /usr/local/upfast
|
||||
su upfast
|
||||
cd
|
||||
cd /usr/local/upfast
|
||||
|
||||
# Clone the project directly into upfast-src directory
|
||||
git clone https://code.cronyakatsuki.xyz/crony/upfast .
|
||||
git clone https://code.cronyakatsuki.xyz/crony/upfast upfast-src
|
||||
|
||||
# Create the virtual environment and load it for user on default
|
||||
python3 -m venv venv
|
||||
echo "source /usr/local/upfast/venv/bin/activate" > "/usr/local/upfast/.profile"
|
||||
|
||||
# Activate the virtual environment
|
||||
source venv/bin/activate
|
||||
# Install all the requirements
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Load environment by default
|
||||
echo "source /usr/local/upfast/venv/bin/activate" > "/usr/local/upfast/.profile"
|
||||
# Install all the requirements
|
||||
cd upfast-src/
|
||||
pip install -r requirements.txt
|
||||
|
||||
# create the upload directory
|
||||
mkdir upload
|
||||
|
||||
# UpFast go brrr
|
||||
# Run the project
|
||||
uvicorn main:app --host 127.0.0.1 --port 8000 --proxy-headers --forwarded-allow-ips='*'
|
||||
```
|
||||
|
||||
@ -51,18 +52,12 @@ Documentation=https://code.cronyakatsuki.xyz/crony/upfast
|
||||
[Service]
|
||||
User=upfast
|
||||
Group=upfast
|
||||
WorkingDirectory=/usr/local/upfast/
|
||||
WorkingDirectory=/usr/local/upfast/upfast-src
|
||||
ExecStart=/usr/local/upfast/venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000 --proxy-headers --forwarded-allow-ips='*'
|
||||
Restart=on-failure
|
||||
```
|
||||
Finally run following commmands.
|
||||
|
||||
```
|
||||
# refresh services
|
||||
`sudo systemctl daemon-reload`
|
||||
# enable the service
|
||||
`sudo systemctl enable upfast.service`
|
||||
```
|
||||
Then just run `sudo systemctl daemon-reload` and enable the service with `sudo systemctl enable upfast.service`
|
||||
|
||||
### Docker
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user