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.

  • Mucki@feddit.org
    link
    fedilink
    English
    arrow-up
    5
    ·
    5 months ago

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

  • DontTakeMySky@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    5 months ago

    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

  • taaz@biglemmowski.win
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    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.

  • abominable_panda@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    5 months ago

    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

  • aodhsishaj@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    5 months ago

    could try a flask webapp

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