Help me setup samba server
I installed samba package but don't know what to do next.
I want to be able to access the server from Windows file explorer and Kodi.
I tried
smbd -i -D -s smb.conf
with the config attached.
I don't have root.
Please help me setup the server. Thank you.47 Replies
yes samba does not work
ive tried everything
the only thing that works is gatling(http) and sftp
i suggest using mixplorer or some other android native app for hosting an smb server
i tried smb server using mixplorer but windows does not recognize it
I successfully created ftp and webdav servers in termux. But can't map these as drives in windows explorer.
Wish i could create smb server with termux. Thank you for replying.
use the beta version, stable is broken
if you use shizuku, the Android/data bypass for mix breaks and causes file perm issues since itll be using shizuku as shell user instead of using SAF to assign the right user if its turned on
try sftp and ssh-fs
should work
I use shizuku too, but most of the time it's turned off, I turn it on only when i need to install apks or enable disabled apps
yeah keep it off when using mixplorer unless you're doing something specific or youll get a headache later on
what do you think which protocol would be best for media file transferring: sftp, ftp, webdav, or ssh-fs? I'll mainly use this to stream on kodi from my sd card
sftp and webdav are avout the same for me
smb is very slow
at max i was only able to do 6mb/s
I personally would just host a jellyfin server on termux for that
Kodi was shit when I tried it so I don't use it
you're right. i was able to get 24mb/s with webdav and ftp
how? that'd be amazing
i went up to around 38mb/s which was about the max my 5ghz connection could do
proot-distro
do you a tutorial for it?
transcoding would probably be too slow
no
probably my router restricting my speed.
just install it normally as on a regular linux distro
I'd rather not transcode, i tried with emby, and my phone heated real quick
haha you can turn it off
You have emby tho?
yeah but then some files don't play
I hear that's the best option
do they not have arm64 builds?
They dont play if the client can't natively decode the video
you'd have to transcode ahead of time for that if phone is too slow for even 24fps transcoding
but this is too complicated at this point
I really wanted to use it, the interface and everything was good, i'm ditching it though, it's paywalled and it needs to transcode some files to play,
I like kodi, because I can customize it however i want and i can map to any network systems like ftp webdav etc.
With emby/jellyfin, can't do it, unless it's mapped in windows explorer.
you can use gatling natively in termux with kodi
itll even "chroot" for you wherever dir you start it in
I thought you paid for it lmao
I thought you're hosting jellyfin/emby on termux?
what does windows have to do here?
my phone did it smoothly but problem is the heating, and I don't like it
heating isn't bad inherently
I'm playing media on windows
Yeah, play it through jellyfin?
yes
You're hosting the server on your phone already
I don't see why you need to mount the folders on windows
emby should work
jellyfin should work
kodi should work
i dont see promble
am confuse
with emby yes, with jellyfin no, I had to use mounted drives on jellyfin server on windows. I didn't know you can host jellyfin server using termux.
can you tell me more about the gatling?
I don't remember how me testing the jellyfin thing went
take with grain of salt
also i didnt test emby so take with barrel of salt
you pkg install gatling
you say gatling
gatling starts webdav
simple
it chroots to the dir you're currently in
I tried emby, it heated my phone because of transcoding, so I switched to jellyfin.
Jellyfin has no android server (didn't know about termux jellyfin at that time), so I tried Jellyfin server on windows. And tried to add my sd card as library. but to do that, i had to mount it on windows first as a drive. I wasn't able to do it, because windows explorer requires smb servers to map as drives. so I made a support request here about how to create smb server, because what i created failed.
Then I switched to ftp/webdav, these are working fine in kodi, i can scrub through media smoothly.
I kept this request open, as I was curious how to successfully start the smb server, and I was also open to better media streaming ideas if anyone had any.
Does it clear your confusion?
does emby have no switch to turn off transcoding?
It does. But the problem is, it won't play the media at all.
but kodi does?
that sounds like a bug to me
Kodi is transcoding on windows which is fine, it just getting the media file from my phone
emby directly transcodes in the phone
Samba server by default is listening on port under range 1080, Which could not be achieved without root. So you need to change the listening port and adjust the connection settings on your client end.
Alternatively, Consider using ftp (or similar) instead if you are using it only for local network.
Yeah tried that, gatling just doesn't work and smbd crashes when entering password
It need root for user login. Too.
So basically it's impossible to use without root. Unless you could modify smbd to explicitly ignore any usernames like sftp did
I expected a patch for it that ignores the user like sshd
You could try make one if you could.
Only thing you need to look at is lines of code that deals with credential login
To think of it, You could actually try run samba server with distro running via proot
But listening on different port
i felt proot was too much, so i just used mix
smb is broken on the stable release, beta fixed it
but i dont use it anyway cause its so slow
Samba server by default is listening on port under range 1080, Which could not be achieved without root. So you need to change the listening port and adjust the connection settings on your client end.I had
4455
port open for SMB
too. But for some reason I can't connect to it.
Alternatively, Consider using ftp (or similar) instead if you are using it only for local network.I'm using
FTP
and WebDav
for media transferring. And SFTP
(thanks to @word man for suggesting it) for programming stuff inside Termux home.
Unfortunately, Kodi (Omega) does not support SFTP
. Though It does support FTP
and HTTP
server. But again, unfortunately, for some weird reason, it won't show HTTP
server contents.
Fortunately, I was able to map HTTP
server as a drive today on Windows Explorer. And later, add those network drives as libraries in Kodi.
And then I ran into another issue, which is, it caches the complete file first, then plays, and does not stream immediately. Which is a big problem, because the file sizes are huge, and takes two or three minutes minimum to start.
Fortunately, Kodi streams directly with FTP
protocol. But unfortunately, it won't scrape information of the media inside it.
So I'm in a win-lose-win-lose... situation. 😅
MiXplorer supports DLNA now. Did you try that? I'll try it and let you know.
My problem with MiXplorer is, the servers gets shutdown after quite some time.
FYI, The app is not battery optimized and not restricted by the battery saver application.
So I tried the DLNA server, it starts with http
instead of upnp
, it's undiscoverable on windows explorer, but, can't access it via browser either.If you want to mount it, just use SSHFS with SFTP
Personally used this https://github.com/evsar3/sshfs-win-manager
I just use regular sshfs in the terminal on linux
Thank you. I don't know what SSHFS is, I hardly connected SFTP in VS Code.
What do you use SSHFS for? For media streaming, or just transferring files in general?
It just mounts sftp to your computer
Which is what you're trying to do
Also I don't use DLNA. Seems finnicky. Rather just host jellyfin server.
I tried transferring large media via SFTP, seems slower like SMB. Got 6MB/s max.
FTP is working fine for me now, I was able to fix the scraping issue and I don't have to mount it to use it in Kodi. And I'm getting average 24MB/s with it.
odd. But neat, that solves your problem then, right?
Yes, it did.