{"id":13548728,"url":"https://github.com/fclairamb/ftpserver","last_synced_at":"2025-05-14T18:04:56.950Z","repository":{"id":37773874,"uuid":"262834126","full_name":"fclairamb/ftpserver","owner":"fclairamb","description":"Golang based autonomous FTP server with SFTP, S3, Dropbox, and Google Drive connectors.","archived":false,"fork":false,"pushed_at":"2025-05-08T15:53:08.000Z","size":5647,"stargazers_count":711,"open_issues_count":24,"forks_count":106,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-05-13T12:59:32.530Z","etag":null,"topics":["afero","ftp","ftp-server","go","golang","google-drive","s3"],"latest_commit_sha":null,"homepage":"","language":"Go","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/fclairamb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2020-05-10T16:58:08.000Z","updated_at":"2025-05-12T10:57:56.000Z","dependencies_parsed_at":"2023-09-26T04:13:45.646Z","dependency_job_id":"682ac273-1a6f-491d-8184-0afaa16ead08","html_url":"https://github.com/fclairamb/ftpserver","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fftpserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fftpserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fftpserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fclairamb%2Fftpserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fclairamb","download_url":"https://codeload.github.com/fclairamb/ftpserver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198514,"owners_count":22030965,"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":["afero","ftp","ftp-server","go","golang","google-drive","s3"],"created_at":"2024-08-01T12:01:13.715Z","updated_at":"2025-05-14T18:04:51.940Z","avatar_url":"https://github.com/fclairamb.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Golang FTP Server\n\n![Build](https://github.com/fclairamb/ftpserver/workflows/Build/badge.svg)\n![Cross Build](https://github.com/fclairamb/ftpserver/workflows/Cross%20Build/badge.svg)\n![Docker Image](https://github.com/fclairamb/ftpserver/workflows/Docker%20Image/badge.svg)\n![Docker test](https://github.com/fclairamb/ftpserver/workflows/Docker%20test/badge.svg)\n![Docker downloads](https://img.shields.io/docker/pulls/fclairamb/ftpserver)\n[![Go Report Card](https://goreportcard.com/badge/fclairamb/ftpserver)](https://goreportcard.com/report/fclairamb/ftpserver)\n[![GoDoc](https://godoc.org/github.com/fclairamb/ftpserver?status.svg)](https://godoc.org/github.com/fclairamb/ftpserver/server)\n\nThis FTP server is a gateway between old-school FTP devices and modern cloud based file systems, using the\n[afero](https://github.com/spf13/afero)'s Fs interface and acting as a reference implementation of the [ftpserverlib](https://github.com/fclairamb/ftpserverlib).\n\nAt the current stage, supported backend are:\n- Local disk\n- [S3](https://aws.amazon.com/s3/) through [afero-s3](https://github.com/fclairamb/afero-s3)\n- [Dropbox](https://www.dropbox.com/) (see [doc](https://github.com/fclairamb/ftpserver/tree/master/fs/dropbox)) through [afero-dropbox](https://github.com/fclairamb/afero-dropbox)\n- [Google Drive](https://developers.google.com/drive) (see [doc](https://github.com/fclairamb/ftpserver/tree/master/fs/gdrive)) through [afero-gdrive](https://github.com/fclairamb/afero-gdrive)\n- [SFTP](https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol) through [afero's sftpfs](https://github.com/spf13/afero/)\n- Email through [go-mail](https://github.com/go-mail/mail) thanks to [@x-way](https://github.com/x-way)\n- Telegram through [telebot](https://github.com/tucnak/telebot) by [@slayer](https://github.com/slayer), see [doc](fs/telegram/README.md)\n\nAnd with those are supported common parameters to switch them to read-only, enable login access, or use a temporary directory file (see [doc](https://github.com/fclairamb/ftpserver/tree/master/fs)).\n\n## Current status of the project\n\n### Features\n\n#### FTP protocol\n\nThese features are brought by [ftpserverlib](https://github.com/fclairamb/ftpserverlib) itself:\n\n * Uploading and downloading files\n * Directory listing (LIST + MLST)\n * File and directory deletion and renaming\n * TLS support (AUTH + PROT)\n * File download/upload resume support (REST)\n * Complete driver for all the above features\n * Passive socket connections (EPSV and PASV commands)\n * Active socket connections (PORT command)\n * Small memory footprint\n * Only relies on the standard library except for:\n   * [go-kit log](https://github.com/go-kit/kit/tree/master/log) for logging\n   * [afero](https://github.com/spf13/afero) for generic file systems handling\n * Supported extensions:\n   * [AUTH](https://tools.ietf.org/html/rfc2228#page-6) - Control session protection\n   * [AUTH TLS](https://tools.ietf.org/html/rfc4217#section-4.1) - TLS session\n   * [PROT](https://tools.ietf.org/html/rfc2228#page-8) - Transfer protection\n   * [EPRT/EPSV](https://tools.ietf.org/html/rfc2428) - IPv6 support\n   * [MDTM](https://tools.ietf.org/html/rfc3659#page-8) - File Modification Time\n   * [SIZE](https://tools.ietf.org/html/rfc3659#page-11) - Size of a file\n   * [REST](https://tools.ietf.org/html/rfc3659#page-13) - Restart of interrupted transfer\n   * [MLST](https://tools.ietf.org/html/rfc3659#page-23) - Simple file listing for machine processing\n   * [MLSD](https://tools.ietf.org/html/rfc3659#page-23) - Directory listing for machine processing\n\n## Getting started\n\n### Get it\n\n#### Download it\nFetch a binary from the [latest release](/releases) and run it.\n\n#### Build \u0026 run it locally\n\n```bash\ngo install github.com/fclairamb/ftpserver@main\n\nftpserver \u0026\n```\n\n#### Run it with docker\nThere's also a containerized version of the server (31MB, based on alpine).\n\n```sh\n# Creating a directory\nmkdir -p files\n\n# Starting the sample FTP server\ndocker run --rm -d -p 2121-2130:2121-2130 -v $(pwd)/files:/tmp -v $(pwd):/app fclairamb/ftpserver\n```\n\n#### Run it with docker compose\n```yml\n# docker-compose.yml\n\nversion: '3.3'\nservices:\n  ftpserver:\n    ports:\n      - '2121-2130:2121-2130'\n    volumes:\n      - ./files:/tmp\n      - .:/app\n    image: fclairamb/ftpserver\n```\n\n```sh\ndocker-compose up -d\n```\n\n### Test it\nThis is a quick way to see if it's working correctly:\n\n```sh\n# Download some file\n[ -f kitty.jpg ] || (curl -o kitty.jpg.tmp https://placekitten.com/2048/2048 \u0026\u0026 mv kitty.jpg.tmp kitty.jpg)\n\n# Upload it to the server\ncurl -v -T kitty.jpg ftp://test:test@localhost:2121/\n\n# Download it back\ncurl ftp://test:test@localhost:2121/kitty.jpg -o kitty2.jpg\n\n# Compare it\ndiff kitty.jpg kitty2.jpg\n```\n\n### Config file\nIf you don't create a `ftpserver.json` file, one will be created for you.\n\nHere is a sample config file:\n\n```json\n{\n   \"version\": 1,\n   \"passive_transfer_port_range\": {\n      \"start\": 2122,\n      \"end\": 2130\n   },\n   \"tls\": {\n      \"server_cert\": {\n         \"cert\": \"cert.pem\",\n         \"key\": \"key.pem\"\n      }\n   },\n   \"accesses\": [\n      {\n         \"user\": \"test\",\n         \"pass\": \"test\",\n         \"fs\": \"os\",\n         \"params\": {\n            \"basePath\": \"/tmp\"\n         }\n      },\n      {\n         \"user\": \"test\",\n         \"pass\": \"test\",\n         \"fs\": \"os\",\n         \"params\": {\n            \"basePath\": \"/tmp\"\n         }\n      },\n      {\n         \"user\": \"dropbox\",\n         \"pass\": \"dropbox\",\n         \"fs\": \"dropbox\",\n         \"params\": {\n            \"token\": \"...\"\n         }\n      },\n      {\n         \"user\": \"gdrive\",\n         \"pass\": \"gdrive\",\n         \"fs\": \"gdrive\",\n         \"params\": {\n            \"google_client_id\": \"***.apps.googleusercontent.com\",\n            \"google_client_secret\": \"****\",\n            \"base_path\": \"ftp\"\n         }\n      },\n      {\n\n         \"user\": \"s3\",\n         \"pass\": \"s3\",\n         \"fs\": \"s3\",\n         \"params\": {\n            \"endpoint\": \"https://s3.amazonaws.com\",\n            \"region\": \"eu-west-1\",\n            \"bucket\": \"my-bucket\",\n            \"access_key_id\": \"AKIA....\",\n            \"secret_access_key\": \"IDxd....\",\n            \"disable_ssl\": \"false\",\n            \"path_style\": \"false\"\n         }\n      },\n      {\n         \"user\": \"sftp\",\n         \"pass\": \"sftp\",\n         \"fs\": \"sftp\",\n         \"params\": {\n            \"username\": \"user\",\n            \"password\": \"password\",\n            \"hostname\": \"192.168.168.11:22\"\n         }\n      },\n      {\n         \"user\": \"telegram\",\n         \"pass\": \"telegram\",\n         \"fs\": \"telegram\",\n         \"shared\": true,\n         \"params\": {\n            \"Token\": \"\u003cOBTAIN_TOKEN_FROM_BOTFATHER\u003e\",\n            \"ChatID\": \"\u003cINSERT_CHAT_ID_HERE\u003e\"\n         }\n      }\n   ]\n}\n```\n\nYou can generate the TLS key pair files with the following command:\n```bash\nopenssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out cert.pem -keyout key.pem\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffclairamb%2Fftpserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffclairamb%2Fftpserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffclairamb%2Fftpserver/lists"}