Install Palmr File Sharing
Install Palmr
Palmr is a straight forward file sharing system providing easy upload and simple sharing options while maintaining powerful control over file access.
Install Updates
Update and upgrade your server's packages using the following commands:
-
For Ubuntu/Debian:
sudo apt update && sudo apt upgrade -y -
For RedHat/CentOS/Fedora/Alma/Rocky:
sudo dnf update -y
Create a Non-Root User
Create a non-root user with superuser (sudo) privileges:
-
Add a new user using
adduser <username> -
Set the password for this user.
-
Enter the relevant information (optional)
-
Enter 'Y', then press Enter.
-
Add the user to the "sudo" group:
-
For Ubuntu/Debian:
usermod -aG sudo <username> -
For RedHat/CentOS/Fedora/Alma/Rocky:
usermod -aG wheel <username>
-
Ubuntu / Debian
usermod -aG sudo <username>
RedHat / CentOS / Fedora / Alma / Rocky
usermod -aG wheel <username>
Now, you can log out of the system, and log back in as your new non-root super user.
Install Docker and Docker Compose
Install Docker and Docker Compose on your server:
-
Install the
curlutility:-
For Ubuntu/Debian:
sudo apt install curl -y -
For RedHat/CentOS/Fedora/Alma/Rocky:
sudo dnf install curl -y
-
-
Run the command to install Docker and Docker Compose:
curl https://get.docker.com | sh
Add Your User to the Docker Group
Add your non-root user to the docker group so you can use Docker commands without sudo:
sudo usermod -aG docker <username>
Now log out and back into your system, and you are ready to setup your application.
Install Palmr
First, let’s create our folder structure. We’ll create a parent ‘docker’ folder, with a ‘palmr’ folder inside of it.
mkdir -p docker/palmr
Next, we’ll move into our new palmr folder with
cd palmr
Now we need to create a configuration file called ‘compose.yaml’.
nano compose.yaml
Copy the text block below, and we’ll make s few adjustments for your needs, then we’ll be ready to save and get thing sup and running.
services:
palmr:
image: kyantech/palmr:latest
container_name: palmr
restart: unless-stopped
ports:
- "5487:5487" # Web interface
# - "3333:3333" # API (optional)
environment:
# Optional: Uncomment and configure as needed (if you don`t use, you can remove)
# - ENABLE_S3=true # Set to true to enable S3-compatible storage
- DISABLE_FILESYSTEM_ENCRYPTION=false # Set to false to enable file encryption
- ENCRYPTION_KEY=< openssl rand -base64 32 >
- PALMR_UID=1000 # UID for the container processes (default is 1000)
- PALMR_GID=1000 # GID for the container processes (default is 1000)
- SECURE_SITE=true # Set to true if you are using a reverse proxy
- DEFAULT_LANGUAGE=en-US # Default language for the application (optional, defaults to en-US)
# - PRESIGNED_URL_EXPIRATION=3600 # Duration in seconds for presigned URL expiration (optional, defaults to 3600 seconds / 1 hour)
- DOWNLOAD_MAX_CONCURRENT=3 # Maximum simultaneous downloads (auto-scales if not set)
- DOWNLOAD_MEMORY_THRESHOLD_MB=2048 # Memory threshold in MB before throttling (auto-scales if not set)
- DOWNLOAD_QUEUE_SIZE=25 # Maximum queue size for pending downloads (auto-scales if not set)
- DOWNLOAD_MIN_FILE_SIZE_GB=3.0 # Minimum file size in GB to activate memory management (default: 3.0)
- DOWNLOAD_AUTO_SCALE=true # Enable auto-scaling based on system memory (default: true)
- NODE_OPTIONS=--expose-gc # Enable garbage collection for large downloads (recommended for production)
- NEXT_PUBLIC_UPLOAD_CHUNK_SIZE_MB=100 # Chunk size in MB for large file uploads (OPTIONAL - auto-calculates if not set)
volumes:
- ./palmr_data:/app/server
In the above file, you’ll notice a lot of comments (anything following a ‘#’ sign is a comment, and ignored by docker when running the application).
If you are planning to host a lot of files and data, then you may want to setup the S3 style block storage, such as with Amazon, MinIO, GarageS3, etc. In my case, I just wanted to make a few files available easily, so I just left that option commented out.
The other environment variables you may want to change are the ENCRYPTION_KEY, which you can use the command openssl rand -base64 32 to generate a strong, random key for you. Then copy and paste the key back into this file.
And finally, if your preferred language is not US English, then you’ll want to change the DEFAULT_LANGUAGE value as well.
Once, you’ve made the needed changes, you’ll want to save with CTRL + O, then press Enter to confirm, and exit the text editor with CTRL + X.
Starting our Application
Now that you’ve made the edits to the docker compose file above, you will pull down the images, and start your container with the commands:
docker compose up -d && docker compose logs -f
The above is really two commands in one, first telling docker compose to pull the images and start the associated container(s), and the second telling docker compose to display the logs for the containers as the system is up and running.
You can stop viewing the logs with CTRL + C.
Once everything is up and running you can navigate to the IP of your host machine on port 5487 to see the Web User Interface for Palmr.
Here you can create a new user, and setup any settings specific to your needs. But let’s be honest, you likely want to share files with people not on your home network, so we want to setup a domain / subdomain from which others can access, and potentially share files as well.
Setup a Domain / Subdomain and Reverse Proxy
First and foremost, you need to own a domain name. I own the domain ‘opensourceisawesome.com’. You need to have a domain you own, and can set DNS A and AAAA Recrods for.
You can get a cheap domain at places like NameCheap, or by going to Hover. I use hover, and I like their control panel for managing my domains. If you use my link to sign up, I get a credit, if you don’t, then I don’t. No big deal, and no pressure, just an option.
Next, you need to have some reverse proxy software setup. As sttaed above, I’ve done videos on setting up NGinX Proxy Manager, and Pangolin, which both have clean user interfaces for setting up your reverse proxy.
Once you have your reverse proxy installed, you can add your subdomain to it.
For instance, you may want to use palmr.mygreatdomain.com as your subdomain. In that case you need to have an A record in your domain’s DNS settings that points the subdomain ‘palmr’ to the public IP address of your server, or the private network in which your server is setup.
Then, in your reverse proxy, you’ll add an entry for ‘palmr.mygreatdomain.com’ and tell it to send the traffic along to the host server and port you setup Palmr to run on.
The way this flows is as follows:
A user requests your Palmr instance at https://palmr.mygreatdomain.com → which asks DNS the IP for the site → which sends you to the public IP address of your host or private network → which forwards you to the reverse proxy → which sends you to the local or private address and port of your Palmr instance.
Seems like a lot, but it works, it’s reliable, and it’s repeatable.
Once complete, you should now be able to get to your Palmr instance via it’s secure URL, and start uploading and sharing files with ease.
Initial Registration and Settings
Palmr, the first time you visit, will provide a Registration screen. The first user to register is automatically made an administrative user. Once you do this, you’ll want to head over to settings.and go through the settings screens. If you want more than 1 user, you’ll want to setup your own Auth provider. They have a whole list of providers from ones you control, to those provided for ‘free’ out on the internet.
After that, make sure to check out the Customization options, and you’re set and ready to put Palmr to use storing and sharing files.
Support this Channel and Content
Become a Patron at Patreon
Be me a Coffee or Beer at Paypal
Paypal Support for Awesome Open Source