rejetto / hfs

HFS is a web file server to run on your computer. Share folders or even a single file thanks to the virtual file system.
GNU General Public License v3.0
2.29k stars 227 forks source link

Does HFS3 works on VM Ubuntu 20.04 ARM? #342

Closed accnetdev closed 1 year ago

accnetdev commented 1 year ago

Hi, My internet box (freebox) provide VM support but they are ARM based not X86. Any chance to get HFS3 working on this?

Cheers.

rejetto commented 1 year ago

i can consider making an executable for linux-arm, but did you try this? https://github.com/rejetto/hfs#other-systems

accnetdev commented 1 year ago

No I have not tried, I am going to try it and will inform you in this thread.

Thanks and congratulations for HFS2 and HFS3, these are really great software I use a lot.

accnetdev commented 1 year ago

On a 20.04 ARM :

$ sudo systemctl daemon-reload && sudo systemctl enable hfs && sudo systemctl start hfs && sudo systemctl status hfs ● hfs.service - HFS Loaded: loaded (/etc/systemd/system/hfs.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Thu 2023-09-14 13:54:49 UTC; 33ms ago Process: 3744845 ExecStart=/usr/bin/npx -y hfs@latest (code=exited, status=203/EXEC) Main PID: 3744845 (code=exited, status=203/EXEC)

sept. 14 13:54:49 fbxvmpdb systemd[1]: hfs.service: Main process exited, code=exited, status=203/EXEC sept. 14 13:54:49 fbxvmpdb systemd[1]: hfs.service: Failed with result 'exit-code'.


On a 22.04 X86 (an ESX VM at work) :

A system service is running, but I don't know how to get Admin Panel. Where is the yaml file to configure, sorry I don't know how nodejs or npx works?

The output sudo systemctl daemon-reload && sudo systemctl enable hfs && sudo systemctl start hfs && sudo systemctl status hfs Created symlink /etc/systemd/system/multi-user.target.wants/hfs.service → /etc/systemd/system/hfs.service. ● hfs.service - HFS Loaded: loaded (/etc/systemd/system/hfs.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2023-09-14 15:45:32 CEST; 12ms ago Main PID: 7968 (node) Tasks: 1 (limit: 9360) Memory: 1.9M CPU: 3ms CGroup: /system.slice/hfs.service └─7968 node /usr/bin/npx -y hfs@latest

sept. 14 15:45:32 infoip8 systemd[1]: Started HFS.

accnetdev commented 1 year ago

npm was missing after it is install on the ARM VM 20.04 :

sudo systemctl daemon-reload && sudo systemctl enable hfs && sudo systemctl start hfs && sudo systemctl status hfs ● hfs.service - HFS Loaded: loaded (/etc/systemd/system/hfs.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2023-09-14 14:22:42 UTC; 82ms ago Main PID: 3777005 (node) Tasks: 1 (limit: 8827) Memory: 164.0K CGroup: /system.slice/hfs.service └─3777005 node /usr/bin/npx -y hfs@latest

sept. 14 14:22:42 fbxvmpdb systemd[1]: Started HFS.

The service is now working on the ARM VM and on the X86 VM, but my problem is to get the Admin GUI and the config.yaml file to configure HFS3. It is the first time is try to use HFS3 under linux X86 or ARM. Please help.

rejetto commented 1 year ago

this is how you can configure https://github.com/rejetto/hfs#configuration

you are in the case where you cannot browse localhost with your browser, and neither access the console (because you running as a service). I modified installation instructions for a case like yours: https://github.com/rejetto/hfs#installation You are already at step 4. As you can see you are left with 2 options. Please let me know if it's clear enough, otherwise we can try to improve instructions.

rejetto commented 1 year ago

if you have an idea on how to make it easier, please let me know

accnetdev commented 1 year ago

Sorry not enough clear to me.

the browser should automatically open on localhost address, so you can configure the rest in the Admin-panel. if a browser cannot be opened on the computer where you are installing HFS, you should enter this command in HFS console: create-admin I HAVE NO CONSOLE NOT AN OPTION if you are running as a service and cannot access the console, your best option is to stop it, launch it at command line (not as a service), and follow previous instruction. I KNOW HOW TO STOP THE SERVICE, BUT HOW TO LAUNCH HFS AT COMMAND LINE? I TRIED /usr/bin/npx -y hfs@latest IT DOES NOT WORK. if you can never access the console, even with the previous instructions, you can edit config file add add your admin account WHAT IS THE NAME (config.yaml?) AND WHERE IS STORED THE CONFIG FILE If you access Admin-panel via localhost, by default HFS won't require you to login. If you don't like this behavior, disable it in the Admin-panel or enter this console command config localhost_admin false.

AT THE MOMENT I CAN'T LAUNCH HFS, I WILL HELP YOU TO TEST/IMPROVE WHEN IT WILL WORK ;-)

rejetto commented 1 year ago

I TRIED /usr/bin/npx -y hfs@latest IT DOES NOT WORK.

never say "does not work" without specify what happens ;-)

WHAT IS THE NAME (config.yaml?) AND WHERE IS STORED THE CONFIG FILE

yes, the information is reported in the homepage. I will see to copy it in the other document as well, for easier retrieval https://github.com/rejetto/hfs#where-is-it-stored so, the answer is USER_FOLDER/.hfs/config.yaml

accnetdev commented 1 year ago

Yes, it ask for a parameter.

/usr/bin/npx -y hfs@latest

ERREUR : Vous devez fournir une commande. Exécutez des binaires à partir de paquets npm. npx [options] [@version] [arguments-de-la-commande]... npx [options] [-p|--package ]... [arguments-de-la-commande]... npx [options] -c '<chaîne-de-caractères-de-la-commande>' npx --shell-auto-fallback [shell]

Options: --package, -p Paquet à installer. [chaîne de caractères] --cache Chemin où est situé le cache de npm. [chaîne de caractères] --always-spawn Always spawn a child process to execute the command. [booléen] --no-install Passer l'installation si un paquet est manquant. [booléen] --userconfig Chemin du fichier npmrc de l'utilisateur(-trice). [chaîne de caractères] --call, -c Exécuter la chaine de caractère comme avec npm run-script. [chaîne de caractères] --shell, -s Shell à utiliser pour exécuter la commande, s'il y en a un. [chaîne de caractères] [défaut : false] --shell-auto-fallback Générer le code du shell pour utiliser npx comme solution de rechange à "command not found". [chaîne de caractères] [choix : "", "bash", "fish", "zsh"] --ignore-existing Ignorer les binaires dans le $PATH ou dans le projet local. Cela force npm à réaliser une installation temporaire et à utiliser la dernière version. [booléen] --quiet, -q Supprimer la sortie générée par npx. Les sous-commandes ne seront pas affectées. [booléen] --npm Binaire de npm à utiliser pour les opérations internes. [chaîne de caractères] [défaut : "/usr/share/npm/bin/npm-cli.js"] --node-arg, -n Extra node argument when calling a node binary. [chaîne de caractères] --version, -v Affiche le numéro de version [booléen] --help, -h Affiche l'aide [booléen] Pour la documentation complète, consultez la page du manuel pour npx(1).


I do not find .hfs folder, I know that the . (dot) means it is hidden, but there are no .hfs in my user folder or root folder...

rejetto commented 1 year ago

ERREUR : Vous devez fournir une commande.

something seems wrong with your node.js installation. see what node -v prints. you need at least version 16, possibly 18.

you don't find the folder because you never executed hfs successfully , or so it seems

rejetto commented 1 year ago

closed as stale

accnetdev commented 10 months ago

Hi, On the ARM VM, node -v get v10.19.0 You said: "you don't find the folder because you never executed hfs successfully , or so it seems" but how to execute hfs when you don't know where is installed the executable?

rejetto commented 10 months ago

ok, so you have v10, but I wrote that you need 16. Actually is 18 at the moment.

accnetdev commented 10 months ago

On this topic, the version of nodejs is OK and I have the same behaviour.

https://github.com/rejetto/hfs/issues/423