### services.yml configuration example Source: https://folderhost.org/docs/services Example YAML configuration for FolderHost services, including a Minecraft server and a PHP web server. It shows how to enable services, set RAM limits, auto-start/restart, and define user permissions. Note that services configuration cannot be changed via the webpanel and requires a server restart. ```yaml enable_services: true # Don't forget to enable it if you're going to use them. services: # Here are some example services. You can also create your own service. - title: "Minecraft Server" workdir: "./host/mcserver" # Where you want to run this script. # Script to start the service. Make sure to not use shellscripts for that. # Because It's not safe if it's located in host folder. script: "java -Xmx4G -jar server.jar nogui" ram: "4 GB" # RAM limit - also supports MB and KB (e.g., "720 MB") auto_start: true # Auto start with folderhost auto_restart: false # Do you want auto restart after crash or something? allow_executing_commands: true # You can disable it for security. # UsePTY Linux only: Enables pseudo-terminal for interactive apps. # Required for terminal features to work properly. use_pty: false users: # users that are not listed here can't even see them. - username: "admin" permissions: # user permissions start: true stop: true read_logs: true execute_commands: true - username: "user1" permissions: start: true stop: true read_logs: true execute_commands: true - username: "user2" permissions: start: true stop: true read_logs: true execute_commands: true # PHP Web Server example - title: "Web Server" workdir: "./host/miro" script: "php -S 0.0.0.0:8080" ram: "100 MB" auto_start: true auto_restart: false allow_executing_commands: false use_pty: true # Linux only: You can try it. Sometimes your service can work better with that enabled. users: - username: "admin" permissions: start: true stop: true read_logs: true execute_commands: false - username: "user2" permissions: start: true stop: true read_logs: true execute_commands: false ``` -------------------------------- ### Start FolderHost with Docker Compose Source: https://folderhost.org/docs/quick-start Runs the Docker Compose setup in detached mode. Execute this command in the directory containing docker-compose.yml. ```sh docker-compose up -d ``` -------------------------------- ### config.yml example configuration Source: https://folderhost.org/docs/configuration Example configuration file for FolderHost. It sets the port, folder path, storage limit, JWT secret, admin account with permissions, recovery bin settings, and logging options. The file is located in the binary's directory or in the Docker volume 'folderhost_data'. ```yaml # Port is required. Don't delete it! port: 5000 # This is folder path. You can change it, but don't delete. folder: "./host" # Limit of the folder. Examples: 10 GB, 300 MB, 5.5 GB, 1 TB... # You can remove it if you trust users. storage_limit: "10 GB" # This is secret json web token key to create tokens. If you don't have one, it will be autogenerated. secret_jwt_key: "auto" # Admin account properties admin: username: "admin" password: "123" email: "example@email.com" scope: "" # for example "/yourfolder", this attribute will set a specific location for user and user can't escape it permissions: read_directories: true read_files: true create: true change: true delete: true move: true download: true upload: true rename: true extract: true archive: true copy: true read_recovery: true use_recovery: true read_users: true edit_users: true read_logs: true # Holds deleted files. Accidentally, you might delete files that you don't want to delete. recovery_bin: true # Optionally you can limit recovery_bin storage. You can remove it if you want. bin_storage_limit: "5 GB" # Enable/Disable logging activities log_activities: true # Clears logs automatically after some days. If you want to disable it set the value to 0. clear_logs_after: 7 # Days ``` -------------------------------- ### Run FolderHost with Docker Source: https://folderhost.org/docs/quick-start Starts a FolderHost container with port mapping and a Docker volume for data persistence. Access the web interface at http://localhost:5000. ```sh # Run container, you can access the files using Docker volumes docker run -d \ --name folderhost-server \ -p 5000:5000 \ -v folderhost_data:/app \ --restart unless-stopped \ mertjsx/folderhost:latest ``` -------------------------------- ### Download and run FolderHost on Linux Source: https://folderhost.org/docs/quick-start Commands to download the Linux binary, extract it, make it executable, and run it once to generate the config.yml file. Remember to edit the admin password in config.yml after the first run. ```sh wget https://github.com/MertJSX/folderhost/releases/latest/download/folderhost-linux-amd64.zip unzip folderhost-linux-amd64.zip chmod +x folderhost # Run it once to generate the config.yml file, then edit it. ./folderhost ``` -------------------------------- ### Docker Compose configuration for FolderHost Source: https://folderhost.org/docs/quick-start Defines a FolderHost service with port mapping, volume for data, and restart policy. Save this as docker-compose.yml and adjust the port to match your config.yml. ```yml services: folderhost: image: mertjsx/folderhost:latest container_name: folderhost-server ports: - "5000:5000" # Change to match your config.yml port volumes: - folderhost_data:/app restart: unless-stopped volumes: folderhost_data: ``` -------------------------------- ### Pull FolderHost Docker image Source: https://folderhost.org/docs/quick-start Pulls the latest FolderHost Docker image from Docker Hub. ```sh docker pull mertjsx/folderhost:latest ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.