Apologies in advance if this question seems stupid to someone, I am a beginner. Can someone please let me know how do I download a file from my instance? I need to download an sqlite file which is on the disk of my instance. Any sh command?
Unfortunately, it is not possible out of the box. You can generally set up AWS S3 or a similar cloud storage service.
If you need to download a file only once, you could post the file to another location using curl, remote ssh or expose the file in the server.
How to Download Files from Your Koyeb Instance (Simple & Effective Method)
If you’re running a Flask or Python app on a service like Koyeb and can’t modify the running app to expose a file download route, here’s a simple workaround I used to zip my current directory and upload it to Gofile.io or File .io for downloading.
Step 0: Navigate to Your Instance Console
Log in to Koyeb Dashboard →
Go to your running app → Click (console) to open a live terminal session inside your instance.
This is where you’ll run the following commands.
Step 1: Create zipcwd.py to Zip Your Files
Use this echo command to quickly create the Python script:
bash
CopyEdit
echo "import os, zipfile
def zip_current_dir(output='cwd.zip'):
base = os.getcwd()
files = [f for f in os.listdir(base) if os.path.isfile(f)]
print(f'Zipping {len(files)} files from current directory...')
with zipfile.ZipFile(output, 'w', zipfile.ZIP_DEFLATED) as zipf:
for i, f in enumerate(files, 1):
zipf.write(f)
print(f'[{i}/{len(files)}] Zipped: {f}')
if __name__ == '__main__':
zip_current_dir()" > zipcwd.py
Run the script:
bash
CopyEdit
python zipcwd.py
This will generate a cwd.zip file with all files in your current directory.