AMZ DIGICOM

Digital Communication

AMZ DIGICOM

Digital Communication

Debian File Server 13: Configuration Guide

PARTAGEZ

A Debian File Server is a centralized storage solution that allows you to store, share and view files over the local network from multiple devices. For a simple file server, Samba is particularly suitable, because it allows you to configure shares accessible from Windows, macOS and Linux.

Step 1: check the technical prerequisites

Before starting the actual configuration, Debian 13 must already be installed on your server and it must be accessible via the network. For a simple file server, you don’t have to no need for specific equipment : In many cases, a system with a multi-core CPU, sufficient RAM and storage space suitable for your data is sufficient.

It is especially important that the hard drive or SSD is sufficiently sized and that the server works reliably, since it will then serve your files centrally. If several people need to open or save large files simultaneously, a fast storage and a stable Gigabit network connection are recommended. Also think in advance about which devices will need to access the Debian file server, as this determines which shares and user accounts you will need later.

Dedicated servers

Performance and innovation

  • Latest generation processors

  • High performance dedicated hardware

  • ISO certified data centers

Which type of server is suitable for which scenario?

For a private file server At home or for small teams, a virtual private server (VPS) is usually sufficient, as long as simultaneous transfers of large files are limited and storage space requirements are not too high. As soon as large volumes of datamany parallel accesses or multiple disks are required, a dedicated server or Bare Metal server is a better choice. It makes it easier to implement RAID or backup concepts. Resources are then not shared with other clients, providing greater control over hardware, storage architecture and I/O performance.

If you want to run multiple services on a single server, it may be a good idea to run the file server in a virtual machine. Platforms like Proxmox make it possible to properly separate the different services. For example, a Proxmox file server can run in its own VM, while other applications run on the same host.

If your primary goal is to store many photos, documents, or backups centrally, a system with large storage capacity and a sufficiently powerful processor is generally more relevant than raw graphics power. GPU servers are generally not cost-effective for a traditional file server. They become especially interesting when the server must support tasks like AI analysis, media analysis or transcoding.

Step 2: Update the system

First connect to the server via SSH or directly, then update Debian 13. This ensures that known bugs and security vulnerabilities are fixed before configuring your Debian file server. To do this, you can use the following commands in the terminal:

sudo apt update
sudo apt upgrade -y

bash

Step 3: Install Samba

For a Debian file server simple to use, install now Samba. Samba is open source software that allows a Linux system to function as a file and print server over the network. It implements the SMB protocol and thus allows access to shares from Windows, macOS and Linux devices. The package samba contains the components necessary to operate the system as a standalone file server. Use the following command:

sudo apt install samba smbclient samba-common-bin -y

bash

After installation, you can check if Samba is installed correctly:

After successful installation, the Samba version is displayed.

Step 4: Create a Folder for Sharing

Then create the folder which will then be shared on the network. In this example we create and use the directory /srv/filesharebecause /srv suitable for service data made available by the server. Start by creating the folder:

sudo mkdir -p /srv/fileshare

bash

Next, set relevant basic rights. For a simple to understand first configuration, first assign the folder to a dedicated user, who you will then use to control access to the Samba share.

sudo useradd -m fileserveruser
sudo passwd fileserveruser
sudo chown -R fileserveruser:fileserveruser /srv/fileshare
sudo chmod -R 770 /srv/fileshare

bash

With passwdyou define a local linux password for the user. Samba then uses its own password, but the Unix user must exist on the system. 770 rights mean that the owner and group can read, write and execute, while other users have no access. For a Debian file server internal, it is much more relevant than a completely open shared folder.

Step 5: adapt the Samba configuration

Before making any changes, back up the existing Samba configuration file. The central configuration is located by default under /etc/samba/smb.conf. Copy the file then open it with the following commands:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo nano /etc/samba/smb.conf

bash

Add the following passage at the end of the file:

[global]
workgroup = WORKGROUP
[Fileshare]
path = /srv/fileshare
browseable = yes
writable = yes
valid users = fileserveruser
create mask = 0660
directory mask = 0770

txt

The section [global] indicates the working group, here WORKGROUPunder which your server is visible on the network. Adapt this value accordingly. Next comes a named share Filesharewhich points to the directory /srv/fileshare. writable = yes authorizes writes, valid users limits access to the specified user and masks set the default rights for new files and folders. Such parameters are part of the standard structure of a file smb.conf and are managed by Samba precisely via this configuration file.

Be sure to apply basic security measures: disable outdated protocols like SMB1 and use SMB2 or SMB3 at a minimum. Limit access to trusted IP addresses (e.g. with hosts allow) and enable SMB signing or encryption to prevent tampering and unauthorized access.

Note

Verify that the required ports for Samba are open in your firewall or on the local network. For current SMB access, TCP port 445 is particularly important. Depending on the environment, UDP ports 137, UDP 138, and TCP 139 may also be required. Otherwise, the Debian file server may not be reachable despite correct configuration.

Step 6: Create Samba User

A single Linux user is not enough for Samba authentication, because Samba manages its passwords in its own user base. Local accounts must therefore be declared in Samba. Start by setting a secure password for the already created user:

sudo smbpasswd -a fileserveruser

bash

Then activate the user account:

sudo smbpasswd -e fileserveruser

bash

Step 7: Check the configuration and restart the service

Before restarting Samba, you must test the configuration. This is a very useful intermediate step, because a simple typo in the file smb.conf can then cause problems.

If the test is successful, restart the Samba services and enable them to auto-start at system startup:

sudo systemctl restart smbd nmbd
sudo systemctl enable smbd nmbd

bash

Check that everything is working correctly with the following command:

sudo systemctl status smbd

bash

You should now see the status “active (running)” displayed.

Step 8: Access the file server in the network

You can now test the file server from another device on the network. In Windows, enter for example \\SERVER-IP\Fileshare in Explorer, replacing SERVER-IP by the real IP address of the server. On macOS, use smb://SERVER-IP/Fileshare in Finder. On Linux, enter smb://SERVER-IP/Fileshare in the file manager. Log in with the username, in our example fileserveruserand the Samba password defined previously.

If the connection works, you will see the shared folder and will be able, depending on the rights assigned, to create, open and edit files. For production environments, it is recommended to create only necessary users, schedule regular backups, install security updates, and avoid unnecessarily open shares. You thus have, under Debian 13, a simple but correctly structured file server, which can be extended later without difficulty.

Télécharger notre livre blanc

Comment construire une stratégie de marketing digital ?

Le guide indispensable pour promouvoir votre marque en ligne

En savoir plus

Web Marketing

Domain name parking: what is a parked domain?

Domain name parking allows you to operate a domain by associating simple pages, such as waiting pages or advertisements, without requiring an active site. Domain

Souhaitez vous Booster votre Business?

écrivez-nous et restez en contact