{"id":20432940,"url":"https://github.com/cdzombak/samba-docker","last_synced_at":"2025-09-24T11:31:41.146Z","repository":{"id":214543468,"uuid":"736770416","full_name":"cdzombak/samba-docker","owner":"cdzombak","description":"Up-to-date Samba Docker image optimized for NAS file sharing with full macOS Spotlight support.","archived":false,"fork":false,"pushed_at":"2024-05-31T20:45:26.000Z","size":32,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-18T19:38:33.241Z","etag":null,"topics":["docker","elasticsearch","nas","samba","samba-server","selfhosted","spotlight"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/cdzombak.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-12-28T20:35:43.000Z","updated_at":"2025-07-10T04:55:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"c364a054-eafd-4722-907e-39e2af21a345","html_url":"https://github.com/cdzombak/samba-docker","commit_stats":null,"previous_names":["cdzombak/samba-docker"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cdzombak/samba-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fsamba-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fsamba-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fsamba-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fsamba-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdzombak","download_url":"https://codeload.github.com/cdzombak/samba-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdzombak%2Fsamba-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276738881,"owners_count":25696014,"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","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","elasticsearch","nas","samba","samba-server","selfhosted","spotlight"],"created_at":"2024-11-15T08:17:13.079Z","updated_at":"2025-09-24T11:31:40.889Z","avatar_url":"https://github.com/cdzombak.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# samba-docker\n\nUp-to-date Samba Docker image optimized for NAS file sharing with full macOS Spotlight support via Elasticsearch integration.\n\n## Configuration \u0026 Usage\n\nTK\n\n### Using `testparm`\n\nWith your `docker-compose.yml` set up, you can use [`testparm`](https://www.samba.org/samba/docs/current/man-html/testparm.1.html) as follows to check your `smb.conf`:\n\n```shell\ndocker compose run samba testparm /usr/local/samba/etc/smb.conf\n```\n\n### IO and Nice Prioritization\n\nSamba is arguably the most important thing running on my NAS; when I'm browsing files/folders on it, I want it to be _as fast as possible_. To help achieve this I've added the following to the `samba` service in my `docker-compose` file:\n\n```\n    command:\n      - ionice\n      - -c1\n      - -n1\n      - nice\n      - -n-17\n      - /usr/local/samba/sbin/smbd\n      - --foreground\n      - --no-process-group\n      - --configfile\n      - /usr/local/samba/etc/smb.conf\n    cap_add:\n      - CAP_SYS_NICE\n```\n\nThis runs `smbd` in the \"realtime\" IO class, with priority `1` (the possible priorities are `0-7`, with lower numbers being higher priority). To give it priority on the CPU, I also give `smbd` a `nice` value of `-17` (values range down to `-19`, the highest priority).\n\n### Elasticsearch \u0026 FSCrawler (for Spotlight support)\n\nTK\n\nalso TK: cpu shares for the ES stuff; and (io)nice values for the same.\n\n## Monitoring with Netdata\n\nTK\n\n## Migrating away from system Samba\n\nTK: necessary if you want samba container to use host networking and listen on 445\n\n```\napt remove smbclient samba samba-common \u0026\u0026 apt autoremove\n```\n\n## See Also\n\nTK: raindrop bookmarks\n\n### Samba\n\nTK: samba docs in general: smbd, conf, build, general wiki refs\n\n- [`smb.conf` reference](https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html)\n- [`smbd` reference](https://www.samba.org/samba/docs/current/man-html/smbd.8.html)\n- [`smbpasswd` reference](https://www.samba.org/samba/docs/current/man-html/smbpasswd.8.html)\n- https://wiki.samba.org/index.php/Build_Samba_from_Source\n- https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html\n- https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X\n- https://wiki.samba.org/index.php/Configuring_Logging_on_a_Samba_Server\n\n### Elasticsearch and Spotlight\n\nn.b. Elasticsearch 8.9.0 and newer **are not compatible with Samba**.\n\nTK: spotlight, es, indexers, samba bugs\n\n- https://wiki.samba.org/index.php/Spotlight_with_Elasticsearch_Backend\n- https://bugzilla.samba.org/show_bug.cgi?id=15511\n- https://bugzilla.samba.org/show_bug.cgi?id=15342\n- https://github.com/Ellerhold/fs2es-indexer/issues/27#issuecomment-1676052344\n- https://lists.samba.org/archive/samba/2023-August/246274.html\n- https://fscrawler.readthedocs.io/en/latest\n\n## License\n\nOriginal works in this repo are licensed under GPL3; see `LICENSE` in this repo.\n\n## Author\n\n[Chris Dzombak](https://www.dzombak.com) ([github.com/cdzombak](https://www.github.com/cdzombak))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdzombak%2Fsamba-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdzombak%2Fsamba-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdzombak%2Fsamba-docker/lists"}