{"id":13714207,"url":"https://github.com/117503445/GoWebDAV","last_synced_at":"2025-05-07T01:32:44.785Z","repository":{"id":43600925,"uuid":"282487399","full_name":"117503445/GoWebDAV","owner":"117503445","description":"a lightweight, easy-to-use WebDAV server","archived":false,"fork":false,"pushed_at":"2024-08-17T17:51:41.000Z","size":636,"stargazers_count":135,"open_issues_count":4,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-17T18:51:25.781Z","etag":null,"topics":["go","golang","server","webdav"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/117503445.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-25T16:58:04.000Z","updated_at":"2024-08-17T17:51:21.000Z","dependencies_parsed_at":"2024-05-11T09:25:48.821Z","dependency_job_id":"72e368da-b8ef-4ed0-a592-77b9c39dd130","html_url":"https://github.com/117503445/GoWebDAV","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/117503445%2FGoWebDAV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/117503445%2FGoWebDAV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/117503445%2FGoWebDAV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/117503445%2FGoWebDAV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/117503445","download_url":"https://codeload.github.com/117503445/GoWebDAV/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224551179,"owners_count":17330092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go","golang","server","webdav"],"created_at":"2024-08-02T23:01:54.838Z","updated_at":"2024-11-14T01:30:49.137Z","avatar_url":"https://github.com/117503445.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# GoWebDAV\n\n\u003e Share local files using WebDAV, lightweight and easy to use\n\nEnglish | [简体中文](./README_zh_CN.md)\n\n## Features\n\n- Implemented in Golang for high performance.\n\n- Finally compiled into a single binary file, no need for Apache or similar environments, with few dependencies.\n\n- Supports browser access.\n\n- Multiple WebDAV services can be enabled on the same port, each with different mount directories, usernames, and passwords.\n\n- Good Docker support.\n\n## Quick Start\n\nDownload the binary file from \u003chttps://github.com/117503445/GoWebDAV/releases\u003e\n\nRun\n\n```sh\n./gowebdav\n```\n\nGoWebDAV will automatically create sample files under the `./data` path, with the following file structure\n\n```sh\n\u003e tree ./data\n./data\n├── public-writable\n│   └── 1.txt\n├── public-readonly\n│   └── 1.txt\n└── private-writable\n    └── 1.txt\n```\n\nAccess \u003chttp://localhost:80\u003e in your browser to see the 3 different GoWebDAV services.\n\n![index](./doc/index.png)\n\nAmong them, \u003chttp://localhost:80/public-writable\u003e is the `public-writable` service, mapping to the local `./data/public-writable` folder. It is unauthenticated and writable. You can view file contents in the browser and perform operations like upload and delete.\n\n![public-writable](./doc/public-writable.png)\n\n\u003chttp://localhost:80/public-readonly\u003e is the `public-readonly` service, mapping to the local `./data/public-readonly` folder. It is unauthenticated and read-only. You can view file contents in the browser but cannot upload, delete, etc.\n\n![public-readonly](./doc/public-readonly.png)\n\n\u003chttp://localhost:80/private-writable\u003e is the `private-writable` service, mapping to the local `./data/private-writable` folder. It requires user authentication and is writable. After logging in with `user1` and `pass1`, you can view file contents in the browser and perform operations like upload and delete.\n\n![private-writable](./doc/private-writable.png)\n\nBesides using a browser, you can also access it using other WebDAV client tools.\n\nYou can configure the local path, user authentication, read-only status, and other properties of the WebDAV service by specifying the `dav` parameter. For details, see the *Usage* section.\n\n## Usage\n\n```sh\n./gowebdav --help # View help\n\n./gowebdav --addr 127.0.0.1 # Listen on 127.0.0.1, default is 0.0.0.0\n./gowebdav --port 8080 # Listen on port 8080, default is port 80\n\n./gowebdav --dav \"/dir1,/data/dir1,user1,pass1,true\" # Configure folder path and properties\n```\n\nThe `dav` parameter can specify the local path, user authentication, read-only status, and other properties of the WebDAV service.\n\nEach local path can be configured for a WebDAV service, separated by semicolons. For example:\n\n- `\"/dir1,/data/dir1,user1,pass1,true;/dir2,/data/dir2,null,null,false\"` describes 2 services, mapping the folder `/data/dir1` to the WebDAV service `/dir1` and the folder `/data/dir2` to the WebDAV service `/dir2`.\n\nFor each service, you need to separate 5 parameters with commas: `service path, local path, username, password, read-only status`. When both the username and password are `null`, no authentication is required. For example:\n\n- `\"/dir1,/data/dir1,user1,pass1,true\"` describes mapping `/data/dir1` to the `/dir1` service, where access requires the username and password `user1` and `pass1`, respectively, and is read-only (prohibits upload, update, delete).\n- `\"/dir2,/data/dir2,null,null,false\"` describes mapping `/data/dir2` to the `/dir2` service, where no authentication is required and it is read-write.\n- `\"/dir3,/data/dir3,null,null,true\"` describes mapping `/data/dir3` to the `/dir3` service, where no authentication is required and it is read-only.\n\nIn particular, if there is only one service named `/`, you can access \u003chttp://localhost:80\u003e directly without specifying a service name. For example:\n\n- `\"/,/data/dir1,user1,pass1,true\"` describes mapping `/data/dir1` to the `/` service, where access requires the username and password `user1` and `pass1`, respectively, and is read-only.\n\nWhen `dav` is not specified, the default `dav` parameter used by GoWebDAV is `/public-writable,./data/public-writable,null,null,false;/public-readonly,./data/public-readonly,null,null,true;/private-writable,./data/private-writable,user1,pass1,false`.\n\n## Docker\n\nPrepare the local folder paths to be shared as `/data/dir1` and `/data/dir2`.\n\n```sh\ndocker run -it -d -v /data:/data -e dav=\"/dir1,/data/dir1,user1,pass1,true;/dir2,/data/dir2,null,null,false\" -p 80:80 --restart=unless-stopped 117503445/go_webdav\n```\n\nOpen \u003chttp://localhost/dir1\u003e and \u003chttp://localhost/dir2\u003e in your browser to access disk files in WebDAV format.\n\nPass the `data` parameter through the environment variable `dav` and specify the mapped port with `-p 80:80`.\n\n## Docker Compose\n\n```yaml\nservices:\n  go_webdav:\n    image: 117503445/go_webdav\n    restart: unless-stopped\n    volumes:\n      - /data:/data\n    environment:\n      - \"dav=/dir1,/data/dir1,user1,pass1,true;/dir2,/data/dir2,null,null,false\"\n    ports:\n      - \"80:80\"\n```\n\nIf you need to run Gowebdav using Docker in a non-root user environment, you can refer to [nonroot](./doc/nonroot.md).\n\n## Configuration\n\nGoWebDAV supports configuring the WebDAV service through environment variables, command-line arguments, configuration files, and other methods. The examples mentioned above are typical uses of GoWebDAV. If these examples do not meet your needs, you can refer to the [Configuration](./doc/config.md) documentation.\n\n## Security\n\nGoWebDAV uses HTTP Basic Auth for authentication, with account passwords transmitted in plaintext, lacking security. If dealing with important files or passwords, be sure to use a layer of HTTPS with Nginx or Traefik proxy servers.\n\nGoWebDAV currently does not have plans to directly support HTTPS, as I believe that tasks like domain names and certificate renewal should be handled at the higher-level proxy server.\n\n## Development\n\nRefer to [dev.md](./doc/dev.md)\n\n## Acknowledgements\n\n\u003chttps://github.com/dom111/webdav-js\u003e provides frontend support","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F117503445%2FGoWebDAV","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F117503445%2FGoWebDAV","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F117503445%2FGoWebDAV/lists"}