{"id":27292980,"url":"https://github.com/vmvarela/smbwebclient","last_synced_at":"2026-04-21T07:31:54.201Z","repository":{"id":158087155,"uuid":"553986586","full_name":"vmvarela/smbwebclient","owner":"vmvarela","description":"smbwebclient is a web application to use Windows Networks","archived":false,"fork":false,"pushed_at":"2026-04-02T05:25:54.000Z","size":165,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-02T18:51:10.087Z","etag":null,"topics":["file-browser","samba"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/vmvarela/smbwebclient","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vmvarela.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["vmvarela"],"custom":["https://paypal.me/vmvarela"]}},"created_at":"2022-10-19T04:21:07.000Z","updated_at":"2026-04-02T05:25:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f653129e-2e4d-4c79-ae88-7fd3375e0ac7","html_url":"https://github.com/vmvarela/smbwebclient","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vmvarela/smbwebclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmvarela%2Fsmbwebclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmvarela%2Fsmbwebclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmvarela%2Fsmbwebclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmvarela%2Fsmbwebclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmvarela","download_url":"https://codeload.github.com/vmvarela/smbwebclient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmvarela%2Fsmbwebclient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32082119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-browser","samba"],"created_at":"2025-04-11T22:40:45.216Z","updated_at":"2026-04-21T07:31:54.196Z","avatar_url":"https://github.com/vmvarela.png","language":"PHP","funding_links":["https://github.com/sponsors/vmvarela","https://paypal.me/vmvarela"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/vmvarela/smbwebclient/actions/workflows/test.yaml\"\u003e\u003cimg src=\"https://github.com/vmvarela/smbwebclient/actions/workflows/test.yaml/badge.svg\" alt=\"PHP CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/vmvarela/smbwebclient/actions/workflows/build.yaml\"\u003e\u003cimg src=\"https://github.com/vmvarela/smbwebclient/actions/workflows/build.yaml/badge.svg\" alt=\"Docker Build\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/php-%3E%3D8.2-8892BF.svg\" alt=\"PHP Version\"\u003e\n  \u003ca href=\"https://github.com/vmvarela/smbwebclient/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/vmvarela/smbwebclient\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# SMB Web Client\n\nA modern PHP 8 web-based file browser for SMB/CIFS network shares, powered by FrankenPHP and the icewind/smb library.\n\n## Features\n\n- 🚀 **PHP 8.2+** with modern syntax (typed properties, constructor promotion, strict typing)\n- 🔥 **FrankenPHP** powered by Go and Caddy for high performance\n- 📦 **icewind/smb** library for native SMB/CIFS support\n- 🎨 **Multiple themes** (Windows, macOS, Ubuntu)\n- 🔒 **Session-based authentication** with credential management\n- 🌍 **Multi-language support** (40+ languages with auto-detection)\n- 📁 **File operations**: upload, download, create folders, delete, rename\n- 🖱️ **Drag \u0026 drop** file uploads\n- 🔄 **Sortable columns** (name, size, date, type)\n- 🐳 **Docker ready** with docker-compose\n\n## Requirements\n\n- PHP 8.2 or higher\n- libsmbclient library and PHP extension\n- Composer\n\n## Quick Start with Docker\n\n### Using GitHub Container Registry (Recommended)\n\n```bash\n# Pull the image\ndocker pull ghcr.io/vmvarela/smbwebclient:latest\n\n# Run with environment variables\ndocker run -d \\\n  -p 8080:80 \\\n  -e SMB_DEFAULT_SERVER=your-smb-server \\\n  ghcr.io/vmvarela/smbwebclient:latest\n\n# Access at http://localhost:8080\n```\n\n### Using Docker Compose\n\nCreate a `docker-compose.yml` file:\n\n```yaml\nservices:\n  smbwebclient:\n    image: ghcr.io/vmvarela/smbwebclient:latest\n    ports:\n      - \"8080:80\"\n    volumes:\n      - ./.env:/app/.env:ro\n    environment:\n      - SERVER_NAME=:80\n    restart: unless-stopped\n```\n\nThen run:\n\n```bash\n# Create your .env file\ncat \u003e .env \u003c\u003c EOF\nSMB_DEFAULT_SERVER=your-smb-server\nSMB_HIDE_SYSTEM_SHARES=true\nAPP_DEFAULT_LANGUAGE=en\nEOF\n\n# Start the container\ndocker-compose up -d\n\n# Access at http://localhost:8080\n```\n\n### Building from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/vmvarela/smbwebclient.git\ncd smbwebclient\n\n# Copy and configure environment\ncp .env.example .env\n# Edit .env with your SMB server settings\n\n# Start with Docker Compose\ndocker-compose up -d\n\n# Access at http://localhost:8080\n```\n\n## Manual Installation\n\n1. Install dependencies:\n```bash\ncomposer install\n```\n\n2. Configure environment:\n```bash\ncp .env.example .env\n# Edit .env with your settings\n```\n\n3. Run with FrankenPHP:\n```bash\nfrankenphp run --config Caddyfile\n```\n\nOr use PHP's built-in server for development:\n```bash\nphp -S localhost:8080 -t public\n```\n\n## Using as a Composer Package\n\nYou can integrate SMB Web Client into your own PHP application:\n\n### Installation\n\n```bash\ncomposer require vmvarela/smbwebclient\n```\n\n### Basic Usage\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\nuse SmbWebClient\\Config;\nuse SmbWebClient\\SmbClient;\n\n// Create configuration\n$config = new Config(\n    smbDefaultServer: 'your-smb-server',\n    hideSystemShares: true,\n    hideDotFiles: true,\n);\n\n// Create client with credentials\n$client = new SmbClient($config, 'username', 'password');\n\n// List available shares\n$shares = $client-\u003elistShares('your-smb-server');\nforeach ($shares as $share) {\n    echo $share-\u003egetName() . \"\\n\";\n}\n\n// List directory contents\n$files = $client-\u003elistDirectory('your-smb-server', 'ShareName', '/path/to/folder');\nforeach ($files as $file) {\n    echo sprintf(\"%s - %s (%d bytes)\\n\", \n        $file-\u003eisDirectory() ? 'DIR' : 'FILE',\n        $file-\u003egetName(),\n        $file-\u003egetSize()\n    );\n}\n\n// Download a file\n$localPath = '/local/path/to/file.txt';\n$client-\u003edownloadFile('your-smb-server', 'ShareName', '/remote/file.txt', $localPath);\necho file_get_contents($localPath);\n\n// Upload a file\n$client-\u003euploadFile('your-smb-server', 'ShareName', '/remote/path', '/local/file.txt');\n\n// Create a directory\n$client-\u003ecreateDirectory('your-smb-server', 'ShareName', '/new/folder');\n// Delete a file\n$client-\u003edeleteFile('your-smb-server', 'ShareName', '/path/to/file.txt');\n// Delete a directory\n$client-\u003edeleteDirectory('your-smb-server', 'ShareName', '/path/to/folder');\n// Rename/move a file\n$client-\u003erename('your-smb-server', 'ShareName', '/old/name.txt', '/new/name.txt');\n```\n\n### Anonymous Access\n\n```php\n// For anonymous/guest access, omit credentials\n$client = new SmbClient($config);\n\n// Or explicitly pass null\n$client = new SmbClient($config, null, null);\n```\n\n### Using Environment Variables\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\nuse Dotenv\\Dotenv;\nuse SmbWebClient\\Config;\nuse SmbWebClient\\SmbClient;\n\n// Load .env file\n$dotenv = Dotenv::createImmutable(__DIR__);\n$dotenv-\u003eload();\n\n// Create config from environment\n$config = Config::fromEnv();\n\n// Use the client\n$client = new SmbClient($config, $_ENV['SMB_USER'] ?? null, $_ENV['SMB_PASS'] ?? null);\n```\n\n### Requirements\n\nWhen using as a library, ensure you have:\n\n- PHP 8.2+\n- `libsmbclient` system library\n- PHP `smbclient` extension (`pecl install smbclient`)\n\nOn Debian/Ubuntu:\n```bash\napt-get install libsmbclient-dev smbclient\npecl install smbclient\n```\n\nOn macOS:\n```bash\nbrew install samba\npecl install smbclient\n```\n\n## Configuration\n\nAll configuration is managed through environment variables in the `.env` file:\n\n### SMB Settings\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `SMB_DEFAULT_SERVER` | Default SMB server hostname | `localhost` |\n| `SMB_SERVER_LIST` | Comma-separated list of allowed servers | *(empty)* |\n| `SMB_ROOT_PATH` | Root path to restrict navigation (e.g., `/server/share`) | *(empty)* |\n| `SMB_HIDE_DOT_FILES` | Hide files starting with dot | `true` |\n| `SMB_HIDE_SYSTEM_SHARES` | Hide system shares (C$, ADMIN$, IPC$) | `true` |\n| `SMB_HIDE_PRINTER_SHARES` | Hide printer shares | `false` |\n\n### Application Settings\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `APP_DEFAULT_LANGUAGE` | Default UI language | `en` |\n| `APP_DEFAULT_CHARSET` | Character encoding | `UTF-8` |\n| `APP_CACHE_PATH` | Directory for temporary files | *(empty)* |\n| `APP_SESSION_NAME` | Custom session cookie name | `SMBWebClientID` |\n| `APP_ALLOW_ANONYMOUS` | Allow anonymous access | `false` |\n| `APP_MOD_REWRITE` | Enable clean URLs | `false` |\n| `APP_BASE_URL` | Base URL for clean URLs | *(empty)* |\n\n### Other Settings\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `LOG_LEVEL` | Logging verbosity (0-3) | `0` |\n| `LOG_FACILITY` | Syslog facility | `LOG_DAEMON` |\n\n## Supported Languages\n\nThe application supports automatic language detection and includes translations for:\n\n`af`, `ar`, `az`, `bg`, `bs`, `ca`, `cs`, `da`, `de`, `el`, `en`, `eo`, `es`, `et`, `eu`, `fa`, `fi`, `fr`, `gl`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ka`, `lt`, `lv`, `ms`, `nl`, `no`, `pl`, `pt`, `pt-br`, `ro`, `ru`, `sk`, `sl`, `sq`, `sr`, `sv`, `th`, `tr`, `uk`, `zh`, `zh-tw`\n\n## Available Themes\n\n- **Windows** - Classic Windows Explorer style\n- **macOS** - Apple Finder style  \n- **Ubuntu** - Nautilus file manager style\n\n## Architecture\n\n```\n├── public/\n│   ├── index.php          # Application entry point\n│   └── assets/            # CSS, images\n├── src/\n│   ├── Application.php    # Main application controller\n│   ├── Config.php         # Configuration management\n│   ├── SmbClient.php      # SMB operations wrapper\n│   ├── Session.php        # Session and authentication\n│   └── Translator.php     # Multi-language support\n├── cache/                 # Temporary files (ZIP downloads)\n├── .env                   # Configuration file\n├── Caddyfile              # FrankenPHP/Caddy config\n├── Dockerfile             # FrankenPHP container\n└── docker-compose.yml     # Docker Compose setup\n```\n\n## Docker Compose Services\n\nThe included `docker-compose.yml` provides:\n\n- **smbwebclient**: Main application on port 8080\n- **samba1**: Test Samba server with sample shares\n- **samba2**: Additional test Samba server\n\nTest credentials for Samba servers: `user` / `pass`\n\n## Development\n\n```bash\n# Install dependencies\ncomposer install\n\n# Run development server\nphp -S localhost:8080 -t public\n\n# Static analysis\nvendor/bin/phpstan analyse src\n```\n\n## Code Standards\n\n- PSR-4 autoloading\n- PSR-12 coding style\n- Strict typing enabled\n- PHP 8.2+ features (constructor promotion, match expressions, named arguments)\n\n## License\n\nMIT License - Copyright (c) 2003-2025 Victor M. Varela\n\nSee [LICENSE](LICENSE) file for details.\n\n## Author\n\nVictor M. Varela \u003cvmvarela@gmail.com\u003e\n\n## Troubleshooting\n\n### Connection Issues\n- Verify `SMB_DEFAULT_SERVER` is accessible from the container/server\n- Check that credentials have appropriate permissions\n- Ensure libsmbclient and PHP smbclient extension are installed\n\n### Permission Issues\n- Ensure the cache directory is writable\n- Check SMB share permissions for the authenticating user\n\n### Performance Tips\n- Use FrankenPHP for best performance\n- Enable OPcache in production\n- Consider using `SMB_ROOT_PATH` to limit browsing scope\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmvarela%2Fsmbwebclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmvarela%2Fsmbwebclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmvarela%2Fsmbwebclient/lists"}