Change /tmp for sequenceserver


I am trying to change the default directory where sequenceserver writes file from /tmp to some folder in home directory.

I searched forum, and followed some instructions.

I tried to change file

cat /usr/local/share/gems/gems/sequenceserver-1.0.11/

require ‘sequenceserver’

def Dir.tmpdir




run SequenceServer

I also set $TMPDIR

But it didn’t help.

Could you advise something

sequenceserver -v


Thank you,

Hi Nataliya,

If you are launching SequenceServer from command line, the following works:

TMPDIR=/path sequenceserver is relevant only if you are using SequenceServer with Apache. Your code does look like it should work. Alternatively, I have the following at the top of one of my old file:


Note that temporary files are deleted once they have been used.


Thank you Priyam,

unfortunately none of this worked

The temporary files are deleted indeed after sequence server stops, if pressing CTRL+C,
but I have sequence server in Autorun

cat /etc/systemd/system/


Description=SequenceServer server daemon

Documentation=“file://sequenceserver --help” “




ExecStart=/usr/local/bin/sequenceserver -c /home/AM_assembly/.sequenceserver.conf






so files stay in /tmp all the time until I delete them manually, for example
In /tmp

-rw------- 1 AM_assembly AM_assembly 1.8K Mar 31 19:36 sequenceserver_query20200331-69120-qm9hv9

-rw------- 1 AM_assembly AM_assembly 1.8K Mar 31 19:54 sequenceserver_query20200331-69120-qp5vjp

-rw------- 1 AM_assembly AM_assembly 843 Mar 31 19:19 sequenceserver_query20200331-69120-scj86d

-rw------- 1 AM_assembly AM_assembly 843 Mar 31 18:56 sequenceserver_query20200331-69120-zaj3p5

-rw------- 1 AM_assembly AM_assembly 0 Apr 1 06:46 sequenceserver_query20200401-69120-15as5ex

-rw------- 1 AM_assembly AM_assembly 0 Apr 1 08:53 sequenceserver_query20200401-69120-1hi4vi1

-rw------- 1 AM_assembly AM_assembly 0 Apr 1 06:47 sequenceserver_query20200401-69120-1sxk5dy

-rw------- 1 AM_assembly AM_assembly 4.0K Apr 1 10:19 sequenceserver_query20200401-69120-9jdv5c

-rw------- 1 AM_assembly AM_assembly 2.1K Apr 1 11:52 sequenceserver_query20200401-69120-h3o8zo

when some big searched are launched files can grow to Gbs and we ended up with no space in /

that’s why I am looking for possibility to change /tmp

What else I can try? Or maybe I am doing something wrong?

чт, 2 апр. 2020 г. в 10:35, Anurag Priyam <>:

Is that a systemd unit file? What if you set TMPDIR environment variable using Environment directive:


That would go in the [Service] section.


If that doesn’t work you can just create a little script, say ’’, containing:

TMPDIR=/path sequenceserver -c …

And then change ExecStart to point to this script (absolute path).

If none of the above works, you can try to directly modify the code. There should be a lib folder next to the file you found earlier. Add the following at the top of lib/sequenceserver.rb


Nope, nothing worked again :frowning: sorry

When I run from command line line
TMPDIR=/path sequenceserver -c …

it doen’t work also, it seems that it is not reading TMPDIR at all.
Where is directory for temporary file defined in the code? Where are the instruction to read $TMPDIR?

чт, 2 апр. 2020 г. в 12:29, Anurag Priyam <>:

It is part of Ruby programming language’s standard library.