English - Español - Українська - (+)

User Websites

Available since: version 0.9.4

What is User Websites?

User websites is a standard location for webservers to allow host users to expose static files on the filesystem as a website to the local network and/or the internet according to the network and firewall setup.

The standard webserver in FreedomBox is Apache and this is implemented by means of a specific Apache module.


Using User Websites

The module is always enabled and offers no configuration from the FreedomBox web interface. There is no configuration or status page shown for this module in the FreedomBox web interface.

To serve documents, place the files in the designated directory in a FreedomBox user's home directory in the filesystem.

This directory is: public_html

Thus the absolute path for the directory of a user named fbx with home directory in /home/fbx will be /home/fbx/public_html. User websites will serve documents placed in this directory when requests for documents with the URI path "~fbx" are received. For the the example.org domain thus a request for the document example.org/~fbx/index.html will transfer the file in /home/fbx/public_html/index.html.

Creating public_html folder and uploading documents

Visually from Linux

Linux standard desktop file managers use to support remote filesystem access through SFTP out of the box. Among others, Gnome's Nautilus, KDE/Plasma's Dolphin and XFCE's Thunar do so. This standarization allows for very easy, similar and straightforward procedures:

  1. Connect with the file manager to your FreedomBox:

    • Gnome's Nautilus:
      1. To lauch Nautilus you can seek its archive icon, or search ether its name or the word "file".
      2. At the bottom of the left pane you'll find an option "+ Other locations".
      3. It leads you to a list of locations. Find "freedombox SFTP server" (english literal for all desktop languages). Click on it.

      4. The first time you'll be asked for your user and password. Enter your FreedomBox user and its password. The dialog will also offer you some options to remember it for some time.

    • Plasma file manager AKA Dolphin:
      1. Click on the location bar at the top of the window.
      2. Input ftp://freedombox.local

      3. The first time you'll be asked for your user and password. Enter your FreedomBox user and its password. The dialog will also offer you some option to remember it.

    • XFCE's Thunar:
      1. Type this into the browser bar: sftp://username@freedombox.local, replacing the 'username' placeholder with your actual FreedomBox username.

      2. I guess the first time you'll be asked for your password. Enter your FreedomBox user's password.

  2. You should be shown FreedomBox filesystem. Enter the home folder and then enter you user's subfolder.

  3. If there's no public_html folder, create it: right mouse button click, etc.

  4. Drag your file(s) and drop it/'em into the public_html folder.

  5. You should now be able to navigate your browser to the corresponding url and see the files.

Visually from Other Plattforms

If you want to use graphical free software clients, install:

Their usage will be similar to that described for Linux desktops.

With a Command Line Interface (CLI)

Usually any Unix system, including Linux in all (most) of its flavours and Mac, provide the standard utilities ssh, scp and sftp. FreeDOS provides SSH2DOS. No need to install anything. It's already there!


Connect to FreedomBox via SSH:

  1. (replacing username with a valid FreedomBox user name and freedombox.local with your FreedomBox's domain name or IP):

    $ ssh username@freedombox.local
  2. If your data is ok and your FreedomBox reachable, the first time you'll be asked to confirm its signature.

  3. Then you'll be asked for the password of your FreedomBox user.

  4. Then you'll be shown the welcome banner with the FreedomBox's buttefly logo in ASCII art (painted with characters).

  5. The prompt changes to username@freedombox:~$.

Once connected create your website folder with:

...or one for another user:

  1. use the sudo prefix like

    username@freedombox:~$ sudo mkdir /home/<the_other_user>/public_html
    , and introduce your password.
  2. When you create a folder, by default it belongs to you no matter where it is created. Thus you'll then need to set its ownership to the other user:

    username@freedombox:~$ sudo chown <the_other_user>:<the_other_user> /home/<the_other_user>/public_htm
  3. Better check it before you disconnect that `public_html' is listed among the contents of the other user's home folder.
    username@freedombox:~$ ls -l /home/<the_other_user>
    drwxr-xr-x  2 <the_other_user> <the_other_user>   4096 jan 29 17:39  public_html

    . The name of the other user must appear twice in the public_html line and its permissions should be drwxr-xr-x.

Then any user can upload their files to their respective folders with any of the graphical clients. Ask them to check it.

It is a good security practice to exit instead of to just wait for the connection to time out:

If then you want to also upload the web content through the command line you can

$ scp path/to/files username@freedombox.local:public_html/

. It will ask your password in FreedomBox. You should then be able to navigate your browser to the corresponding url and see the files.

Learn more about ssh, scp and sftp with $ man ssh, $ man scp and $ man sftp.

Back to Features introduction or manual pages.









Live Help

Where To Start







To Do









FreedomBox for Communities

FreedomBox Developer Manual

HELP & DISCUSSIONS: Discussion Forum - Matrix - Mailing List - #freedombox irc.debian.org | CONTACT Foundation | JOIN Project

Next call: Sunday, July 28 at 17:00 UTC

This page is copyright its contributors and is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.