How to set up and remotely access Immich using Meshnet
Discover how you can configure and remotely access Immich with Meshnet.
Last updated
Was this helpful?
Discover how you can configure and remotely access Immich with Meshnet.
Last updated
Was this helpful?
Immich is a self-hosted and open-source tool for backing up and managing your images and videos. It offers an intuitive solution with a wide range of features, including multi-user support, asset sharing, and facial recognition. Unlike other self-hosted picture libraries, such as LibrePhotos, Immich is primarily focused on backup functionality, allowing you to easily upload pictures from desktop and mobile platforms.
By supplementing your Immich setup with Meshnet, you can enable secure content backup and remote access over an encrypted NordLynx tunnel. This configuration does not require port forwarding or experience with firewalls. Even if you are on the other side of the globe, simply turn on Meshnet and connect to your Immich server as if you were on the same local area network (LAN).
This guide will walk you through the process of setting up a personal Immich instance and showcase how Meshnet can be integrated to allow for seamless remote connections to the server.
Make sure that you have Docker and Docker Compose installed on your device. You can find instructions on how to download and install these tools on the Docker website:
Note
Docker Compose comes pre-installed with Docker Desktop.
Immich operates as a multi-container app, comprising Docker containers for the server, database, and machine learning, all working together seamlessly. The Docker Compose tool is used to manage the preparation, deployment, and operation of these interconnected containers.
To start, you need to prepare a folder that will hold all files and data required to run Immich.
Open PowerShell.
In your preferred directory, create a new immich
folder and navigate to it using the following command:
Run the two commands below to download the Docker Compose and the environmental variable files from the Immich GitHub repository:
Use the ls
command to check if both files have downloaded successfully.
Next, you need to alter some of the default values provided in the downloaded files to fit your setup.
Note
Immich relies on a PostgreSQL database, which is incompatible with NTFS or FAT file systems used by Windows. To overcome this limitation, the database folder must be mapped as a Docker volume rather than a standard system directory.
For more information, see the “Special requirements for Windows users” section of the Immich requirements page.
In PowerShell, run the following command to create a new volume that will be used for database storage.
Open the .env
file using Notepad with the command below:
Make the following changes to the environmental file:
Set the value of UPLOAD_LOCATION
to the path where you want the uploaded pictures and videos to be saved, as shown:
If the path contains spaces, enclose it with single quotation marks.
Change the DB_DATA_LOCATION
location value to postgres
to ensure the database uses the Docker volume.
Uncomment the TZ
line by removing the hash (#) symbol at the start. Then, replace the default Etc/UTC
value with your current time zone.
Example
Press Ctrl + S to save changes and then exit Notepad.
Open the docker-compose.yml
file using Notepad using the command provided below:
At the end of the file, under the volumes
, append a new pgdata:
line, to map the Docker volume to the container.
Press Ctrl + S to save changes and then exit Notepad.
While in the immich
directory, execute the following command in the command line to deploy your Immich instance:
Docker will pull the resources and dependencies required for Immich and create the necessary containers.
Run the docker ps
command to check the state of the containers. In the output, under STATUS
, you should see Up
and the duration indicating how long the containers have been active.
Once the Immich server container completes initialization, it will start a web interface that allows you to manage your Immich instance.
Upon accessing the Immich web interface for the first time, you will be prompted to create an administrator user account.
Open your internet browser and navigate to the Immich web interface.
If you’re accessing Immich from the same device that is hosting it, go to localhost:2283/
.
Otherwise, swap the localhost
part with the server’s local IP address. For example, 192.168.1.50:2283/
.
Click Getting started.
Fill in the Admin registration form with the administrator user’s email address, password, and username. Then, click Sign up.
On the login page, enter your email and password and select Login.
Complete the onboarding process and click Done.
Now you should see the main page of the Immich app. This is where all the pictures you upload will be displayed.
With the available user management features, you can create user accounts for friends or family members who will be joining your server. It is recommended to set up individual accounts for each user to ensure their uploaded assets remain private and secure.
In the upper-right corner, click the user icon and choose Administration.
Select Create user.
Enter the email address, password, and username of the new user account. Example
Click Create.
The new user account has been created and you can see its details under the User management table.
Note
To enhance account security, new users must change their password upon logging in for the first time. If you prefer to disable this feature, turn off the Require user to change password on first login toggle during account creation.
The external domain specified in the Immich settings is used to generate links for media sharing. While this setting is not mandatory for allowing remote connections over Meshnet, entering your Meshnet address as the external domain simplifies the item-sharing process between Meshnet peers.
In the upper-right corner, click the user icon and choose Administration.
From the menu on the left, select Settings, locate Server settings, and expand the dropdown.
In the External domain field, enter http://<server>:2283
, replacing the <server>
placeholder with your server’s Nord name or Meshnet IP address.
Example
Click Save.
Depending on your device type, you can choose from two different methods to connect to your Immich server over Meshnet.
The Immich mobile app is developed alongside the server software and includes additional features tailored specifically for mobile devices.
Download and install the Immich app on your mobile device.
On Android, you can download Immich from any of the following sources:
On iPhone and iPad, you can get it from the App Store.
When requested, grant the Immich app access to your photo library.
In the Server endpoint URL field, enter http://<server>:2283/api
, where <server>
is the Nord name or Meshnet IP address of your Immich server device. Then, tap Next.
Example
http://secret.meerkat-himalayas.nord:2283/api
Enter the email and password of your Immich account and select Login.
If you’re using a desktop device, you’ll need to access and use Immich through an internet browser.
Copy the Nord name of the Immich server directly from the NordVPN app.
Open your internet browser.
Paste the copied Nord name followed by :2283
to the URL field and press Enter.
Example
secret.meerkat-himalayas.nord:2283/
Type in the authentication details of your Immich account and click Login.
Once you have established a connection to your Immich instance, you can select and backup your photographs and recordings to your server.
In the upper-right corner, tap the backup button.
Tap Select to choose the media folders you want to back up on your Immich server.
Return to the Backup screen and select Start backup to begin uploading items to Immich.
Your assets should immediately start being uploaded to Immich. The transfer statistics are displayed on the Backup screen and are updated in real time.
Tip
You can configure the Immich mobile app to automatically upload media from the selected locations to the server. For further details and instructions, see the “Automatic backup” page of Immich documentation.
With all of the assets backed up on your Immich server, you can start organizing the media and sharing it with other users.
All uploaded media is sorted by date and displayed on a single page. You may want to improve upon this layout by grouping content into albums. To create an album:
In Immich, select the items you want to include in your album by clicking the checkmark in the upper-left corner of the thumbnail.
In the upper-right corner, click the Add to button.
In the Search field, enter the name of your album and select New album.
A new album with your chosen title is now created. You can view and manage the album and its contents on the Albums page.
To simplify file management and conserve storage space, you can upload assets from a single account, organize them into an album, and grant access to other Immich users, allowing them to view the album from their accounts.
Open the Immich web interface.
From the menu on the left, select Albums.
Hover your cursor over the album you want to share and click the three-dot menu button.
Choose Share.
In the Invite to album dialog, select the user with whom you want to share the album.
Click Add.
The chosen user can now view the album you shared by navigating to their account’s Albums page.
Note
By default, the invitees are granted editing permissions in the album. If you wish to share the album as view-only, in the Invite to album dialog, instead of Editor, select Viewer.
If you want to share some content with a peer who doesn’t use Immich, you can use the integrated link-sharing feature.
The external libraries feature enables you to import a folder pre-filled with content, eliminating the need to upload everything manually. This is especially useful for individuals who already store their footage in a centralized location but want to take advantage of the management features that Immich provides.
First, you must update the Docker Compose file with the path of the library you want to import.
Using a text editor, open the docker-compose.yml
file of your Immich instance.
Under the volumes
section, append a new line using this format:
Where:
<path/to/library>
is the path to the media folder you want to import.
<directory>
is a custom name of the folder where the library will be mounted inside the Immich container.
Example
Save changes and close the docker-compose.yml
file.
Open PowerShell (on Windows) or Terminal (on macOS and Linux) and navigate to your Immich directory using the cd
command.
Run the command below to recreate the Immich server container with the updated Compose file.
Once the container restarts, the newly mounted volume will be available for importing in Immich.
Note
The :ro
parameter at the end of the volume line assigns read-only permissions to the container for the specific folder, ensuring that the data cannot be modified or deleted.
On your Immich web interface, take the following steps to create a new external library:
In the upper-right corner, click the user icon and choose Administration.
From the menu on the left, select External libraries and click Create library.
Choose the owner of the library and select Create.
Next to your new external library, click the three-dot menu icon, choose Edit import paths, and click Add path.
In the Path field, enter the mounting path of the new volume you added in the Compose file. Example
Click Add and then Save.
From the three-dot menu next to your library, choose Scan to index the items stored in the imported folder.
You should now see all of the media placed in the folder of the external library on the Photos page.
All new external libraries are assigned the same default name. For more convenient management, it is recommended to assign a unique and identifiable name to each library.
Next to the external library, click the three-dot menu button and choose Rename.
In the Name field, enter a unique name for the library.
Click Save.
Lastly, to ensure that new files from the external library are detected and indexed in Immich, you should turn on the periodic library scanning feature.
In the upper-right corner, click the user icon and choose Administration.
From the menu on the left, select Settings, locate External library, and expand the dropdown.
Under Periodic scanning, ensure that the Enable periodic library scanning toggle is turned on.
Optionally, select a custom scanning time interval by adjusting the values in the Cron expression field.
Click Save.
Note
With the version v1.94.0
, Immich introduced a Library watching feature that can be used instead of periodic scanning. The feature automatically imports new files when the server’s operating system detects changes in the external library folder. However, as of version v.1.24.2
, the feature is still experimental and should be used with caution.
Launch Immich .