{"id":19068053,"url":"https://github.com/ensody/samba","last_synced_at":"2026-02-20T23:39:05.464Z","repository":{"id":206708575,"uuid":"717523460","full_name":"ensody/samba","owner":"ensody","description":"Samba Docker image (auto-updated)","archived":false,"fork":false,"pushed_at":"2024-08-25T09:11:52.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T13:11:33.455Z","etag":null,"topics":["auto-updated","docker","docker-image","podman","samba","smb","smb2","smb3"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ensody.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":"2023-11-11T18:14:01.000Z","updated_at":"2024-08-25T09:11:55.000Z","dependencies_parsed_at":"2024-07-14T09:45:31.044Z","dependency_job_id":"2607b7bf-9480-4c22-8405-c1b52229e035","html_url":"https://github.com/ensody/samba","commit_stats":null,"previous_names":["ensody/samba"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ensody/samba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ensody%2Fsamba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ensody%2Fsamba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ensody%2Fsamba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ensody%2Fsamba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ensody","download_url":"https://codeload.github.com/ensody/samba/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ensody%2Fsamba/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29667858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T23:24:07.480Z","status":"ssl_error","status_checked_at":"2026-02-20T23:24:06.202Z","response_time":59,"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":["auto-updated","docker","docker-image","podman","samba","smb","smb2","smb3"],"created_at":"2024-11-09T01:03:37.686Z","updated_at":"2026-02-20T23:39:05.447Z","avatar_url":"https://github.com/ensody.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Samba Docker image\n\nThis is a bare Samba Docker image giving you just the raw Samba server and a simple, but very direct configuration solution.\n\nNote: Most existing Samba Docker images allow creating users and setting smb.conf values via environment variables or via a custom YAML based config system. This Docker image takes a more direct approach. You have to set up your own smb.conf (or extend the default) and you have to configure users with a normal shell script.\n\nThe CI automatically checks for updates (e.g. security fixes) several times per day and publishes a new image only when necessary. So, this image could be used with podman-auto-update or Watchtower.\n\n## Defaults\n\nThere's a default `smb` user/group with UID/GID 1000. You can either go with the defaults or use the `one-time-init.sh` script to delete/replace that user. The same script can also be used to add more users.\n\nThere's a [default smb.conf](https://github.com/ensody/samba/blob/main/smb.conf). You can add your shares and customizations via an `extra.conf` file or define a custom `smb.conf` to override the defaults.\n\nWhen using these defaults you can simplify your shares to a minimum (more examples are shown below):\n\n```\n[MyShare]\n   path = /data/myshare\n   write list = @smb\n```\n\nZeroconf is active by default. You can turn it off by setting the environment variable `AVAHI_ENABLED=false`. If you want to control Avahi separately you can use the [avahi](https://github.com/ensody/avahi) Docker image which also contains an SMB example in the README.\n\n## Volumes\n\nYou'll need to mount these volumes:\n\n* `/conf`: Should contain your `extra.conf` if you want to use the default `smb.conf`. Alternatively, provide the complete `smb.conf` instead.\n* `/var/lib/samba`: Samba server's data\n* (optional) `/scripts`: This can contain shell scripts to prepare the container. Those scripts will be executed via `-euo pipefail` to ensure that script errors will actually trigger a failure instead of ignoring them.\n  * `/scripts/one-time-init.sh`: Will be executed exactly once per container creation and allows e.g. creating Linux users and groups before Samba is launched.\n  * `/scripts/prepare.sh`: Executed every time before Samba is launched.\n* One or more data volumes for your shares, as referenced in your `smb.conf` (e.g. `/data`).\n\n## Example\n\nYou can modify and copy-paste this into your shell:\n\n```sh\n# Where to store all the data and configs\nSAMBA_ROOT=/var/data/samba\n\nmkdir -p \"$SAMBA_ROOT\"/{conf,data,db,scripts}\n\n# Optional script to set up users and passwords\ncat \u003e \"$SAMBA_ROOT/scripts/one-time-init.sh\" \u003c\u003c'EOF'\n# Optional: set the \"smb\" user's password (alternative: docker exec -it samba smbpasswd -a smb)\n#PASSWORD=\"yourpassword\" echo -e \"$PASSWORD\\n$PASSWORD\" | smbpasswd -a -s smb\n\n# Optional: Add more groups and users.\n#addgroup -g 1001 extragroup\n#adduser -D -u 1001 -G extragroup extrauser\n#PASSWORD=\"extrauserpassword\" echo -e \"$PASSWORD\\n$PASSWORD\" | smbpasswd -a -s extrauser\nEOF\n\n# Configure shares and additonal settings\ncat \u003e \"$SAMBA_ROOT/conf/extra.conf\" \u003c\u003c'EOF'\n# This allows everyone in the smb group to write to all shares.\n# Alternatively you can configure this for every share separately.\nwrite list = @smb\n\n# A publicly discoverable share that is only accessible (read and write) by the smb group\n[NAS]\n   path = /data/nas\n\n# A share with full read-write access for guests\n[Public]\n   path = /data/public\n   writeable = yes\n   guest ok = yes\n\n# A hidden share (you must explicitly specify the full path when connecting)\n[Hidden]\n   path = /data/hidden\n   browseable = no\n\n# A share for Time Machine backups (macOS)\n[TimeMachine]\n   path = /data/timemachine\n   fruit:time machine = yes\n   # If you want to limit the maximum backup size:\n   #fruit:time machine max size = 1200G\nEOF\n\ndocker run --restart always -d --name samba --net=host -v \"$SAMBA_ROOT/data/:/data/\" -v \"$SAMBA_ROOT/db:/var/lib/samba\" -v \"$SAMBA_ROOT/conf:/conf\" -v \"$SAMBA_ROOT/scripts:/scripts\" ghcr.io/ensody/samba:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fensody%2Fsamba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fensody%2Fsamba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fensody%2Fsamba/lists"}