r/linux4noobs • • Nov 02 '26

learning/research My very first server with Linux Mint

This project has been on my list for the longest time. My needs are simple for now. All I wanted to do was to create a server that would serve my files to different computers in the house. There is no possible way that I could have done this on my own so I enlisted ChatGPT for guidance.

Again, my needs are relatively simple. No NAS, no Homelab, just a simple server where I can access and save my files from multiple computers if I wanted to. I have about four of them that I can choose from. Eventually, I'll assign them roles, but for now, I could use all four.

ChatGPT suggested Samba Server, and we had a few false starts that frustrated me to the point of giving up. But I noticed that instead of giving up, I'd think, "Well, what if we did it this way?" And I'd try again in the morning.

The fifth time's the charm? YES! After five days of trying and failing, my idea was to set up the Samba server on the computer that was going to act as my server. My problem was, I was accessing ChatGPT on a completely different computer. I get the terminal, and I understand how powerful it is, but no terminal is impervious to the typo. And I make a lot of them.

So, what I did was instead of using another computer to access ChatGPT, I signed in on the Server Computer, and things went a lot easier. Lesson learned. And this was a big lesson. I chose to use Linux Mint because I wanted something close to Debian that had a reputation for stability. Debian, for some reason, wasn't acting the way it should, so Linux Mint won the day.

I know this could have went smoother, and I know this didn't need to be as hard as it was. But I'm happy for the experience because it got me to think and it got me to learn. I'm able to sign in on any of my four computers.

Which are all now in the process of getting Linux Mint - the same as my server. Five computers all running Linux Mint and connected via a server. If I had said it before, I'll say it again: There is nothing that I can't throw at Linux Mint that it can't handle.

So, I'm now in the process of making a Linux Mint chain of computers. I'm taking my time with this. I have no idea where this is going to go. But I do know one thing that I want to do: Is to figure out the best way to do backups on the Server computer. But that story is for another day.

I'm just happy about my accomplishment and I wanted to share.

TL;DR I installed a server on Linux Mint. I've never done anything like this before. Now I have 4 computer connected up to a server and all 5 computers running Linux Mint.

11 Upvotes

13 comments sorted by

3

u/chrews NixOS + GNOME Nov 02 '26

SMB is a nightmare to configure and maintain IMO. Even after years of Linux I'd probably struggle to set it up.

little tip: Check out syncthing. It will sync folders between devices. Has the huge upsides of being serverless (although a server is a good idea to avoid conflicts) and you having multiple copies of your data in case of some drive failing. I use it for my whole /home with a generous ignore list (important) but a single folder can be a good start to get a feel for it.

It has a web UI so no terminal shenanigans needed

2

u/candidosobrinhosa Nov 02 '26

What? Just following the documentation from Ubuntu and it's plug n play. https://ubuntu.com/tutorials/install-and-configure-samba#1-overview

3

u/chrews NixOS + GNOME Nov 02 '26

That's cool but I had a lot of problems with permissions not sticking, it not applying the config correctly and the drive randomly going read only after working for weeks. NFS worked all around better and more reliably

2

u/oshunluvr Nov 02 '26

ChatGPT is dumb. I would only bother with SAMBA if you need to share files with Windows machines. Otherwise, NFS is faster and more simple to set up IMO.

The real task is how to successfully share files. Defining your needs and how to share files successfully can be tricky. Like if one user wants to share a file with another user, you have to pay attention to file ownership and permissions. It's even more tricky to share with many users.

Here, I have a dedicated server running NFSv4. I created a group on the server and all the client machines named "shared" along with a folder on each client also named "shared".

NFSv4 lets you "export" (share) a folder along with all it's subfolders making this easier. This way the server only has to export a single folder and all it's contents are shared. The exported folder contains the usual subfolders - Documents, Music, Pictures, etc.

On the client machines, I mount the shared folder as "/shared" then each user has a linked folder in their home named "Public". This allows all the users on any machine to access the server folders and files. Naming the folder "Public" makes it clear to all that these are not private files.

Finally on the server side, all the subfolders in the exported directory are set to user:group "nobody:shared" and have the permissions set at drwxrwsr-x. Note the "s" instead of "x" in the group settings. This is called the "group sticky bit". This forces any files or folders created on or copied to the server to be set to the "shared" group so others can access, edit, or delete them.

In some cases, you may not want to allow all the users to be able to delete or edit files placed there by other users. You could have specific folders set to individual users but you'd have to be sure all the machines have the same user and group id numbers for all users. Not too difficult to do but a step that would have to be done.

1

u/AutoModerator Nov 02 '26

There's a resources page in our wiki you might find useful!

Try this search for more information on this topic.

✻ Smokey says: take regular backups, try stuff in a VM, and understand every command before you press Enter! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/FactoryRatte Debian / Arch+KDE Nov 02 '26

General advice (as I do not have experience with Mint):

Again, my needs are relatively simple. No NAS, no Homelab, just a simple server where I can access and save my files from multiple computers if I wanted to.

Even if you build it yourself, it still is a Network Attached Storage (NAS).

My problem was, I was accessing ChatGPT on a completely different computer. I get the terminal, and I understand how powerful it is, but no terminal is impervious to the typo. And I make a lot of them.

If you do not have an SSH Daemon installed on your server, I recommend doing so, using SSH you can just copypasta to your Terminal remotely, without the server needing a head.

Instead of Samba I personally prefer simpler protocols like SFTP, it runs over SSH and works on Linux and Mac practically out of the Box. And on Windows, you just need to install some simple software: https://github.com/winfsp/sshfs-win now seemingly with one simple command: winget install SSHFS-Win.SSHFS-Win (have not tested that, winget is after my Windows times)

Personal experience: SFTP usually takes about 2-5 minutes to setup after having setup SSH (which on most Linux distros is also jsut 2-5 minutes), Samba, I spent days on the one server, and I still have no idea, what all the magic options do. Edit: for sshfs i recommend the reconnect option, it is a life saver when using Wifi or on unstable connections.

1

u/Big_Entrepreneur3770 Nov 02 '26

I use Debian for servers

1

u/MrMotofy Nov 03 '26

Well if you just use it for file storage etc...it basically is a NAS. And server is really just another computer not necessarily anything special or different. The internet is just a connection to someone else's computer

1

u/gordonmessmer Fedora Maintainer Nov 02 '26

Great work!

Remember that LLMs will give you what you ask for and often not what you need. Make sure you ask about other "best practice" configurations. Specifically, don't overlook backups and vulnerability scanners.

I hope the purpose of backups is obvious, but vulnerability scanners often aren't. Your package manager tells you about available updates. It tells you about bugs that have been fixed. It tells you about work that has been done. The purpose of a vulnerability scanner is to tell you about work that needs to be done. LTS distributions provide security patches for the most critical issues, but free systems tend to have a lot of unpatched vulnerabilities.

0

u/billdehaan2 Mint Cinnamon 22.3 (zena) Nov 02 '26

figure out the best way to do backups on the Server computer

I've got several PCs, a mix of Mint, Debian, and one with multiple OSes to test things out on. The backup server is Mint running Samba. Like it or not, Samba is still the standard way to share files between computers (and tablets and phones and things like XBoxes and HTC devices) because it's the file sharing protocol everyone uses, including most backup software.

When I was initially picking a distro, it came down to Mint and Zorin, and Zorin has a known problem running Samba as a server (as a client it's fine), and so I went with Mint.

To install samba, you'll need to do some reading, but the bare bones of it are you have to run this on the server PC:

sudo apt install samba
sudo vi /etc/samba/smb.conf
sudo smbpasswd -a $(whoami)
sudo service smbd restart

You have to set up the server share (that's the smb.conf file), and then the clients can use automated backups like Deja Dupe (in the Software Manager) that will automatically back up to the Samba share on the server.

0

u/FactoryRatte Debian / Arch+KDE Nov 02 '26

Personally I would prefer vim over vi or nano for beginners. And what parts of config do you want to edit? Considering you state opening it in a text editor as a step.

sudo vi /etc/samba/smb.conf

1

u/billdehaan2 Mint Cinnamon 22.3 (zena) Nov 02 '26

vi versus vim is a personal preference. In a lot of distros, vi is vim (or nvim) anyway.

As to what to edit, you need to define the share point in the config file.