There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Good foss app to run a simple http server from a directory?

i found one on fdroid but it was old and the directory selector was broken and couldn’t really work outside of it’s default for some reason, it also rendered the page i’m trying to use really weirdly, like it wasn’t sending some file over and the css got borked.

Found one that wasn’t foss, installed it, opened it, “buy premium to unlock this feature”, uninstalled it.

fievel , (edited )

I use SimpleHttp server but it’s not open source and available only on play store. I use this to download epub from my e-reader after having downloaded them on my phone. Now I will look into foss solutions proposed in this Post, through termux or other apps, thanks.

Edit: indeed with termux + caddy + termux widget it’s just perfect

unrushed233 ,

Does it have to be http? If FTP is ok too, you can try primitive ftpd, or the built-in FTP feature in Material Files or Amaze.

KeepFlying ,

Sorry I don’t have any suggestions, but I’m very curious about your use case. What led you to needing this?

Are you doing web dev with just a phone? Impressive

nicknonya OP ,
@nicknonya@lemmy.blahaj.zone avatar

thankfully no, i’m just trying to run a Twine game on it

TheFederatedPipe ,

I recently wanted to do the same and came upon ShareX, it did a pretty good job.

GitHub
F-Droid

moonpiedumplings ,

I just use termux + the simple http server built into python

Mucki ,

Install termux from f-droid. Then install nginx inside termux. Works great.

taaz ,

I’ve been using FX File Browser for the occasional need to share stuff localy - it opens a local web server where you can browse files on the phone.
Though it’s not foss and I am afraid that functionality is behind the plus version.

aodhsishaj ,

could try a flask webapp


<span style="color:#323232;">
</span><span style="color:#323232;">from flask import Flask, send_from_directory
</span><span style="color:#323232;">import os
</span><span style="color:#323232;">
</span><span style="color:#323232;">app = Flask(__name__)
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Specify the directory you want to share
</span><span style="color:#323232;">SHARED_DIRECTORY = 'shared_files'
</span><span style="color:#323232;">
</span><span style="color:#323232;">@app.route('/files/<path:filename>', methods=['GET'])
</span><span style="color:#323232;">def get_file(filename):
</span><span style="color:#323232;">    """Serve a file from the shared directory."""
</span><span style="color:#323232;">    try:
</span><span style="color:#323232;">        return send_from_directory(SHARED_DIRECTORY, filename)
</span><span style="color:#323232;">    except FileNotFoundError:
</span><span style="color:#323232;">        return "File not found", 404
</span><span style="color:#323232;">
</span><span style="color:#323232;">@app.route('/')
</span><span style="color:#323232;">def list_files():
</span><span style="color:#323232;">    """List files in the shared directory."""
</span><span style="color:#323232;">    files = os.listdir(SHARED_DIRECTORY)
</span><span style="color:#323232;">    files_list = 'n'.join(files)
</span><span style="color:#323232;">    return f"<h1>Files in {SHARED_DIRECTORY}</h1>{files_list}"
</span><span style="color:#323232;">
</span><span style="color:#323232;">if __name__ == '__main__':
</span><span style="color:#323232;">    app.run(host='0.0.0.0', port=5000)
</span>
abominable_panda ,

Just did a search on fdroid

Servdroid looks 11 years old

LWS is about 5 which might still work

If you really need a web server you can possibly run one on termux, not sure if root required though

If its just file sharing, see the other comment

bjoern_tantau ,
@bjoern_tantau@swg-empire.de avatar

Not open source but CX File Explorer can make an FTP server for you.

abominable_panda ,

Amaze and Material Files are open source and can create an ftp server

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines